2 lines
182 KiB
JavaScript
2 lines
182 KiB
JavaScript
|
!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).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.glimmer=t())}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t={};!function(e){var t="\n",r=function(){function e(e){this.string=e;for(var r=[0],n=0;n<e.length;)switch(e[n]){case t:n+=t.length,r.push(n);break;case"\r":e[n+="\r".length]===t&&(n+=t.length),r.push(n);break;default:n++}this.offsets=r}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,r=this.offsets;r[t+1]<=e;)t++;return{line:t,column:e-r[t]}},e.prototype.indexForLocation=function(e){var t=e.line,r=e.column;return t<0||t>=this.offsets.length||r<0||r>this.lengthOfLine(t)?null:this.offsets[t]+r},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}();e.__esModule=!0,e.default=r}(t);var r=function(e,t){const r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r};var n={locStart:function(e){return e.loc.start.offset},locEnd:function(e){return e.loc.end.offset}},o={},a={};var i=Object.freeze({__proto__:null,DEBUG:!1,CI:!1});const s=Object.freeze([]);function l(){return s}const c=l(),u=l();const h="%+b:0%";var p;const{keys:d}=Object;let f=null!==(p=Object.assign)&&void 0!==p?p:function(e){for(let t=1;t<arguments.length;t++){let r=arguments[t];if(null===r||"object"!=typeof r)continue;let n=d(r);for(let t=0;t<n.length;t++){let o=n[t];e[o]=r[o]}}return e};function m(e){let t={};t[e]=1;for(let r in t)if(r===e)return r;return e}const g="function"==typeof Proxy,b="function"==typeof Symbol&&"symbol"==typeof Symbol();function y(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"unreachable";return new Error(e)}function v(e){return m("__".concat(e).concat(Math.floor(Math.random()*Date.now()),"__"))}const S=b?Symbol:v;function k(e){return-536870913&e}function w(e){return 536870912|e}function E(e){return~e}function P(e){return~e}function T(e){return(e|=0)<0?k(e):E(e)}function x(e){return(e|=0)>-536870913?P(e):w(e)}[1,-1].forEach((e=>x(T(e))));var N="function"==typeof WeakSet?WeakSet:class{constructor(){this._map=new WeakMap}add(e){return this._map.set(e,!0),this}delete(e){return this._map.delete(e)}has(e){return this._map.has(e)}};function O(e){return 9===e.nodeType}function A(e,t){let r=!1;if(null!==e)if("string"==typeof t)r=_(e,t);else{if(!Array.isArray(t))throw y();r=t.some((t=>_(e,t)))}if(r)return e;throw function(e,t){return new Error("cannot cast a ".concat(e," into ").concat(t))}("SimpleElement(".concat(e,")"),t)}function _(e,t){switch(t){case"NODE":return!0;case"HTML":return e instanceof HTMLElement;case"SVG":return e instanceof SVGElement;case"ELEMENT":return e instanceof Element;default:if(t.toUpperCase()===t)throw new Error("BUG: this code is missing handling for a generic node type");return e instanceof Element&&e.tagName.toLowerCase()===t}}function C(e){return e.length>0}const L=console,B=console;var D=Object.freeze({__proto__:null,LOCAL_LOGGER:L,LOGGER:B,assertNever:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unexpected unreachable branch";throw B.log("unreachable",e),B.log("".concat(t," :: ").concat(JSON.stringify(e)," (").concat(e,")")),new Error("code reached unreachable")},assert:function(e,t){if(!e)throw new Error(t||"assertion failure")},deprecate:function(e){L.warn("DEPRECATION: ".concat(e))},dict:function(){return Object.create(null)},isDict:function(e){return null!=e},isObject:function(e){return"function"==typeof e||"object"==typeof e&&null!==e},Stack:class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.current=null,this.stack=e}get size(){return this.stack.length}push(e){this.current=e,this.stack.push(e)}pop(){let e=this.stack.pop(),t=this.stack.len
|