sentiero 1.0.0.alpha1 → 1.0.0.beta3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +15 -13
- data/lib/sentiero/analytics/analyzer.rb +16 -4
- data/lib/sentiero/analytics/browser_event_discovery.rb +2 -2
- data/lib/sentiero/analytics/conversion_analyzer.rb +1 -1
- data/lib/sentiero/analytics/engagement_analyzer.rb +1 -1
- data/lib/sentiero/analytics/error_discovery.rb +9 -2
- data/lib/sentiero/analytics/exporter.rb +1 -1
- data/lib/sentiero/analytics/frustration_analyzer.rb +1 -1
- data/lib/sentiero/analytics/funnel_analyzer.rb +2 -2
- data/lib/sentiero/analytics/heatmap_analyzer.rb +3 -3
- data/lib/sentiero/analytics/page_report_analyzer.rb +2 -2
- data/lib/sentiero/analytics/scroll_depth_analyzer.rb +1 -1
- data/lib/sentiero/analytics/segmenter.rb +16 -2
- data/lib/sentiero/analytics/stats_aggregator/result_builder.rb +2 -0
- data/lib/sentiero/analytics/stats_aggregator.rb +45 -6
- data/lib/sentiero/analytics/web_vitals_analyzer.rb +2 -2
- data/lib/sentiero/configuration.rb +29 -0
- data/lib/sentiero/fingerprint/config.rb +40 -0
- data/lib/sentiero/fingerprint.rb +45 -11
- data/lib/sentiero/geo.rb +86 -0
- data/lib/sentiero/reporter.rb +2 -1
- data/lib/sentiero/store/session_store.rb +62 -3
- data/lib/sentiero/store.rb +7 -0
- data/lib/sentiero/stores/file.rb +5 -1
- data/lib/sentiero/stores/memory.rb +15 -3
- data/lib/sentiero/stores/redis.rb +17 -5
- data/lib/sentiero/stores/sqlite/payload_codec.rb +42 -0
- data/lib/sentiero/stores/sqlite/schema.rb +72 -6
- data/lib/sentiero/stores/sqlite.rb +216 -101
- data/lib/sentiero/version.rb +1 -1
- data/lib/sentiero/web/analytics_app.rb +10 -0
- data/lib/sentiero/web/assets/dashboard-YINQE5ZH.js +3 -0
- data/lib/sentiero/web/assets/manifest.json +4 -4
- data/lib/sentiero/web/assets/recorder-W2RCU5VM.js +78 -0
- data/lib/sentiero/web/assets/rrweb-player-d522d74c.js +201 -0
- data/lib/sentiero/web/assets/{style-d71e72fd.css → style-80e536e6.css} +1 -1
- data/lib/sentiero/web/body_reader.rb +21 -10
- data/lib/sentiero/web/dashboard_app.rb +77 -5
- data/lib/sentiero/web/errors_app.rb +14 -1
- data/lib/sentiero/web/events_app.rb +6 -1
- data/lib/sentiero/web/ingest_app.rb +1 -1
- data/lib/sentiero/web/templates/client_error_show.html.erb +6 -1
- data/lib/sentiero/web/templates/dashboard.html.erb +7 -0
- data/lib/sentiero/web/templates/maintenance.html.erb +50 -0
- data/lib/sentiero/web/templates/segments.html.erb +9 -0
- data/lib/sentiero/web/templates/sessions_index.html.erb +12 -4
- data/lib/sentiero/web/views/analytics_index_view.rb +7 -1
- data/lib/sentiero/web/views/client_error_show_view.rb +1 -1
- data/lib/sentiero/web/views/maintenance_view.rb +27 -0
- data/lib/sentiero/web/views/segments_view.rb +3 -2
- data/lib/sentiero/web/views/sessions_index_view.rb +6 -2
- data/lib/sentiero/web/views.rb +1 -0
- data/lib/sentiero.rb +1 -0
- metadata +10 -5
- data/lib/sentiero/web/assets/dashboard-JFYNHZZV.js +0 -3
- data/lib/sentiero/web/assets/recorder-SLLXSUUX.js +0 -71
- data/lib/sentiero/web/assets/rrweb-player-cd435a95.js +0 -126
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
(function (g, f) {
|
|
2
|
+
if ("object" == typeof exports && "object" == typeof module) {
|
|
3
|
+
module.exports = f();
|
|
4
|
+
} else if ("function" == typeof define && define.amd) {
|
|
5
|
+
define("rrwebPlayer", [], f);
|
|
6
|
+
} else if ("object" == typeof exports) {
|
|
7
|
+
exports["rrwebPlayer"] = f();
|
|
8
|
+
} else {
|
|
9
|
+
g["rrwebPlayer"] = f();
|
|
10
|
+
}
|
|
11
|
+
}(this, () => {
|
|
12
|
+
var exports = {};
|
|
13
|
+
var module = { exports };
|
|
14
|
+
"use strict";var Co=Object.defineProperty,xo=Object.defineProperties;var Ro=Object.getOwnPropertyDescriptors;var nt=Object.getOwnPropertySymbols;var Mi=Object.prototype.hasOwnProperty,Ni=Object.prototype.propertyIsEnumerable;var Ri=(e,t,r)=>t in e?Co(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,H=(e,t)=>{for(var r in t||(t={}))Mi.call(t,r)&&Ri(e,r,t[r]);if(nt)for(var r of nt(t))Ni.call(t,r)&&Ri(e,r,t[r]);return e},le=(e,t)=>xo(e,Ro(t));var He=(e,t)=>{var r={};for(var s in e)Mi.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&nt)for(var s of nt(e))t.indexOf(s)<0&&Ni.call(e,s)&&(r[s]=e[s]);return r};var Mo=Object.defineProperty,No=(e,t,r)=>t in e?Mo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_i=(e,t,r)=>No(e,typeof t!="symbol"?t+"":t,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function et(){}function Oi(e,t){for(const r in t)e[r]=t[r];return e}function Sn(e){return e()}function Ai(){return Object.create(null)}function Ge(e){e.forEach(Sn)}function En(e){return typeof e=="function"}function ti(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function _o(e){return Object.keys(e).length===0}function Di(e){const t={};for(const r in e)r[0]!=="$"&&(t[r]=e[r]);return t}function $(e,t){e.appendChild(t)}function Ee(e,t,r){e.insertBefore(t,r||null)}function ve(e){e.parentNode&&e.parentNode.removeChild(e)}function Lt(e,t){for(let r=0;r<e.length;r+=1)e[r]&&e[r].d(t)}function oe(e){return document.createElement(e)}function gt(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function De(e){return document.createTextNode(e)}function he(){return De(" ")}function Oo(){return De("")}function ze(e,t,r,s){return e.addEventListener(t,r,s),()=>e.removeEventListener(t,r,s)}function F(e,t,r){r==null?e.removeAttribute(t):e.getAttribute(t)!==r&&e.setAttribute(t,r)}function Ao(e){return Array.from(e.childNodes)}function yt(e,t){t=""+t,e.data!==t&&(e.data=t)}function se(e,t,r,s){r==null?e.style.removeProperty(t):e.style.setProperty(t,r,"")}function Ve(e,t,r){e.classList.toggle(t,!!r)}function Do(e,t,{bubbles:r=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:r,cancelable:s})}let tt;function Qe(e){tt=e}function Et(){if(!tt)throw new Error("Function called outside component initialization");return tt}function Cn(e){Et().$$.on_mount.push(e)}function Po(e){Et().$$.after_update.push(e)}function xn(e){Et().$$.on_destroy.push(e)}function To(){const e=Et();return(t,r,{cancelable:s=!1}={})=>{const i=e.$$.callbacks[t];if(i){const a=Do(t,r,{cancelable:s});return i.slice().forEach(o=>{o.call(e,a)}),!a.defaultPrevented}return!0}}const Le=[],Ae=[];let We=[];const Gr=[],ko=Promise.resolve();let $r=!1;function Io(){$r||($r=!0,ko.then(Rn))}function Hr(e){We.push(e)}function Lo(e){Gr.push(e)}const Ft=new Set;let ke=0;function Rn(){if(ke!==0)return;const e=tt;do{try{for(;ke<Le.length;){const t=Le[ke];ke++,Qe(t),Fo(t.$$)}}catch(t){throw Le.length=0,ke=0,t}for(Qe(null),Le.length=0,ke=0;Ae.length;)Ae.pop()();for(let t=0;t<We.length;t+=1){const r=We[t];Ft.has(r)||(Ft.add(r),r())}We.length=0}while(Le.length);for(;Gr.length;)Gr.pop()();$r=!1,Ft.clear(),Qe(e)}function Fo(e){if(e.fragment!==null){e.update(),Ge(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Hr)}}function Uo(e){const t=[],r=[];We.forEach(s=>e.indexOf(s)===-1?t.push(s):r.push(s)),r.forEach(s=>s()),We=t}const mt=new Set;let Oe;function Mn(){Oe={r:0,c:[],p:Oe}}function Nn(){Oe.r||Ge(Oe.c),Oe=Oe.p}function Se(e,t){e&&e.i&&(mt.delete(e),e.i(t))}function je(e,t,r,s){if(e&&e.o){if(mt.has(e))return;mt.add(e),Oe.c.push(()=>{mt.delete(e),s&&(r&&e.d(1),s())}),e.o(t)}else s&&s()}function Ie(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Bo(e,t,r){const s=e.$$.props[t];s!==void 0&&(e.$$.bound[s]=r,r(e.$$.ctx[s]))}function _n(e){e&&e.c()}function ri(e,t,r){const{fragment:s,after_update:i}=e.$$;s&&s.m(t,r),Hr(()=>{const a=e.$$.on_mount.map(Sn).filter(En);e.$$.on_destroy?e.$$.on_destroy.push(...a):Ge(a),e.$$.on_mount=[]}),i.forEach(Hr)}function ii(e,t){const r=e.$$;r.fragment!==null&&(Uo(r.after_update),Ge(r.on_destroy),r.fragment&&r.fragment.d(t),r.on_destroy=r.fragment=null,r.ctx=[])}function zo(e,t){e.$$.dirty[0]===-1&&(Le.push(e),Io(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function si(e,t,r,s,i,a,o=null,l=[-1]){const u=tt;Qe(e);const c=e.$$={fragment:null,ctx:[],props:a,update:et,not_equal:i,bound:Ai(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Ai(),dirty:l,skip_bound:!1,root:t.target||u.$$.root};o&&o(c.root);let n=!1;if(c.ctx=r?r(e,t.props||{},(p,f,...h)=>{const d=h.length?h[0]:f;return c.ctx&&i(c.ctx[p],c.ctx[p]=d)&&(!c.skip_bound&&c.bound[p]&&c.bound[p](d),n&&zo(e,p)),f}):[],c.update(),n=!0,Ge(c.before_update),c.fragment=s?s(c.ctx):!1,t.target){if(t.hydrate){const p=Ao(t.target);c.fragment&&c.fragment.l(p),p.forEach(ve)}else c.fragment&&c.fragment.c();t.intro&&Se(e.$$.fragment),ri(e,t.target,t.anchor),Rn()}Qe(u)}class ni{constructor(){_i(this,"$$"),_i(this,"$$set")}$destroy(){ii(this,1),this.$destroy=et}$on(t,r){if(!En(r))return et;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(r),()=>{const i=s.indexOf(r);i!==-1&&s.splice(i,1)}}$set(t){this.$$set&&!_o(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const qo="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(qo);var Wo=Object.defineProperty,Vo=(e,t,r)=>t in e?Wo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t,r)=>Vo(e,typeof t!="symbol"?t+"":t,r),Pi,jo=Object.defineProperty,Go=(e,t,r)=>t in e?jo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ti=(e,t,r)=>Go(e,typeof t!="symbol"?t+"":t,r),re=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(re||{});Date.now().toString();function $o(e){return e.nodeType===e.ELEMENT_NODE}class On{constructor(){Ti(this,"idNodeMap",new Map),Ti(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function An(){return new On}function Ho(e){return e.toLowerCase()}function Yo(e,t){return!e||!t||e.type!==t.type?!1:e.type===re.Document?e.compatMode===t.compatMode:e.type===re.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===re.Comment||e.type===re.Text||e.type===re.CDATA?e.textContent===t.textContent:e.type===re.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function Jo(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(s);return(a=i==null?void 0:i[1])!=null?a:null}const Xo=/(max|min)-device-(width|height)/,ki=new RegExp(Xo.source,"g"),Qo={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(ki)&&(e.params=e.params.replace(ki,"$1-$2"))}}}},Ko={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
|
|
15
|
+
`+r.replace(/:hover/g,".\\:hover"))}))}}}};function Zo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ea(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var ot={exports:{}},Ii;function ta(){if(Ii)return ot.exports;Ii=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return ot.exports=t(),ot.exports.createColors=t,ot.exports}const ra={},ia=Object.freeze(Object.defineProperty({__proto__:null,default:ra},Symbol.toStringTag,{value:"Module"})),me=ea(ia);var Ut,Li;function oi(){if(Li)return Ut;Li=1;let e=ta(),t=me;class r extends Error{constructor(i,a,o,l,u,c){super(i),this.name="CssSyntaxError",this.reason=i,u&&(this.file=u),l&&(this.source=l),c&&(this.plugin=c),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported),t&&i&&(a=t(a));let o=a.split(/\r?\n/),l=Math.max(this.line-3,0),u=Math.min(this.line+2,o.length),c=String(u).length,n,p;if(i){let{bold:f,gray:h,red:d}=e.createColors(!0);n=m=>f(d(m)),p=m=>h(m)}else n=p=f=>f;return o.slice(l,u).map((f,h)=>{let d=l+1+h,m=" "+(" "+d).slice(-c)+" | ";if(d===this.line){let g=p(m.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+p(m)+f+`
|
|
16
|
+
`+g+n("^")}return" "+p(m)+f}).join(`
|
|
17
|
+
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
18
|
+
|
|
19
|
+
`+i+`
|
|
20
|
+
`),this.name+": "+this.message+i}}return Ut=r,r.default=r,Ut}var at={},Fi;function ai(){return Fi||(Fi=1,at.isClean=Symbol("isClean"),at.my=Symbol("my")),at}var Bt,Ui;function Dn(){if(Ui)return Bt;Ui=1;const e={after:`
|
|
21
|
+
`,beforeClose:`
|
|
22
|
+
`,beforeComment:`
|
|
23
|
+
`,beforeDecl:`
|
|
24
|
+
`,beforeOpen:" ",beforeRule:`
|
|
25
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(i){this.builder=i}atrule(i,a){let o="@"+i.name,l=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?o+=i.raws.afterName:l&&(o+=" "),i.nodes)this.block(i,o+l);else{let u=(i.raws.between||"")+(a?";":"");this.builder(o+l+u,i)}}beforeAfter(i,a){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):a==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let l=i.parent,u=0;for(;l&&l.type!=="root";)u+=1,l=l.parent;if(o.includes(`
|
|
26
|
+
`)){let c=this.raw(i,null,"indent");if(c.length)for(let n=0;n<u;n++)o+=c}return o}block(i,a){let o=this.raw(i,"between","beforeOpen");this.builder(a+o+"{",i,"start");let l;i.nodes&&i.nodes.length?(this.body(i),l=this.raw(i,"after")):l=this.raw(i,"after","emptyBody"),l&&this.builder(l),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let o=this.raw(i,"semicolon");for(let l=0;l<i.nodes.length;l++){let u=i.nodes[l],c=this.raw(u,"before");c&&this.builder(c),this.stringify(u,a!==l||o)}}comment(i){let a=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+o+"*/",i)}decl(i,a){let o=this.raw(i,"between","colon"),l=i.prop+o+this.rawValue(i,"value");i.important&&(l+=i.raws.important||" !important"),a&&(l+=";"),this.builder(l,i)}document(i){this.body(i)}raw(i,a,o){let l;if(o||(o=a),a&&(l=i.raws[a],typeof l!="undefined"))return l;let u=i.parent;if(o==="before"&&(!u||u.type==="root"&&u.first===i||u&&u.type==="document"))return"";if(!u)return e[o];let c=i.root();if(c.rawCache||(c.rawCache={}),typeof c.rawCache[o]!="undefined")return c.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let n="raw"+t(o);this[n]?l=this[n](c,i):c.walk(p=>{if(l=p.raws[a],typeof l!="undefined")return!1})}return typeof l=="undefined"&&(l=e[o]),c.rawCache[o]=l,l}rawBeforeClose(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after!="undefined")return a=o.raws.after,a.includes(`
|
|
27
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let o;return i.walkComments(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
|
|
28
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,a){let o;return i.walkDecls(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
|
|
29
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let a;return i.walk(o=>{if(o.type!=="decl"&&(a=o.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before!="undefined")return a=o.raws.before,a.includes(`
|
|
30
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(o=>{if(typeof o.raws.between!="undefined")return a=o.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(a=o.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before!="undefined"){let u=o.raws.before.split(`
|
|
31
|
+
`);return a=u[u.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],l=i.raws[a];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return Bt=r,r.default=r,Bt}var zt,Bi;function Ct(){if(Bi)return zt;Bi=1;let e=Dn();function t(r,s){new e(s).stringify(r)}return zt=t,t.default=t,zt}var qt,zi;function xt(){if(zi)return qt;zi=1;let{isClean:e,my:t}=ai(),r=oi(),s=Dn(),i=Ct();function a(l,u){let c=new l.constructor;for(let n in l){if(!Object.prototype.hasOwnProperty.call(l,n)||n==="proxyCache")continue;let p=l[n],f=typeof p;n==="parent"&&f==="object"?u&&(c[n]=u):n==="source"?c[n]=p:Array.isArray(p)?c[n]=p.map(h=>a(h,c)):(f==="object"&&p!==null&&(p=a(p)),c[n]=p)}return c}class o{constructor(u={}){this.raws={},this[e]=!1,this[t]=!0;for(let c in u)if(c==="nodes"){this.nodes=[];for(let n of u[c])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[c]=u[c]}addToError(u){if(u.postcssNode=this,u.stack&&this.source&&/\n\s{4}at /.test(u.stack)){let c=this.source;u.stack=u.stack.replace(/\n\s{4}at /,`$&${c.input.from}:${c.start.line}:${c.start.column}$&`)}return u}after(u){return this.parent.insertAfter(this,u),this}assign(u={}){for(let c in u)this[c]=u[c];return this}before(u){return this.parent.insertBefore(this,u),this}cleanRaws(u){delete this.raws.before,delete this.raws.after,u||delete this.raws.between}clone(u={}){let c=a(this);for(let n in u)c[n]=u[n];return c}cloneAfter(u={}){let c=this.clone(u);return this.parent.insertAfter(this,c),c}cloneBefore(u={}){let c=this.clone(u);return this.parent.insertBefore(this,c),c}error(u,c={}){if(this.source){let{end:n,start:p}=this.rangeBy(c);return this.source.input.error(u,{column:p.column,line:p.line},{column:n.column,line:n.line},c)}return new r(u)}getProxyProcessor(){return{get(u,c){return c==="proxyOf"?u:c==="root"?()=>u.root().toProxy():u[c]},set(u,c,n){return u[c]===n||(u[c]=n,(c==="prop"||c==="value"||c==="name"||c==="params"||c==="important"||c==="text")&&u.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let u=this;for(;u=u.parent;)u[e]=!1}}next(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u+1]}positionBy(u,c){let n=this.source.start;if(u.index)n=this.positionInside(u.index,c);else if(u.word){c=this.toString();let p=c.indexOf(u.word);p!==-1&&(n=this.positionInside(p,c))}return n}positionInside(u,c){let n=c||this.toString(),p=this.source.start.column,f=this.source.start.line;for(let h=0;h<u;h++)n[h]===`
|
|
32
|
+
`?(p=1,f+=1):p+=1;return{column:p,line:f}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u){let c={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:c.column+1,line:c.line};if(u.word){let p=this.toString(),f=p.indexOf(u.word);f!==-1&&(c=this.positionInside(f,p),n=this.positionInside(f+u.word.length,p))}else u.start?c={column:u.start.column,line:u.start.line}:u.index&&(c=this.positionInside(u.index)),u.end?n={column:u.end.column,line:u.end.line}:typeof u.endIndex=="number"?n=this.positionInside(u.endIndex):u.index&&(n=this.positionInside(u.index+1));return(n.line<c.line||n.line===c.line&&n.column<=c.column)&&(n={column:c.column+1,line:c.line}),{end:n,start:c}}raw(u,c){return new s().raw(this,u,c)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let c=this,n=!1;for(let p of u)p===this?n=!0:n?(this.parent.insertAfter(c,p),c=p):this.parent.insertBefore(c,p);n||this.remove()}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,c){let n={},p=c==null;c=c||new Map;let f=0;for(let h in this){if(!Object.prototype.hasOwnProperty.call(this,h)||h==="parent"||h==="proxyCache")continue;let d=this[h];if(Array.isArray(d))n[h]=d.map(m=>typeof m=="object"&&m.toJSON?m.toJSON(null,c):m);else if(typeof d=="object"&&d.toJSON)n[h]=d.toJSON(null,c);else if(h==="source"){let m=c.get(d.input);m==null&&(m=f,c.set(d.input,f),f++),n[h]={end:d.end,inputId:m,start:d.start}}else n[h]=d}return p&&(n.inputs=[...c.keys()].map(h=>h.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=i){u.stringify&&(u=u.stringify);let c="";return u(this,n=>{c+=n}),c}warn(u,c,n){let p={node:this};for(let f in n)p[f]=n[f];return u.warn(c,p)}get proxyOf(){return this}}return qt=o,o.default=o,qt}var Wt,qi;function Rt(){if(qi)return Wt;qi=1;let e=xt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=le(H({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Wt=t,t.default=t,Wt}var Vt,Wi;function sa(){if(Wi)return Vt;Wi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Vt={nanoid:(s=21)=>{let i="",a=s;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a;for(;l--;)o+=s[Math.random()*s.length|0];return o}},Vt}var jt,Vi;function Pn(){if(Vi)return jt;Vi=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=me,{existsSync:r,readFileSync:s}=me,{dirname:i,join:a}=me;function o(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class l{constructor(c,n){if(n.map===!1)return;this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let p=n.map?n.map.prev:void 0,f=this.loadMap(n.from,p);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=i(this.mapFile)),f&&(this.text=f)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(c){let n=/^data:application\/json;charset=utf-?8;base64,/,p=/^data:application\/json;base64,/,f=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/;if(f.test(c)||h.test(c))return decodeURIComponent(c.substr(RegExp.lastMatch.length));if(n.test(c)||p.test(c))return o(c.substr(RegExp.lastMatch.length));let d=c.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+d)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let n=c.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let p=c.lastIndexOf(n.pop()),f=c.indexOf("*/",p);p>-1&&f>-1&&(this.annotation=this.getAnnotationURL(c.substring(p,f)))}loadFile(c){if(this.root=i(c),r(c))return this.mapFile=c,s(c,"utf-8").toString().trim()}loadMap(c,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let p=n(c);if(p){let f=this.loadFile(p);if(!f)throw new Error("Unable to load previous source map: "+p.toString());return f}}else{if(n instanceof e)return t.fromSourceMap(n).toString();if(n instanceof t)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let p=this.annotation;return c&&(p=a(i(c),p)),this.loadFile(p)}}}startWith(c,n){return c?c.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return jt=l,l.default=l,jt}var Gt,ji;function Mt(){if(ji)return Gt;ji=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=me,{fileURLToPath:r,pathToFileURL:s}=me,{isAbsolute:i,resolve:a}=me,{nanoid:o}=sa(),l=me,u=oi(),c=Pn(),n=Symbol("fromOffsetCache"),p=!!(e&&t),f=!!(a&&i);class h{constructor(m,g={}){if(m===null||typeof m=="undefined"||typeof m=="object"&&!m.toString)throw new Error(`PostCSS received ${m} instead of CSS string`);if(this.css=m.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!f||/^\w+:\/\//.test(g.from)||i(g.from)?this.file=g.from:this.file=a(g.from)),f&&p){let b=new c(this.css,g);if(b.text){this.map=b;let w=b.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(m,g,b,w={}){let S,E,y;if(g&&typeof g=="object"){let C=g,x=b;if(typeof C.offset=="number"){let A=this.fromOffset(C.offset);g=A.line,b=A.col}else g=C.line,b=C.column;if(typeof x.offset=="number"){let A=this.fromOffset(x.offset);E=A.line,y=A.col}else E=x.line,y=x.column}else if(!b){let C=this.fromOffset(g);g=C.line,b=C.col}let v=this.origin(g,b,E,y);return v?S=new u(m,v.endLine===void 0?v.line:{column:v.column,line:v.line},v.endLine===void 0?v.column:{column:v.endColumn,line:v.endLine},v.source,v.file,w.plugin):S=new u(m,E===void 0?g:{column:b,line:g},E===void 0?b:{column:y,line:E},this.css,this.file,w.plugin),S.input={column:b,endColumn:y,endLine:E,line:g,source:this.css},this.file&&(s&&(S.input.url=s(this.file).toString()),S.input.file=this.file),S}fromOffset(m){let g,b;if(this[n])b=this[n];else{let S=this.css.split(`
|
|
33
|
+
`);b=new Array(S.length);let E=0;for(let y=0,v=S.length;y<v;y++)b[y]=E,E+=S[y].length+1;this[n]=b}g=b[b.length-1];let w=0;if(m>=g)w=b.length-1;else{let S=b.length-2,E;for(;w<S;)if(E=w+(S-w>>1),m<b[E])S=E-1;else if(m>=b[E+1])w=E+1;else{w=E;break}}return{col:m-b[w]+1,line:w+1}}mapResolve(m){return/^\w+:\/\//.test(m)?m:a(this.map.consumer().sourceRoot||this.map.root||".",m)}origin(m,g,b,w){if(!this.map)return!1;let S=this.map.consumer(),E=S.originalPositionFor({column:g,line:m});if(!E.source)return!1;let y;typeof b=="number"&&(y=S.originalPositionFor({column:w,line:b}));let v;i(E.source)?v=s(E.source):v=new URL(E.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let C={column:E.column,endColumn:y&&y.column,endLine:y&&y.line,line:E.line,url:v.toString()};if(v.protocol==="file:")if(r)C.file=r(v);else throw new Error("file: protocol is not available in this PostCSS build");let x=S.sourceContentFor(E.source);return x&&(C.source=x),C}toJSON(){let m={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(m[g]=this[g]);return this.map&&(m.map=H({},this.map),m.map.consumerCache&&(m.map.consumerCache=void 0)),m}get from(){return this.file||this.id}}return Gt=h,h.default=h,l&&l.registerInput&&l.registerInput(h),Gt}var $t,Gi;function Tn(){if(Gi)return $t;Gi=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=me,{dirname:r,relative:s,resolve:i,sep:a}=me,{pathToFileURL:o}=me,l=Mt(),u=!!(e&&t),c=!!(r&&i&&s&&a);class n{constructor(f,h,d,m){this.stringify=f,this.mapOpts=d.map||{},this.root=h,this.opts=d,this.css=m,this.originalCSS=m,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let f;this.isInline()?f="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?f=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?f=this.mapOpts.annotation(this.opts.to,this.root):f=this.outputFile()+".map";let h=`
|
|
34
|
+
`;this.css.includes(`\r
|
|
35
|
+
`)&&(h=`\r
|
|
36
|
+
`),this.css+=h+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let h=this.toUrl(this.path(f.file)),d=f.root||r(f.file),m;this.mapOpts.sourcesContent===!1?(m=new e(f.text),m.sourcesContent&&(m.sourcesContent=null)):m=f.consumer(),this.map.applySourceMap(m,h,this.toUrl(this.path(d)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let f;for(let h=this.root.nodes.length-1;h>=0;h--)f=this.root.nodes[h],f.type==="comment"&&f.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&u&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,h=>{f+=h}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=t.fromSourceMap(f,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,h=1,d="<no source>",m={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(w,S,E)=>{if(this.css+=w,S&&E!=="end"&&(m.generated.line=f,m.generated.column=h-1,S.source&&S.source.start?(m.source=this.sourcePath(S),m.original.line=S.source.start.line,m.original.column=S.source.start.column-1,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,this.map.addMapping(m))),g=w.match(/\n/g),g?(f+=g.length,b=w.lastIndexOf(`
|
|
37
|
+
`),h=w.length-b):h+=w.length,S&&E!=="start"){let y=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==y.last||y.raws.semicolon)&&(S.source&&S.source.end?(m.source=this.sourcePath(S),m.original.line=S.source.end.line,m.original.column=S.source.end.column-1,m.generated.line=f,m.generated.column=h-2,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=h-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(h=>h.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let h=this.memoizedPaths.get(f);if(h)return h;let d=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(d=r(i(d,this.mapOpts.annotation)));let m=s(d,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let h=f.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(h=>{if(h.source){let d=h.source.input.from;if(d&&!f[d]){f[d]=!0;let m=this.usesFileUrls?this.toFileUrl(d):this.toUrl(this.path(d));this.map.setSourceContent(m,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let h=this.memoizedFileURLs.get(f);if(h)return h;if(o){let d=o(f).toString();return this.memoizedFileURLs.set(f,d),d}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let h=this.memoizedURLs.get(f);if(h)return h;a==="\\"&&(f=f.replace(/\\/g,"/"));let d=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,d),d}}return $t=n,$t}var Ht,$i;function Nt(){if($i)return Ht;$i=1;let e=xt();class t extends e{constructor(s){super(s),this.type="comment"}}return Ht=t,t.default=t,Ht}var Yt,Hi;function Pe(){if(Hi)return Yt;Hi=1;let{isClean:e,my:t}=ai(),r=Rt(),s=Nt(),i=xt(),a,o,l,u;function c(f){return f.map(h=>(h.nodes&&(h.nodes=c(h.nodes)),delete h.source,h))}function n(f){if(f[e]=!1,f.proxyOf.nodes)for(let h of f.proxyOf.nodes)n(h)}class p extends i{append(...h){for(let d of h){let m=this.normalize(d,this.last);for(let g of m)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let d of this.nodes)d.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let d=this.getIterator(),m,g;for(;this.indexes[d]<this.proxyOf.nodes.length&&(m=this.indexes[d],g=h(this.proxyOf.nodes[m],m),g!==!1);)this.indexes[d]+=1;return delete this.indexes[d],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,d){return d==="proxyOf"?h:h[d]?d==="each"||typeof d=="string"&&d.startsWith("walk")?(...m)=>h[d](...m.map(g=>typeof g=="function"?(b,w)=>g(b.toProxy(),w):g)):d==="every"||d==="some"?m=>h[d]((g,...b)=>m(g.toProxy(),...b)):d==="root"?()=>h.root().toProxy():d==="nodes"?h.nodes.map(m=>m.toProxy()):d==="first"||d==="last"?h[d].toProxy():h[d]:h[d]},set(h,d,m){return h[d]===m||(h[d]=m,(d==="name"||d==="params"||d==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,d){let m=this.index(h),g=this.normalize(d,this.proxyOf.nodes[m]).reverse();m=this.index(h);for(let w of g)this.proxyOf.nodes.splice(m+1,0,w);let b;for(let w in this.indexes)b=this.indexes[w],m<b&&(this.indexes[w]=b+g.length);return this.markDirty(),this}insertBefore(h,d){let m=this.index(h),g=m===0?"prepend":!1,b=this.normalize(d,this.proxyOf.nodes[m],g).reverse();m=this.index(h);for(let S of b)this.proxyOf.nodes.splice(m,0,S);let w;for(let S in this.indexes)w=this.indexes[S],m<=w&&(this.indexes[S]=w+b.length);return this.markDirty(),this}normalize(h,d){if(typeof h=="string")h=c(a(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new r(h)]}else if(h.selector)h=[new o(h)];else if(h.name)h=[new l(h)];else if(h.text)h=[new s(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[t]||p.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&n(g),typeof g.raws.before=="undefined"&&d&&typeof d.raws.before!="undefined"&&(g.raws.before=d.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let d of h){let m=this.normalize(d,this.first,"prepend").reverse();for(let g of m)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+m.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let d;for(let m in this.indexes)d=this.indexes[m],d>=h&&(this.indexes[m]=d-1);return this.markDirty(),this}replaceValues(h,d,m){return m||(m=d,d={}),this.walkDecls(g=>{d.props&&!d.props.includes(g.prop)||d.fast&&!g.value.includes(d.fast)||(g.value=g.value.replace(h,m))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((d,m)=>{let g;try{g=h(d,m)}catch(b){throw d.addToError(b)}return g!==!1&&d.walk&&(g=d.walk(h)),g})}walkAtRules(h,d){return d?h instanceof RegExp?this.walk((m,g)=>{if(m.type==="atrule"&&h.test(m.name))return d(m,g)}):this.walk((m,g)=>{if(m.type==="atrule"&&m.name===h)return d(m,g)}):(d=h,this.walk((m,g)=>{if(m.type==="atrule")return d(m,g)}))}walkComments(h){return this.walk((d,m)=>{if(d.type==="comment")return h(d,m)})}walkDecls(h,d){return d?h instanceof RegExp?this.walk((m,g)=>{if(m.type==="decl"&&h.test(m.prop))return d(m,g)}):this.walk((m,g)=>{if(m.type==="decl"&&m.prop===h)return d(m,g)}):(d=h,this.walk((m,g)=>{if(m.type==="decl")return d(m,g)}))}walkRules(h,d){return d?h instanceof RegExp?this.walk((m,g)=>{if(m.type==="rule"&&h.test(m.selector))return d(m,g)}):this.walk((m,g)=>{if(m.type==="rule"&&m.selector===h)return d(m,g)}):(d=h,this.walk((m,g)=>{if(m.type==="rule")return d(m,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return p.registerParse=f=>{a=f},p.registerRule=f=>{o=f},p.registerAtRule=f=>{l=f},p.registerRoot=f=>{u=f},Yt=p,p.default=p,p.rebuild=f=>{f.type==="atrule"?Object.setPrototypeOf(f,l.prototype):f.type==="rule"?Object.setPrototypeOf(f,o.prototype):f.type==="decl"?Object.setPrototypeOf(f,r.prototype):f.type==="comment"?Object.setPrototypeOf(f,s.prototype):f.type==="root"&&Object.setPrototypeOf(f,u.prototype),f[t]=!0,f.nodes&&f.nodes.forEach(h=>{p.rebuild(h)})},Yt}var Jt,Yi;function li(){if(Yi)return Jt;Yi=1;let e=Pe(),t,r;class s extends e{constructor(a){super(H({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Jt=s,s.default=s,Jt}var Xt,Ji;function kn(){if(Ji)return Xt;Ji=1;let e={};return Xt=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Xt}var Qt,Xi;function In(){if(Xi)return Qt;Xi=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Qt=e,e.default=e,Qt}var Kt,Qi;function ui(){if(Qi)return Kt;Qi=1;let e=In();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return Kt=t,t.default=t,Kt}var Zt,Ki;function na(){if(Ki)return Zt;Ki=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,u=13,c=91,n=93,p=40,f=41,h=123,d=125,m=59,g=42,b=58,w=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,v=/[\da-f]/i;return Zt=function(x,A={}){let M=x.css.valueOf(),z=A.ignoreErrors,k,R,W,K,B,U,J,ee,q,I,ae=M.length,N=0,D=[],O=[];function _(){return N}function P(ie){throw x.error("Unclosed "+ie,N)}function j(){return O.length===0&&N>=ae}function ue(ie){if(O.length)return O.pop();if(N>=ae)return;let be=ie?ie.ignoreUnclosed:!1;switch(k=M.charCodeAt(N),k){case i:case a:case l:case u:case o:{R=N;do R+=1,k=M.charCodeAt(R);while(k===a||k===i||k===l||k===u||k===o);I=["space",M.slice(N,R)],N=R-1;break}case c:case n:case h:case d:case b:case m:case f:{let _e=String.fromCharCode(k);I=[_e,_e,N];break}case p:{if(ee=D.length?D.pop()[1]:"",q=M.charCodeAt(N+1),ee==="url"&&q!==e&&q!==t&&q!==a&&q!==i&&q!==l&&q!==o&&q!==u){R=N;do{if(U=!1,R=M.indexOf(")",R+1),R===-1)if(z||be){R=N;break}else P("bracket");for(J=R;M.charCodeAt(J-1)===r;)J-=1,U=!U}while(U);I=["brackets",M.slice(N,R+1),N,R],N=R}else R=M.indexOf(")",N+1),K=M.slice(N,R+1),R===-1||y.test(K)?I=["(","(",N]:(I=["brackets",K,N,R],N=R);break}case e:case t:{W=k===e?"'":'"',R=N;do{if(U=!1,R=M.indexOf(W,R+1),R===-1)if(z||be){R=N+1;break}else P("string");for(J=R;M.charCodeAt(J-1)===r;)J-=1,U=!U}while(U);I=["string",M.slice(N,R+1),N,R],N=R;break}case w:{S.lastIndex=N+1,S.test(M),S.lastIndex===0?R=M.length-1:R=S.lastIndex-2,I=["at-word",M.slice(N,R+1),N,R],N=R;break}case r:{for(R=N,B=!0;M.charCodeAt(R+1)===r;)R+=1,B=!B;if(k=M.charCodeAt(R+1),B&&k!==s&&k!==a&&k!==i&&k!==l&&k!==u&&k!==o&&(R+=1,v.test(M.charAt(R)))){for(;v.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}I=["word",M.slice(N,R+1),N,R],N=R;break}default:{k===s&&M.charCodeAt(N+1)===g?(R=M.indexOf("*/",N+2)+1,R===0&&(z||be?R=M.length:P("comment")),I=["comment",M.slice(N,R+1),N,R],N=R):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,I=["word",M.slice(N,R+1),N,R],D.push(I),N=R);break}}return N++,I}function ce(ie){O.push(ie)}return{back:ce,endOfFile:j,nextToken:ue,position:_}},Zt}var er,Zi;function ci(){if(Zi)return er;Zi=1;let e=Pe();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return er=t,t.default=t,e.registerAtRule(t),er}var tr,es;function rt(){if(es)return tr;es=1;let e=Pe(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,l){let u=super.normalize(a);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let c of u)c.raws.before=o.raws.before}return u}removeChild(a,o){let l=this.index(a);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},tr=s,s.default=s,e.registerRoot(s),tr}var rr,ts;function Ln(){if(ts)return rr;ts=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
38
|
+
`," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,u=!1,c="",n=!1;for(let p of t)n?n=!1:p==="\\"?n=!0:u?p===c&&(u=!1):p==='"'||p==="'"?(u=!0,c=p):p==="("?l+=1:p===")"?l>0&&(l-=1):l===0&&r.includes(p)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=p;return(s||a!=="")&&i.push(a.trim()),i}};return rr=e,e.default=e,rr}var ir,rs;function fi(){if(rs)return ir;rs=1;let e=Pe(),t=Ln();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return ir=r,r.default=r,e.registerRule(r),ir}var sr,is;function oa(){if(is)return sr;is=1;let e=Rt(),t=na(),r=Nt(),s=ci(),i=rt(),a=fi();const o={empty:!0,space:!0};function l(c){for(let n=c.length-1;n>=0;n--){let p=c[n],f=p[3]||p[2];if(f)return f}}class u{constructor(n){this.input=n,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let p=new s;p.name=n[1].slice(1),p.name===""&&this.unnamedAtrule(p,n),this.init(p,n[2]);let f,h,d,m=!1,g=!1,b=[],w=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),f=n[0],f==="("||f==="["?w.push(f==="("?")":"]"):f==="{"&&w.length>0?w.push("}"):f===w[w.length-1]&&w.pop(),w.length===0)if(f===";"){p.source.end=this.getPosition(n[2]),p.source.end.offset++,this.semicolon=!0;break}else if(f==="{"){g=!0;break}else if(f==="}"){if(b.length>0){for(d=b.length-1,h=b[d];h&&h[0]==="space";)h=b[--d];h&&(p.source.end=this.getPosition(h[3]||h[2]),p.source.end.offset++)}this.end(n);break}else b.push(n);else b.push(n);if(this.tokenizer.endOfFile()){m=!0;break}}p.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(p.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(p,"params",b),m&&(n=b[b.length-1],p.source.end=this.getPosition(n[3]||n[2]),p.source.end.offset++,this.spaces=p.raws.between,p.raws.between="")):(p.raws.afterName="",p.params=""),g&&(p.nodes=[],this.current=p)}checkMissedSemicolon(n){let p=this.colon(n);if(p===!1)return;let f=0,h;for(let d=p-1;d>=0&&(h=n[d],!(h[0]!=="space"&&(f+=1,f===2)));d--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let p=0,f,h,d;for(let[m,g]of n.entries()){if(f=g,h=f[0],h==="("&&(p+=1),h===")"&&(p-=1),p===0&&h===":")if(!d)this.doubleColon(f);else{if(d[0]==="word"&&d[1]==="progid")continue;return m}d=f}return!1}comment(n){let p=new r;this.init(p,n[2]),p.source.end=this.getPosition(n[3]||n[2]),p.source.end.offset++;let f=n[1].slice(2,-2);if(/^\s*$/.test(f))p.text="",p.raws.left=f,p.raws.right="";else{let h=f.match(/^(\s*)([^]*\S)(\s*)$/);p.text=h[2],p.raws.left=h[1],p.raws.right=h[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(n,p){let f=new e;this.init(f,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),f.source.end=this.getPosition(h[3]||h[2]||l(n)),f.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),f.raws.before+=n.shift()[1];for(f.source.start=this.getPosition(n[0][2]),f.prop="";n.length;){let w=n[0][0];if(w===":"||w==="space"||w==="comment")break;f.prop+=n.shift()[1]}f.raws.between="";let d;for(;n.length;)if(d=n.shift(),d[0]===":"){f.raws.between+=d[1];break}else d[0]==="word"&&/\w/.test(d[1])&&this.unknownWord([d]),f.raws.between+=d[1];(f.prop[0]==="_"||f.prop[0]==="*")&&(f.raws.before+=f.prop[0],f.prop=f.prop.slice(1));let m=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)m.push(n.shift());this.precheckMissedSemicolon(n);for(let w=n.length-1;w>=0;w--){if(d=n[w],d[1].toLowerCase()==="!important"){f.important=!0;let S=this.stringFrom(n,w);S=this.spacesFromEnd(n)+S,S!==" !important"&&(f.raws.important=S);break}else if(d[1].toLowerCase()==="important"){let S=n.slice(0),E="";for(let y=w;y>0;y--){let v=S[y][0];if(E.trim().indexOf("!")===0&&v!=="space")break;E=S.pop()[1]+E}E.trim().indexOf("!")===0&&(f.important=!0,f.raws.important=E,n=S)}if(d[0]!=="space"&&d[0]!=="comment")break}n.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(f.raws.between+=m.map(w=>w[1]).join(""),m=[]),this.raw(f,"value",m.concat(n),p),f.value.includes(":")&&!p&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let p=new a;this.init(p,n[2]),p.selector="",p.raws.between="",this.current=p}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let p=this.current.nodes[this.current.nodes.length-1];p&&p.type==="rule"&&!p.raws.ownSemicolon&&(p.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let p=this.input.fromOffset(n);return{column:p.col,line:p.line,offset:n}}init(n,p){this.current.push(n),n.source={input:this.input,start:this.getPosition(p)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let p=!1,f=null,h=!1,d=null,m=[],g=n[1].startsWith("--"),b=[],w=n;for(;w;){if(f=w[0],b.push(w),f==="("||f==="[")d||(d=w),m.push(f==="("?")":"]");else if(g&&h&&f==="{")d||(d=w),m.push("}");else if(m.length===0)if(f===";")if(h){this.decl(b,g);return}else break;else if(f==="{"){this.rule(b);return}else if(f==="}"){this.tokenizer.back(b.pop()),p=!0;break}else f===":"&&(h=!0);else f===m[m.length-1]&&(m.pop(),m.length===0&&(d=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(p=!0),m.length>0&&this.unclosedBracket(d),p&&h){if(!g)for(;b.length&&(w=b[b.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,p,f,h){let d,m,g=f.length,b="",w=!0,S,E;for(let y=0;y<g;y+=1)d=f[y],m=d[0],m==="space"&&y===g-1&&!h?w=!1:m==="comment"?(E=f[y-1]?f[y-1][0]:"empty",S=f[y+1]?f[y+1][0]:"empty",!o[E]&&!o[S]?b.slice(-1)===","?w=!1:b+=d[1]:w=!1):b+=d[1];if(!w){let y=f.reduce((v,C)=>v+C[1],"");n.raws[p]={raw:y,value:b}}n[p]=b}rule(n){n.pop();let p=new a;this.init(p,n[0][2]),p.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(p,"selector",n),this.current=p}spacesAndCommentsFromEnd(n){let p,f="";for(;n.length&&(p=n[n.length-1][0],!(p!=="space"&&p!=="comment"));)f=n.pop()[1]+f;return f}spacesAndCommentsFromStart(n){let p,f="";for(;n.length&&(p=n[0][0],!(p!=="space"&&p!=="comment"));)f+=n.shift()[1];return f}spacesFromEnd(n){let p,f="";for(;n.length&&(p=n[n.length-1][0],p==="space");)f=n.pop()[1]+f;return f}stringFrom(n,p){let f="";for(let h=p;h<n.length;h++)f+=n[h][1];return n.splice(p,n.length-p),f}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,p){throw this.input.error("At-rule without name",{offset:p[2]},{offset:p[2]+p[1].length})}}return sr=u,sr}var nr,ss;function hi(){if(ss)return nr;ss=1;let e=Pe(),t=oa(),r=Mt();function s(i,a){let o=new r(i,a),l=new t(o);try{l.parse()}catch(u){throw u}return l.root}return nr=s,s.default=s,e.registerParse(s),nr}var or,ns;function Fn(){if(ns)return or;ns=1;let{isClean:e,my:t}=ai(),r=Tn(),s=Ct(),i=Pe(),a=li(),o=kn(),l=ui(),u=hi(),c=rt();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function d(E){return typeof E=="object"&&typeof E.then=="function"}function m(E){let y=!1,v=n[E.type];return E.type==="decl"?y=E.prop.toLowerCase():E.type==="atrule"&&(y=E.name.toLowerCase()),y&&E.append?[v,v+"-"+y,h,v+"Exit",v+"Exit-"+y]:y?[v,v+"-"+y,v+"Exit",v+"Exit-"+y]:E.append?[v,h,v+"Exit"]:[v,v+"Exit"]}function g(E){let y;return E.type==="document"?y=["Document",h,"DocumentExit"]:E.type==="root"?y=["Root",h,"RootExit"]:y=m(E),{eventIndex:0,events:y,iterator:0,node:E,visitorIndex:0,visitors:[]}}function b(E){return E[e]=!1,E.nodes&&E.nodes.forEach(y=>b(y)),E}let w={};class S{constructor(y,v,C){this.stringified=!1,this.processed=!1;let x;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))x=b(v);else if(v instanceof S||v instanceof l)x=b(v.root),v.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=v.map);else{let A=u;C.syntax&&(A=C.syntax.parse),C.parser&&(A=C.parser),A.parse&&(A=A.parse);try{x=A(v,C)}catch(M){this.processed=!0,this.error=M}x&&!x[t]&&i.rebuild(x)}this.result=new l(y,x,C),this.helpers=le(H({},w),{postcss:w,result:this.result}),this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?H(H({},A),A.prepare(this.result)):A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,v){let C=this.result.lastPlugin;try{v&&v.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return y}prepareVisitors(){this.listeners={};let y=(v,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,x])};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!p[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[C])if(typeof v[C]=="object")for(let x in v[C])x==="*"?y(v,C,v[C][x]):y(v,C+"-"+x.toLowerCase(),v[C][x]);else typeof v[C]=="function"&&y(v,C,v[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let v=this.plugins[y],C=this.runOnRoot(v);if(d(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[e];){y[e]=!0;let v=[g(y)];for(;v.length>0;){let C=this.visitTick(v);if(d(C))try{await C}catch(x){let A=v[v.length-1].node;throw this.handleError(x,A)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(y.type==="document"){let x=y.nodes.map(A=>C(A,this.helpers));await Promise.all(x)}else await C(y,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return d(v[0])?Promise.all(v):v}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,v=s;y.syntax&&(v=y.syntax.stringify),y.stringifier&&(v=y.stringifier),v.stringify&&(v=v.stringify);let x=new r(v,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let v=this.runOnRoot(y);if(d(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[e];)y[e]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let v of y.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,v){return this.async().then(y,v)}toString(){return this.css}visitSync(y,v){for(let[C,x]of y){this.result.lastPlugin=C;let A;try{A=x(v,this.helpers)}catch(M){throw this.handleError(M,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return!0;if(d(A))throw this.getAsyncError()}}visitTick(y){let v=y[y.length-1],{node:C,visitors:x}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(x.length>0&&v.visitorIndex<x.length){let[M,z]=x[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===x.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=M;try{return z(C.toProxy(),this.helpers)}catch(k){throw this.handleError(k,C)}}if(v.iterator!==0){let M=v.iterator,z;for(;z=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!z[e]){z[e]=!0,y.push(g(z));return}v.iterator=0,delete C.indexes[M]}let A=v.events;for(;v.eventIndex<A.length;){let M=A[v.eventIndex];if(v.eventIndex+=1,M===h){C.nodes&&C.nodes.length&&(C[e]=!0,v.iterator=C.getIterator());return}else if(this.listeners[M]){v.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[e]=!0;let v=m(y);for(let C of v)if(C===h)y.nodes&&y.each(x=>{x[e]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,y.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return S.registerPostcss=E=>{w=E},or=S,S.default=S,c.registerLazyResult(S),a.registerLazyResult(S),or}var ar,os;function aa(){if(os)return ar;os=1;let e=Tn(),t=Ct(),r=kn(),s=hi();const i=ui();class a{constructor(l,u,c){u=u.toString(),this.stringified=!1,this._processor=l,this._css=u,this._opts=c,this._map=void 0;let n,p=t;this.result=new i(this._processor,n,this._opts),this.result.css=u;let f=this;Object.defineProperty(this.result,"root",{get(){return f.root}});let h=new e(p,n,this._opts,u);if(h.isMap()){let[d,m]=h.generate();d&&(this.result.css=d),m&&(this.result.map=m)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,u){return this.async().then(l,u)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,u=s;try{l=u(this._css,this._opts)}catch(c){this.error=c}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return ar=a,a.default=a,ar}var lr,as;function la(){if(as)return lr;as=1;let e=aa(),t=Fn(),r=li(),s=rt();class i{constructor(o=[]){this.version="8.4.38",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(!(typeof u=="object"&&(u.parse||u.stringify)))throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new e(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return lr=i,i.default=i,s.registerProcessor(i),r.registerProcessor(i),lr}var ur,ls;function ua(){if(ls)return ur;ls=1;let e=Rt(),t=Pn(),r=Nt(),s=ci(),i=Mt(),a=rt(),o=fi();function l(u,c){if(Array.isArray(u))return u.map(d=>l(d));let f=u,{inputs:n}=f,p=He(f,["inputs"]);if(n){c=[];for(let d of n){let m=le(H({},d),{__proto__:i.prototype});m.map&&(m.map=le(H({},m.map),{__proto__:t.prototype})),c.push(m)}}if(p.nodes&&(p.nodes=u.nodes.map(d=>l(d,c))),p.source){let h=p.source,{inputId:d}=h,m=He(h,["inputId"]);p.source=m,d!=null&&(p.source.input=c[d])}if(p.type==="root")return new a(p);if(p.type==="decl")return new e(p);if(p.type==="rule")return new o(p);if(p.type==="comment")return new r(p);if(p.type==="atrule")return new s(p);throw new Error("Unknown node type: "+u.type)}return ur=l,l.default=l,ur}var cr,us;function ca(){if(us)return cr;us=1;let e=oi(),t=Rt(),r=Fn(),s=Pe(),i=la(),a=Ct(),o=ua(),l=li(),u=In(),c=Nt(),n=ci(),p=ui(),f=Mt(),h=hi(),d=Ln(),m=fi(),g=rt(),b=xt();function w(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new i(S)}return w.plugin=function(E,y){let v=!1;function C(...A){console&&console.warn&&!v&&(v=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
39
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
40
|
+
https://www.w3ctech.com/topic/2226`));let M=y(...A);return M.postcssPlugin=E,M.postcssVersion=new i().version,M}let x;return Object.defineProperty(C,"postcss",{get(){return x||(x=C()),x}}),C.process=function(A,M,z){return w([C(z)]).process(A,M)},C},w.stringify=a,w.parse=h,w.fromJSON=o,w.list=d,w.comment=S=>new c(S),w.atRule=S=>new n(S),w.decl=S=>new t(S),w.rule=S=>new m(S),w.root=S=>new g(S),w.document=S=>new l(S),w.CssSyntaxError=e,w.Declaration=t,w.Container=s,w.Processor=i,w.Document=l,w.Comment=c,w.Warning=u,w.AtRule=n,w.Result=p,w.Input=f,w.Rule=m,w.Root=g,w.Node=b,r.registerPostcss(w),cr=w,w.default=w,cr}var fa=ca();const Q=Zo(fa);Q.stringify;Q.fromJSON;Q.plugin;Q.parse;Q.list;Q.document;Q.comment;Q.atRule;Q.rule;Q.decl;Q.root;Q.CssSyntaxError;Q.Declaration;Q.Container;Q.Processor;Q.Document;Q.Comment;Q.Warning;Q.AtRule;Q.Result;Q.Input;Q.Rule;Q.Root;Q.Node;const cs={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function ha(e){let t=cs[e.tagName]?cs[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function _t(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=Q([Qo,Ko]).process(e).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function fs(){return{stylesWithHoverClass:new Map}}const pa="rrweb-snapshot.rebuild() cannot rebuild into an unprotected browser document. Use rebuildIntoSandboxedIframe() or set UNSAFE_allowUnprotectedRebuild: true only when you accept the script-execution risk.",hs="rrweb-snapshot.createSandboxedIframe() requires root to be connected to a document before creating a sandboxed iframe.",Un=new WeakSet;function da(e){if(!e||e.tagName!=="IFRAME"||!("sandbox"in e))return!1;const t=Array.from(e.sandbox);return t.length===1&&t[0]==="allow-same-origin"}function ma(e){if(e.UNSAFE_allowUnprotectedRebuild)return;const t=e.doc.defaultView;if(t&&!(Un.has(e.doc)&&da(t.frameElement)))throw new Error(pa)}function ga(e,t,r,s){const i=[];for(const u of e.childNodes)u.type===re.Text&&i.push(u);const a=t.split("/* rr_split */");for(;a.length>1&&a.length>i.length;)a.splice(-2,2,a.slice(-2).join(""));let o="";r&&(o=_t(a.join(""),s));let l=0;for(let u=0;u<i.length&&u!==a.length;u++){const c=i[u];if(!r)c.textContent=a[u];else if(u<a.length-1){let n=l,p=a[u+1].length;p=Math.min(p,30);let f=!1;for(;p>2;p--){const h=a[u+1].substring(0,p),d=o.substring(l).indexOf(h);if(f=d!==-1,f){n+=d;break}}f||(n+=a[u].length),c.textContent=o.substring(l,n),l=n}else c.textContent=o.substring(l)}}function ya(e,t,r,s){const{doc:i,hackCss:a,cache:o}=s;e.childNodes.length?ga(e,r,a,o):(a&&(r=_t(r,o)),t.appendChild(i.createTextNode(r)))}function wa(e,t){var r;const{doc:s,hackCss:i,cache:a}=t;switch(e.type){case re.Document:return s.implementation.createDocument(null,"",null);case re.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case re.Element:{const o=ha(e);let l;e.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),l=s.createElement(o));const u={};for(const c in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,c))continue;let n=e.attributes[c];if(!(o==="option"&&c==="selected"&&n===!1)&&n!==null){if(n===!0&&(n=""),c.startsWith("rr_")){u[c]=n;continue}if(typeof n=="string"){if(o==="style"&&c==="_cssText"){ya(e,l,n,t);continue}else if(o==="textarea"&&c==="value"){l.appendChild(s.createTextNode(n)),e.childNodes=[];continue}}try{if(e.isSVG&&c==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",c,n.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")l.setAttribute("_"+c,n.toString());else if(o==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){l.setAttribute("csp-content",n.toString());continue}else o==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||o==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Jo(e.attributes.href)==="js"||(o==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",e.attributes.srcset):l.setAttribute(c,n.toString()))}catch(p){}}}for(const c in u){const n=u[c];if(o==="canvas"&&c==="rr_dataURL"){const p=s.createElement("img");p.onload=()=>{const f=l.getContext("2d");f&&f.drawImage(p,0,0,p.width,p.height)},p.src=n.toString(),l.RRNodeType&&(l.rr_dataURL=n.toString())}else if(o==="img"&&c==="rr_dataURL"){const p=l;p.currentSrc.startsWith("data:")||(p.setAttribute("rrweb-original-src",e.attributes.src),p.src=n.toString())}if(c==="rr_width")l.style.setProperty("width",n.toString());else if(c==="rr_height")l.style.setProperty("height",n.toString());else if(c==="rr_mediaCurrentTime"&&typeof n=="number")l.currentTime=n;else if(c==="rr_mediaState")switch(n){case"played":l.play().catch(p=>console.warn("media playback error",p));break;case"paused":l.pause();break}else c==="rr_mediaPlaybackRate"&&typeof n=="number"?l.playbackRate=n:c==="rr_mediaMuted"&&typeof n=="boolean"?l.muted=n:c==="rr_mediaLoop"&&typeof n=="boolean"?l.loop=n:c==="rr_mediaVolume"&&typeof n=="number"?l.volume=n:c==="rr_open_mode"&&l.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case re.Text:return e.isStyle&&i?s.createTextNode(_t(e.textContent,a)):s.createTextNode(e.textContent);case re.CDATA:return s.createCDATASection(e.textContent);case re.Comment:return s.createComment(e.textContent);default:return null}}function Ke(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:l}=t;if(s.has(e.id)){const c=s.getNode(e.id),n=s.getMeta(c);if(Yo(n,e))return s.getNode(e.id)}let u=wa(e,{doc:r,hackCss:a,cache:l});if(!u)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===re.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==re.DocumentType&&(e.childNodes[0].type===re.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),u=r),s.add(u,e),(e.type===re.Document||e.type===re.Element)&&!i)for(const c of e.childNodes){const n=Ke(c,{doc:r,mirror:s,skipChild:!1,hackCss:a,afterAppend:o,cache:l});if(!n){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&$o(u)&&u.shadowRoot)u.shadowRoot.appendChild(n);else if(e.type===re.Document&&c.type==re.Element){const p=n;let f=null;p.childNodes.forEach(h=>{h.nodeName==="BODY"&&(f=h)}),f?(p.removeChild(f),u.appendChild(n),p.appendChild(f)):u.appendChild(n)}else u.appendChild(n);o&&o(n,c.id)}return u}function va(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function ba(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==re.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const a=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=a),i==="rr_scrollTop"&&(s.scrollTop=a)}}function Sa(e,t){ma(t);const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:a,cache:o,mirror:l=new On}=t,u=Ke(e,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return va(l,c=>{s&&s(c),ba(c,l)}),u}function Ea(e){var t;if(!e.root.isConnected)throw new Error(hs);const r=e.root.ownerDocument.createElement("iframe");for(const[i,a]of Object.entries(e.iframeAttributes||{}))i!=="sandbox"&&r.setAttribute(i,a);r.setAttribute("sandbox","allow-same-origin"),e.root.appendChild(r);const s=r.contentDocument;if(!s||!r.contentWindow)throw(t=r.parentNode)==null||t.removeChild(r),new Error(hs);return Un.add(s),r}var Ca=Object.defineProperty,xa=(e,t,r)=>t in e?Ca(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t,r)=>xa(e,typeof t!="symbol"?t+"":t,r),Ra=Object.defineProperty,Ma=(e,t,r)=>t in e?Ra(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ps=(e,t,r)=>Ma(e,typeof t!="symbol"?t+"":t,r);Date.now().toString();let Na=class{constructor(){ps(this,"idNodeMap",new Map),ps(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function _a(){return new Na}function Oa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Aa(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var lt={exports:{}},ds;function Da(){if(ds)return lt.exports;ds=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return lt.exports=t(),lt.exports.createColors=t,lt.exports}const Pa={},Ta=Object.freeze(Object.defineProperty({__proto__:null,default:Pa},Symbol.toStringTag,{value:"Module"})),ge=Aa(Ta);var fr,ms;function pi(){if(ms)return fr;ms=1;let e=Da(),t=ge;class r extends Error{constructor(i,a,o,l,u,c){super(i),this.name="CssSyntaxError",this.reason=i,u&&(this.file=u),l&&(this.source=l),c&&(this.plugin=c),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported),t&&i&&(a=t(a));let o=a.split(/\r?\n/),l=Math.max(this.line-3,0),u=Math.min(this.line+2,o.length),c=String(u).length,n,p;if(i){let{bold:f,gray:h,red:d}=e.createColors(!0);n=m=>f(d(m)),p=m=>h(m)}else n=p=f=>f;return o.slice(l,u).map((f,h)=>{let d=l+1+h,m=" "+(" "+d).slice(-c)+" | ";if(d===this.line){let g=p(m.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+p(m)+f+`
|
|
41
|
+
`+g+n("^")}return" "+p(m)+f}).join(`
|
|
42
|
+
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
43
|
+
|
|
44
|
+
`+i+`
|
|
45
|
+
`),this.name+": "+this.message+i}}return fr=r,r.default=r,fr}var ut={},gs;function di(){return gs||(gs=1,ut.isClean=Symbol("isClean"),ut.my=Symbol("my")),ut}var hr,ys;function Bn(){if(ys)return hr;ys=1;const e={after:`
|
|
46
|
+
`,beforeClose:`
|
|
47
|
+
`,beforeComment:`
|
|
48
|
+
`,beforeDecl:`
|
|
49
|
+
`,beforeOpen:" ",beforeRule:`
|
|
50
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(i){this.builder=i}atrule(i,a){let o="@"+i.name,l=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?o+=i.raws.afterName:l&&(o+=" "),i.nodes)this.block(i,o+l);else{let u=(i.raws.between||"")+(a?";":"");this.builder(o+l+u,i)}}beforeAfter(i,a){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):a==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let l=i.parent,u=0;for(;l&&l.type!=="root";)u+=1,l=l.parent;if(o.includes(`
|
|
51
|
+
`)){let c=this.raw(i,null,"indent");if(c.length)for(let n=0;n<u;n++)o+=c}return o}block(i,a){let o=this.raw(i,"between","beforeOpen");this.builder(a+o+"{",i,"start");let l;i.nodes&&i.nodes.length?(this.body(i),l=this.raw(i,"after")):l=this.raw(i,"after","emptyBody"),l&&this.builder(l),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let o=this.raw(i,"semicolon");for(let l=0;l<i.nodes.length;l++){let u=i.nodes[l],c=this.raw(u,"before");c&&this.builder(c),this.stringify(u,a!==l||o)}}comment(i){let a=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+o+"*/",i)}decl(i,a){let o=this.raw(i,"between","colon"),l=i.prop+o+this.rawValue(i,"value");i.important&&(l+=i.raws.important||" !important"),a&&(l+=";"),this.builder(l,i)}document(i){this.body(i)}raw(i,a,o){let l;if(o||(o=a),a&&(l=i.raws[a],typeof l!="undefined"))return l;let u=i.parent;if(o==="before"&&(!u||u.type==="root"&&u.first===i||u&&u.type==="document"))return"";if(!u)return e[o];let c=i.root();if(c.rawCache||(c.rawCache={}),typeof c.rawCache[o]!="undefined")return c.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let n="raw"+t(o);this[n]?l=this[n](c,i):c.walk(p=>{if(l=p.raws[a],typeof l!="undefined")return!1})}return typeof l=="undefined"&&(l=e[o]),c.rawCache[o]=l,l}rawBeforeClose(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after!="undefined")return a=o.raws.after,a.includes(`
|
|
52
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let o;return i.walkComments(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
|
|
53
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,a){let o;return i.walkDecls(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
|
|
54
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let a;return i.walk(o=>{if(o.type!=="decl"&&(a=o.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before!="undefined")return a=o.raws.before,a.includes(`
|
|
55
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(o=>{if(typeof o.raws.between!="undefined")return a=o.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(a=o.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before!="undefined"){let u=o.raws.before.split(`
|
|
56
|
+
`);return a=u[u.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],l=i.raws[a];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return hr=r,r.default=r,hr}var pr,ws;function Ot(){if(ws)return pr;ws=1;let e=Bn();function t(r,s){new e(s).stringify(r)}return pr=t,t.default=t,pr}var dr,vs;function At(){if(vs)return dr;vs=1;let{isClean:e,my:t}=di(),r=pi(),s=Bn(),i=Ot();function a(l,u){let c=new l.constructor;for(let n in l){if(!Object.prototype.hasOwnProperty.call(l,n)||n==="proxyCache")continue;let p=l[n],f=typeof p;n==="parent"&&f==="object"?u&&(c[n]=u):n==="source"?c[n]=p:Array.isArray(p)?c[n]=p.map(h=>a(h,c)):(f==="object"&&p!==null&&(p=a(p)),c[n]=p)}return c}class o{constructor(u={}){this.raws={},this[e]=!1,this[t]=!0;for(let c in u)if(c==="nodes"){this.nodes=[];for(let n of u[c])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[c]=u[c]}addToError(u){if(u.postcssNode=this,u.stack&&this.source&&/\n\s{4}at /.test(u.stack)){let c=this.source;u.stack=u.stack.replace(/\n\s{4}at /,`$&${c.input.from}:${c.start.line}:${c.start.column}$&`)}return u}after(u){return this.parent.insertAfter(this,u),this}assign(u={}){for(let c in u)this[c]=u[c];return this}before(u){return this.parent.insertBefore(this,u),this}cleanRaws(u){delete this.raws.before,delete this.raws.after,u||delete this.raws.between}clone(u={}){let c=a(this);for(let n in u)c[n]=u[n];return c}cloneAfter(u={}){let c=this.clone(u);return this.parent.insertAfter(this,c),c}cloneBefore(u={}){let c=this.clone(u);return this.parent.insertBefore(this,c),c}error(u,c={}){if(this.source){let{end:n,start:p}=this.rangeBy(c);return this.source.input.error(u,{column:p.column,line:p.line},{column:n.column,line:n.line},c)}return new r(u)}getProxyProcessor(){return{get(u,c){return c==="proxyOf"?u:c==="root"?()=>u.root().toProxy():u[c]},set(u,c,n){return u[c]===n||(u[c]=n,(c==="prop"||c==="value"||c==="name"||c==="params"||c==="important"||c==="text")&&u.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let u=this;for(;u=u.parent;)u[e]=!1}}next(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u+1]}positionBy(u,c){let n=this.source.start;if(u.index)n=this.positionInside(u.index,c);else if(u.word){c=this.toString();let p=c.indexOf(u.word);p!==-1&&(n=this.positionInside(p,c))}return n}positionInside(u,c){let n=c||this.toString(),p=this.source.start.column,f=this.source.start.line;for(let h=0;h<u;h++)n[h]===`
|
|
57
|
+
`?(p=1,f+=1):p+=1;return{column:p,line:f}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u){let c={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:c.column+1,line:c.line};if(u.word){let p=this.toString(),f=p.indexOf(u.word);f!==-1&&(c=this.positionInside(f,p),n=this.positionInside(f+u.word.length,p))}else u.start?c={column:u.start.column,line:u.start.line}:u.index&&(c=this.positionInside(u.index)),u.end?n={column:u.end.column,line:u.end.line}:typeof u.endIndex=="number"?n=this.positionInside(u.endIndex):u.index&&(n=this.positionInside(u.index+1));return(n.line<c.line||n.line===c.line&&n.column<=c.column)&&(n={column:c.column+1,line:c.line}),{end:n,start:c}}raw(u,c){return new s().raw(this,u,c)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let c=this,n=!1;for(let p of u)p===this?n=!0:n?(this.parent.insertAfter(c,p),c=p):this.parent.insertBefore(c,p);n||this.remove()}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,c){let n={},p=c==null;c=c||new Map;let f=0;for(let h in this){if(!Object.prototype.hasOwnProperty.call(this,h)||h==="parent"||h==="proxyCache")continue;let d=this[h];if(Array.isArray(d))n[h]=d.map(m=>typeof m=="object"&&m.toJSON?m.toJSON(null,c):m);else if(typeof d=="object"&&d.toJSON)n[h]=d.toJSON(null,c);else if(h==="source"){let m=c.get(d.input);m==null&&(m=f,c.set(d.input,f),f++),n[h]={end:d.end,inputId:m,start:d.start}}else n[h]=d}return p&&(n.inputs=[...c.keys()].map(h=>h.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=i){u.stringify&&(u=u.stringify);let c="";return u(this,n=>{c+=n}),c}warn(u,c,n){let p={node:this};for(let f in n)p[f]=n[f];return u.warn(c,p)}get proxyOf(){return this}}return dr=o,o.default=o,dr}var mr,bs;function Dt(){if(bs)return mr;bs=1;let e=At();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=le(H({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return mr=t,t.default=t,mr}var gr,Ss;function ka(){if(Ss)return gr;Ss=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return gr={nanoid:(s=21)=>{let i="",a=s;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a;for(;l--;)o+=s[Math.random()*s.length|0];return o}},gr}var yr,Es;function zn(){if(Es)return yr;Es=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=ge,{existsSync:r,readFileSync:s}=ge,{dirname:i,join:a}=ge;function o(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class l{constructor(c,n){if(n.map===!1)return;this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let p=n.map?n.map.prev:void 0,f=this.loadMap(n.from,p);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=i(this.mapFile)),f&&(this.text=f)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(c){let n=/^data:application\/json;charset=utf-?8;base64,/,p=/^data:application\/json;base64,/,f=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/;if(f.test(c)||h.test(c))return decodeURIComponent(c.substr(RegExp.lastMatch.length));if(n.test(c)||p.test(c))return o(c.substr(RegExp.lastMatch.length));let d=c.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+d)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let n=c.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let p=c.lastIndexOf(n.pop()),f=c.indexOf("*/",p);p>-1&&f>-1&&(this.annotation=this.getAnnotationURL(c.substring(p,f)))}loadFile(c){if(this.root=i(c),r(c))return this.mapFile=c,s(c,"utf-8").toString().trim()}loadMap(c,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let p=n(c);if(p){let f=this.loadFile(p);if(!f)throw new Error("Unable to load previous source map: "+p.toString());return f}}else{if(n instanceof e)return t.fromSourceMap(n).toString();if(n instanceof t)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let p=this.annotation;return c&&(p=a(i(c),p)),this.loadFile(p)}}}startWith(c,n){return c?c.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return yr=l,l.default=l,yr}var wr,Cs;function Pt(){if(Cs)return wr;Cs=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=ge,{fileURLToPath:r,pathToFileURL:s}=ge,{isAbsolute:i,resolve:a}=ge,{nanoid:o}=ka(),l=ge,u=pi(),c=zn(),n=Symbol("fromOffsetCache"),p=!!(e&&t),f=!!(a&&i);class h{constructor(m,g={}){if(m===null||typeof m=="undefined"||typeof m=="object"&&!m.toString)throw new Error(`PostCSS received ${m} instead of CSS string`);if(this.css=m.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!f||/^\w+:\/\//.test(g.from)||i(g.from)?this.file=g.from:this.file=a(g.from)),f&&p){let b=new c(this.css,g);if(b.text){this.map=b;let w=b.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(m,g,b,w={}){let S,E,y;if(g&&typeof g=="object"){let C=g,x=b;if(typeof C.offset=="number"){let A=this.fromOffset(C.offset);g=A.line,b=A.col}else g=C.line,b=C.column;if(typeof x.offset=="number"){let A=this.fromOffset(x.offset);E=A.line,y=A.col}else E=x.line,y=x.column}else if(!b){let C=this.fromOffset(g);g=C.line,b=C.col}let v=this.origin(g,b,E,y);return v?S=new u(m,v.endLine===void 0?v.line:{column:v.column,line:v.line},v.endLine===void 0?v.column:{column:v.endColumn,line:v.endLine},v.source,v.file,w.plugin):S=new u(m,E===void 0?g:{column:b,line:g},E===void 0?b:{column:y,line:E},this.css,this.file,w.plugin),S.input={column:b,endColumn:y,endLine:E,line:g,source:this.css},this.file&&(s&&(S.input.url=s(this.file).toString()),S.input.file=this.file),S}fromOffset(m){let g,b;if(this[n])b=this[n];else{let S=this.css.split(`
|
|
58
|
+
`);b=new Array(S.length);let E=0;for(let y=0,v=S.length;y<v;y++)b[y]=E,E+=S[y].length+1;this[n]=b}g=b[b.length-1];let w=0;if(m>=g)w=b.length-1;else{let S=b.length-2,E;for(;w<S;)if(E=w+(S-w>>1),m<b[E])S=E-1;else if(m>=b[E+1])w=E+1;else{w=E;break}}return{col:m-b[w]+1,line:w+1}}mapResolve(m){return/^\w+:\/\//.test(m)?m:a(this.map.consumer().sourceRoot||this.map.root||".",m)}origin(m,g,b,w){if(!this.map)return!1;let S=this.map.consumer(),E=S.originalPositionFor({column:g,line:m});if(!E.source)return!1;let y;typeof b=="number"&&(y=S.originalPositionFor({column:w,line:b}));let v;i(E.source)?v=s(E.source):v=new URL(E.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let C={column:E.column,endColumn:y&&y.column,endLine:y&&y.line,line:E.line,url:v.toString()};if(v.protocol==="file:")if(r)C.file=r(v);else throw new Error("file: protocol is not available in this PostCSS build");let x=S.sourceContentFor(E.source);return x&&(C.source=x),C}toJSON(){let m={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(m[g]=this[g]);return this.map&&(m.map=H({},this.map),m.map.consumerCache&&(m.map.consumerCache=void 0)),m}get from(){return this.file||this.id}}return wr=h,h.default=h,l&&l.registerInput&&l.registerInput(h),wr}var vr,xs;function qn(){if(xs)return vr;xs=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=ge,{dirname:r,relative:s,resolve:i,sep:a}=ge,{pathToFileURL:o}=ge,l=Pt(),u=!!(e&&t),c=!!(r&&i&&s&&a);class n{constructor(f,h,d,m){this.stringify=f,this.mapOpts=d.map||{},this.root=h,this.opts=d,this.css=m,this.originalCSS=m,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let f;this.isInline()?f="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?f=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?f=this.mapOpts.annotation(this.opts.to,this.root):f=this.outputFile()+".map";let h=`
|
|
59
|
+
`;this.css.includes(`\r
|
|
60
|
+
`)&&(h=`\r
|
|
61
|
+
`),this.css+=h+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let h=this.toUrl(this.path(f.file)),d=f.root||r(f.file),m;this.mapOpts.sourcesContent===!1?(m=new e(f.text),m.sourcesContent&&(m.sourcesContent=null)):m=f.consumer(),this.map.applySourceMap(m,h,this.toUrl(this.path(d)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let f;for(let h=this.root.nodes.length-1;h>=0;h--)f=this.root.nodes[h],f.type==="comment"&&f.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&u&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,h=>{f+=h}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=t.fromSourceMap(f,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,h=1,d="<no source>",m={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(w,S,E)=>{if(this.css+=w,S&&E!=="end"&&(m.generated.line=f,m.generated.column=h-1,S.source&&S.source.start?(m.source=this.sourcePath(S),m.original.line=S.source.start.line,m.original.column=S.source.start.column-1,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,this.map.addMapping(m))),g=w.match(/\n/g),g?(f+=g.length,b=w.lastIndexOf(`
|
|
62
|
+
`),h=w.length-b):h+=w.length,S&&E!=="start"){let y=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==y.last||y.raws.semicolon)&&(S.source&&S.source.end?(m.source=this.sourcePath(S),m.original.line=S.source.end.line,m.original.column=S.source.end.column-1,m.generated.line=f,m.generated.column=h-2,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=h-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(h=>h.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let h=this.memoizedPaths.get(f);if(h)return h;let d=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(d=r(i(d,this.mapOpts.annotation)));let m=s(d,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let h=f.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(h=>{if(h.source){let d=h.source.input.from;if(d&&!f[d]){f[d]=!0;let m=this.usesFileUrls?this.toFileUrl(d):this.toUrl(this.path(d));this.map.setSourceContent(m,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let h=this.memoizedFileURLs.get(f);if(h)return h;if(o){let d=o(f).toString();return this.memoizedFileURLs.set(f,d),d}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let h=this.memoizedURLs.get(f);if(h)return h;a==="\\"&&(f=f.replace(/\\/g,"/"));let d=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,d),d}}return vr=n,vr}var br,Rs;function Tt(){if(Rs)return br;Rs=1;let e=At();class t extends e{constructor(s){super(s),this.type="comment"}}return br=t,t.default=t,br}var Sr,Ms;function Te(){if(Ms)return Sr;Ms=1;let{isClean:e,my:t}=di(),r=Dt(),s=Tt(),i=At(),a,o,l,u;function c(f){return f.map(h=>(h.nodes&&(h.nodes=c(h.nodes)),delete h.source,h))}function n(f){if(f[e]=!1,f.proxyOf.nodes)for(let h of f.proxyOf.nodes)n(h)}class p extends i{append(...h){for(let d of h){let m=this.normalize(d,this.last);for(let g of m)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let d of this.nodes)d.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let d=this.getIterator(),m,g;for(;this.indexes[d]<this.proxyOf.nodes.length&&(m=this.indexes[d],g=h(this.proxyOf.nodes[m],m),g!==!1);)this.indexes[d]+=1;return delete this.indexes[d],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,d){return d==="proxyOf"?h:h[d]?d==="each"||typeof d=="string"&&d.startsWith("walk")?(...m)=>h[d](...m.map(g=>typeof g=="function"?(b,w)=>g(b.toProxy(),w):g)):d==="every"||d==="some"?m=>h[d]((g,...b)=>m(g.toProxy(),...b)):d==="root"?()=>h.root().toProxy():d==="nodes"?h.nodes.map(m=>m.toProxy()):d==="first"||d==="last"?h[d].toProxy():h[d]:h[d]},set(h,d,m){return h[d]===m||(h[d]=m,(d==="name"||d==="params"||d==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,d){let m=this.index(h),g=this.normalize(d,this.proxyOf.nodes[m]).reverse();m=this.index(h);for(let w of g)this.proxyOf.nodes.splice(m+1,0,w);let b;for(let w in this.indexes)b=this.indexes[w],m<b&&(this.indexes[w]=b+g.length);return this.markDirty(),this}insertBefore(h,d){let m=this.index(h),g=m===0?"prepend":!1,b=this.normalize(d,this.proxyOf.nodes[m],g).reverse();m=this.index(h);for(let S of b)this.proxyOf.nodes.splice(m,0,S);let w;for(let S in this.indexes)w=this.indexes[S],m<=w&&(this.indexes[S]=w+b.length);return this.markDirty(),this}normalize(h,d){if(typeof h=="string")h=c(a(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new r(h)]}else if(h.selector)h=[new o(h)];else if(h.name)h=[new l(h)];else if(h.text)h=[new s(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[t]||p.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&n(g),typeof g.raws.before=="undefined"&&d&&typeof d.raws.before!="undefined"&&(g.raws.before=d.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let d of h){let m=this.normalize(d,this.first,"prepend").reverse();for(let g of m)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+m.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let d;for(let m in this.indexes)d=this.indexes[m],d>=h&&(this.indexes[m]=d-1);return this.markDirty(),this}replaceValues(h,d,m){return m||(m=d,d={}),this.walkDecls(g=>{d.props&&!d.props.includes(g.prop)||d.fast&&!g.value.includes(d.fast)||(g.value=g.value.replace(h,m))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((d,m)=>{let g;try{g=h(d,m)}catch(b){throw d.addToError(b)}return g!==!1&&d.walk&&(g=d.walk(h)),g})}walkAtRules(h,d){return d?h instanceof RegExp?this.walk((m,g)=>{if(m.type==="atrule"&&h.test(m.name))return d(m,g)}):this.walk((m,g)=>{if(m.type==="atrule"&&m.name===h)return d(m,g)}):(d=h,this.walk((m,g)=>{if(m.type==="atrule")return d(m,g)}))}walkComments(h){return this.walk((d,m)=>{if(d.type==="comment")return h(d,m)})}walkDecls(h,d){return d?h instanceof RegExp?this.walk((m,g)=>{if(m.type==="decl"&&h.test(m.prop))return d(m,g)}):this.walk((m,g)=>{if(m.type==="decl"&&m.prop===h)return d(m,g)}):(d=h,this.walk((m,g)=>{if(m.type==="decl")return d(m,g)}))}walkRules(h,d){return d?h instanceof RegExp?this.walk((m,g)=>{if(m.type==="rule"&&h.test(m.selector))return d(m,g)}):this.walk((m,g)=>{if(m.type==="rule"&&m.selector===h)return d(m,g)}):(d=h,this.walk((m,g)=>{if(m.type==="rule")return d(m,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return p.registerParse=f=>{a=f},p.registerRule=f=>{o=f},p.registerAtRule=f=>{l=f},p.registerRoot=f=>{u=f},Sr=p,p.default=p,p.rebuild=f=>{f.type==="atrule"?Object.setPrototypeOf(f,l.prototype):f.type==="rule"?Object.setPrototypeOf(f,o.prototype):f.type==="decl"?Object.setPrototypeOf(f,r.prototype):f.type==="comment"?Object.setPrototypeOf(f,s.prototype):f.type==="root"&&Object.setPrototypeOf(f,u.prototype),f[t]=!0,f.nodes&&f.nodes.forEach(h=>{p.rebuild(h)})},Sr}var Er,Ns;function mi(){if(Ns)return Er;Ns=1;let e=Te(),t,r;class s extends e{constructor(a){super(H({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Er=s,s.default=s,Er}var Cr,_s;function Wn(){if(_s)return Cr;_s=1;let e={};return Cr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Cr}var xr,Os;function Vn(){if(Os)return xr;Os=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return xr=e,e.default=e,xr}var Rr,As;function gi(){if(As)return Rr;As=1;let e=Vn();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return Rr=t,t.default=t,Rr}var Mr,Ds;function Ia(){if(Ds)return Mr;Ds=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,u=13,c=91,n=93,p=40,f=41,h=123,d=125,m=59,g=42,b=58,w=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,v=/[\da-f]/i;return Mr=function(x,A={}){let M=x.css.valueOf(),z=A.ignoreErrors,k,R,W,K,B,U,J,ee,q,I,ae=M.length,N=0,D=[],O=[];function _(){return N}function P(ie){throw x.error("Unclosed "+ie,N)}function j(){return O.length===0&&N>=ae}function ue(ie){if(O.length)return O.pop();if(N>=ae)return;let be=ie?ie.ignoreUnclosed:!1;switch(k=M.charCodeAt(N),k){case i:case a:case l:case u:case o:{R=N;do R+=1,k=M.charCodeAt(R);while(k===a||k===i||k===l||k===u||k===o);I=["space",M.slice(N,R)],N=R-1;break}case c:case n:case h:case d:case b:case m:case f:{let _e=String.fromCharCode(k);I=[_e,_e,N];break}case p:{if(ee=D.length?D.pop()[1]:"",q=M.charCodeAt(N+1),ee==="url"&&q!==e&&q!==t&&q!==a&&q!==i&&q!==l&&q!==o&&q!==u){R=N;do{if(U=!1,R=M.indexOf(")",R+1),R===-1)if(z||be){R=N;break}else P("bracket");for(J=R;M.charCodeAt(J-1)===r;)J-=1,U=!U}while(U);I=["brackets",M.slice(N,R+1),N,R],N=R}else R=M.indexOf(")",N+1),K=M.slice(N,R+1),R===-1||y.test(K)?I=["(","(",N]:(I=["brackets",K,N,R],N=R);break}case e:case t:{W=k===e?"'":'"',R=N;do{if(U=!1,R=M.indexOf(W,R+1),R===-1)if(z||be){R=N+1;break}else P("string");for(J=R;M.charCodeAt(J-1)===r;)J-=1,U=!U}while(U);I=["string",M.slice(N,R+1),N,R],N=R;break}case w:{S.lastIndex=N+1,S.test(M),S.lastIndex===0?R=M.length-1:R=S.lastIndex-2,I=["at-word",M.slice(N,R+1),N,R],N=R;break}case r:{for(R=N,B=!0;M.charCodeAt(R+1)===r;)R+=1,B=!B;if(k=M.charCodeAt(R+1),B&&k!==s&&k!==a&&k!==i&&k!==l&&k!==u&&k!==o&&(R+=1,v.test(M.charAt(R)))){for(;v.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}I=["word",M.slice(N,R+1),N,R],N=R;break}default:{k===s&&M.charCodeAt(N+1)===g?(R=M.indexOf("*/",N+2)+1,R===0&&(z||be?R=M.length:P("comment")),I=["comment",M.slice(N,R+1),N,R],N=R):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,I=["word",M.slice(N,R+1),N,R],D.push(I),N=R);break}}return N++,I}function ce(ie){O.push(ie)}return{back:ce,endOfFile:j,nextToken:ue,position:_}},Mr}var Nr,Ps;function yi(){if(Ps)return Nr;Ps=1;let e=Te();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return Nr=t,t.default=t,e.registerAtRule(t),Nr}var _r,Ts;function it(){if(Ts)return _r;Ts=1;let e=Te(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,l){let u=super.normalize(a);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let c of u)c.raws.before=o.raws.before}return u}removeChild(a,o){let l=this.index(a);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},_r=s,s.default=s,e.registerRoot(s),_r}var Or,ks;function jn(){if(ks)return Or;ks=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
63
|
+
`," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,u=!1,c="",n=!1;for(let p of t)n?n=!1:p==="\\"?n=!0:u?p===c&&(u=!1):p==='"'||p==="'"?(u=!0,c=p):p==="("?l+=1:p===")"?l>0&&(l-=1):l===0&&r.includes(p)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=p;return(s||a!=="")&&i.push(a.trim()),i}};return Or=e,e.default=e,Or}var Ar,Is;function wi(){if(Is)return Ar;Is=1;let e=Te(),t=jn();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return Ar=r,r.default=r,e.registerRule(r),Ar}var Dr,Ls;function La(){if(Ls)return Dr;Ls=1;let e=Dt(),t=Ia(),r=Tt(),s=yi(),i=it(),a=wi();const o={empty:!0,space:!0};function l(c){for(let n=c.length-1;n>=0;n--){let p=c[n],f=p[3]||p[2];if(f)return f}}class u{constructor(n){this.input=n,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let p=new s;p.name=n[1].slice(1),p.name===""&&this.unnamedAtrule(p,n),this.init(p,n[2]);let f,h,d,m=!1,g=!1,b=[],w=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),f=n[0],f==="("||f==="["?w.push(f==="("?")":"]"):f==="{"&&w.length>0?w.push("}"):f===w[w.length-1]&&w.pop(),w.length===0)if(f===";"){p.source.end=this.getPosition(n[2]),p.source.end.offset++,this.semicolon=!0;break}else if(f==="{"){g=!0;break}else if(f==="}"){if(b.length>0){for(d=b.length-1,h=b[d];h&&h[0]==="space";)h=b[--d];h&&(p.source.end=this.getPosition(h[3]||h[2]),p.source.end.offset++)}this.end(n);break}else b.push(n);else b.push(n);if(this.tokenizer.endOfFile()){m=!0;break}}p.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(p.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(p,"params",b),m&&(n=b[b.length-1],p.source.end=this.getPosition(n[3]||n[2]),p.source.end.offset++,this.spaces=p.raws.between,p.raws.between="")):(p.raws.afterName="",p.params=""),g&&(p.nodes=[],this.current=p)}checkMissedSemicolon(n){let p=this.colon(n);if(p===!1)return;let f=0,h;for(let d=p-1;d>=0&&(h=n[d],!(h[0]!=="space"&&(f+=1,f===2)));d--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let p=0,f,h,d;for(let[m,g]of n.entries()){if(f=g,h=f[0],h==="("&&(p+=1),h===")"&&(p-=1),p===0&&h===":")if(!d)this.doubleColon(f);else{if(d[0]==="word"&&d[1]==="progid")continue;return m}d=f}return!1}comment(n){let p=new r;this.init(p,n[2]),p.source.end=this.getPosition(n[3]||n[2]),p.source.end.offset++;let f=n[1].slice(2,-2);if(/^\s*$/.test(f))p.text="",p.raws.left=f,p.raws.right="";else{let h=f.match(/^(\s*)([^]*\S)(\s*)$/);p.text=h[2],p.raws.left=h[1],p.raws.right=h[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(n,p){let f=new e;this.init(f,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),f.source.end=this.getPosition(h[3]||h[2]||l(n)),f.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),f.raws.before+=n.shift()[1];for(f.source.start=this.getPosition(n[0][2]),f.prop="";n.length;){let w=n[0][0];if(w===":"||w==="space"||w==="comment")break;f.prop+=n.shift()[1]}f.raws.between="";let d;for(;n.length;)if(d=n.shift(),d[0]===":"){f.raws.between+=d[1];break}else d[0]==="word"&&/\w/.test(d[1])&&this.unknownWord([d]),f.raws.between+=d[1];(f.prop[0]==="_"||f.prop[0]==="*")&&(f.raws.before+=f.prop[0],f.prop=f.prop.slice(1));let m=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)m.push(n.shift());this.precheckMissedSemicolon(n);for(let w=n.length-1;w>=0;w--){if(d=n[w],d[1].toLowerCase()==="!important"){f.important=!0;let S=this.stringFrom(n,w);S=this.spacesFromEnd(n)+S,S!==" !important"&&(f.raws.important=S);break}else if(d[1].toLowerCase()==="important"){let S=n.slice(0),E="";for(let y=w;y>0;y--){let v=S[y][0];if(E.trim().indexOf("!")===0&&v!=="space")break;E=S.pop()[1]+E}E.trim().indexOf("!")===0&&(f.important=!0,f.raws.important=E,n=S)}if(d[0]!=="space"&&d[0]!=="comment")break}n.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(f.raws.between+=m.map(w=>w[1]).join(""),m=[]),this.raw(f,"value",m.concat(n),p),f.value.includes(":")&&!p&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let p=new a;this.init(p,n[2]),p.selector="",p.raws.between="",this.current=p}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let p=this.current.nodes[this.current.nodes.length-1];p&&p.type==="rule"&&!p.raws.ownSemicolon&&(p.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let p=this.input.fromOffset(n);return{column:p.col,line:p.line,offset:n}}init(n,p){this.current.push(n),n.source={input:this.input,start:this.getPosition(p)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let p=!1,f=null,h=!1,d=null,m=[],g=n[1].startsWith("--"),b=[],w=n;for(;w;){if(f=w[0],b.push(w),f==="("||f==="[")d||(d=w),m.push(f==="("?")":"]");else if(g&&h&&f==="{")d||(d=w),m.push("}");else if(m.length===0)if(f===";")if(h){this.decl(b,g);return}else break;else if(f==="{"){this.rule(b);return}else if(f==="}"){this.tokenizer.back(b.pop()),p=!0;break}else f===":"&&(h=!0);else f===m[m.length-1]&&(m.pop(),m.length===0&&(d=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(p=!0),m.length>0&&this.unclosedBracket(d),p&&h){if(!g)for(;b.length&&(w=b[b.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,p,f,h){let d,m,g=f.length,b="",w=!0,S,E;for(let y=0;y<g;y+=1)d=f[y],m=d[0],m==="space"&&y===g-1&&!h?w=!1:m==="comment"?(E=f[y-1]?f[y-1][0]:"empty",S=f[y+1]?f[y+1][0]:"empty",!o[E]&&!o[S]?b.slice(-1)===","?w=!1:b+=d[1]:w=!1):b+=d[1];if(!w){let y=f.reduce((v,C)=>v+C[1],"");n.raws[p]={raw:y,value:b}}n[p]=b}rule(n){n.pop();let p=new a;this.init(p,n[0][2]),p.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(p,"selector",n),this.current=p}spacesAndCommentsFromEnd(n){let p,f="";for(;n.length&&(p=n[n.length-1][0],!(p!=="space"&&p!=="comment"));)f=n.pop()[1]+f;return f}spacesAndCommentsFromStart(n){let p,f="";for(;n.length&&(p=n[0][0],!(p!=="space"&&p!=="comment"));)f+=n.shift()[1];return f}spacesFromEnd(n){let p,f="";for(;n.length&&(p=n[n.length-1][0],p==="space");)f=n.pop()[1]+f;return f}stringFrom(n,p){let f="";for(let h=p;h<n.length;h++)f+=n[h][1];return n.splice(p,n.length-p),f}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,p){throw this.input.error("At-rule without name",{offset:p[2]},{offset:p[2]+p[1].length})}}return Dr=u,Dr}var Pr,Fs;function vi(){if(Fs)return Pr;Fs=1;let e=Te(),t=La(),r=Pt();function s(i,a){let o=new r(i,a),l=new t(o);try{l.parse()}catch(u){throw u}return l.root}return Pr=s,s.default=s,e.registerParse(s),Pr}var Tr,Us;function Gn(){if(Us)return Tr;Us=1;let{isClean:e,my:t}=di(),r=qn(),s=Ot(),i=Te(),a=mi(),o=Wn(),l=gi(),u=vi(),c=it();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function d(E){return typeof E=="object"&&typeof E.then=="function"}function m(E){let y=!1,v=n[E.type];return E.type==="decl"?y=E.prop.toLowerCase():E.type==="atrule"&&(y=E.name.toLowerCase()),y&&E.append?[v,v+"-"+y,h,v+"Exit",v+"Exit-"+y]:y?[v,v+"-"+y,v+"Exit",v+"Exit-"+y]:E.append?[v,h,v+"Exit"]:[v,v+"Exit"]}function g(E){let y;return E.type==="document"?y=["Document",h,"DocumentExit"]:E.type==="root"?y=["Root",h,"RootExit"]:y=m(E),{eventIndex:0,events:y,iterator:0,node:E,visitorIndex:0,visitors:[]}}function b(E){return E[e]=!1,E.nodes&&E.nodes.forEach(y=>b(y)),E}let w={};class S{constructor(y,v,C){this.stringified=!1,this.processed=!1;let x;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))x=b(v);else if(v instanceof S||v instanceof l)x=b(v.root),v.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=v.map);else{let A=u;C.syntax&&(A=C.syntax.parse),C.parser&&(A=C.parser),A.parse&&(A=A.parse);try{x=A(v,C)}catch(M){this.processed=!0,this.error=M}x&&!x[t]&&i.rebuild(x)}this.result=new l(y,x,C),this.helpers=le(H({},w),{postcss:w,result:this.result}),this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?H(H({},A),A.prepare(this.result)):A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,v){let C=this.result.lastPlugin;try{v&&v.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return y}prepareVisitors(){this.listeners={};let y=(v,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,x])};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!p[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[C])if(typeof v[C]=="object")for(let x in v[C])x==="*"?y(v,C,v[C][x]):y(v,C+"-"+x.toLowerCase(),v[C][x]);else typeof v[C]=="function"&&y(v,C,v[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let v=this.plugins[y],C=this.runOnRoot(v);if(d(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[e];){y[e]=!0;let v=[g(y)];for(;v.length>0;){let C=this.visitTick(v);if(d(C))try{await C}catch(x){let A=v[v.length-1].node;throw this.handleError(x,A)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(y.type==="document"){let x=y.nodes.map(A=>C(A,this.helpers));await Promise.all(x)}else await C(y,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return d(v[0])?Promise.all(v):v}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,v=s;y.syntax&&(v=y.syntax.stringify),y.stringifier&&(v=y.stringifier),v.stringify&&(v=v.stringify);let x=new r(v,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let v=this.runOnRoot(y);if(d(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[e];)y[e]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let v of y.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,v){return this.async().then(y,v)}toString(){return this.css}visitSync(y,v){for(let[C,x]of y){this.result.lastPlugin=C;let A;try{A=x(v,this.helpers)}catch(M){throw this.handleError(M,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return!0;if(d(A))throw this.getAsyncError()}}visitTick(y){let v=y[y.length-1],{node:C,visitors:x}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(x.length>0&&v.visitorIndex<x.length){let[M,z]=x[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===x.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=M;try{return z(C.toProxy(),this.helpers)}catch(k){throw this.handleError(k,C)}}if(v.iterator!==0){let M=v.iterator,z;for(;z=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!z[e]){z[e]=!0,y.push(g(z));return}v.iterator=0,delete C.indexes[M]}let A=v.events;for(;v.eventIndex<A.length;){let M=A[v.eventIndex];if(v.eventIndex+=1,M===h){C.nodes&&C.nodes.length&&(C[e]=!0,v.iterator=C.getIterator());return}else if(this.listeners[M]){v.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[e]=!0;let v=m(y);for(let C of v)if(C===h)y.nodes&&y.each(x=>{x[e]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,y.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return S.registerPostcss=E=>{w=E},Tr=S,S.default=S,c.registerLazyResult(S),a.registerLazyResult(S),Tr}var kr,Bs;function Fa(){if(Bs)return kr;Bs=1;let e=qn(),t=Ot(),r=Wn(),s=vi();const i=gi();class a{constructor(l,u,c){u=u.toString(),this.stringified=!1,this._processor=l,this._css=u,this._opts=c,this._map=void 0;let n,p=t;this.result=new i(this._processor,n,this._opts),this.result.css=u;let f=this;Object.defineProperty(this.result,"root",{get(){return f.root}});let h=new e(p,n,this._opts,u);if(h.isMap()){let[d,m]=h.generate();d&&(this.result.css=d),m&&(this.result.map=m)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,u){return this.async().then(l,u)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,u=s;try{l=u(this._css,this._opts)}catch(c){this.error=c}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return kr=a,a.default=a,kr}var Ir,zs;function Ua(){if(zs)return Ir;zs=1;let e=Fa(),t=Gn(),r=mi(),s=it();class i{constructor(o=[]){this.version="8.4.38",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(!(typeof u=="object"&&(u.parse||u.stringify)))throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new e(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Ir=i,i.default=i,s.registerProcessor(i),r.registerProcessor(i),Ir}var Lr,qs;function Ba(){if(qs)return Lr;qs=1;let e=Dt(),t=zn(),r=Tt(),s=yi(),i=Pt(),a=it(),o=wi();function l(u,c){if(Array.isArray(u))return u.map(d=>l(d));let f=u,{inputs:n}=f,p=He(f,["inputs"]);if(n){c=[];for(let d of n){let m=le(H({},d),{__proto__:i.prototype});m.map&&(m.map=le(H({},m.map),{__proto__:t.prototype})),c.push(m)}}if(p.nodes&&(p.nodes=u.nodes.map(d=>l(d,c))),p.source){let h=p.source,{inputId:d}=h,m=He(h,["inputId"]);p.source=m,d!=null&&(p.source.input=c[d])}if(p.type==="root")return new a(p);if(p.type==="decl")return new e(p);if(p.type==="rule")return new o(p);if(p.type==="comment")return new r(p);if(p.type==="atrule")return new s(p);throw new Error("Unknown node type: "+u.type)}return Lr=l,l.default=l,Lr}var Fr,Ws;function za(){if(Ws)return Fr;Ws=1;let e=pi(),t=Dt(),r=Gn(),s=Te(),i=Ua(),a=Ot(),o=Ba(),l=mi(),u=Vn(),c=Tt(),n=yi(),p=gi(),f=Pt(),h=vi(),d=jn(),m=wi(),g=it(),b=At();function w(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new i(S)}return w.plugin=function(E,y){let v=!1;function C(...A){console&&console.warn&&!v&&(v=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
64
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
65
|
+
https://www.w3ctech.com/topic/2226`));let M=y(...A);return M.postcssPlugin=E,M.postcssVersion=new i().version,M}let x;return Object.defineProperty(C,"postcss",{get(){return x||(x=C()),x}}),C.process=function(A,M,z){return w([C(z)]).process(A,M)},C},w.stringify=a,w.parse=h,w.fromJSON=o,w.list=d,w.comment=S=>new c(S),w.atRule=S=>new n(S),w.decl=S=>new t(S),w.rule=S=>new m(S),w.root=S=>new g(S),w.document=S=>new l(S),w.CssSyntaxError=e,w.Declaration=t,w.Container=s,w.Processor=i,w.Document=l,w.Comment=c,w.Warning=u,w.AtRule=n,w.Result=p,w.Input=f,w.Rule=m,w.Root=g,w.Node=b,r.registerPostcss(w),Fr=w,w.default=w,Fr}var qa=za();const Z=Oa(qa);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;var V=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(V||{});function Wa(e){const t={},r=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(r).forEach(function(a){if(a){const o=a.split(s);o.length>1&&(t[Yr(o[0].trim())]=o[1].trim())}}),t}function Vs(e){const t=[];for(const r in e){const s=e[r];if(typeof s!="string")continue;const i=$a(r);t.push(`${i}: ${s};`)}return t.join(" ")}const Va=/-([a-z])/g,ja=/^--[a-zA-Z0-9-]+$/,Yr=e=>ja.test(e)?e:e.replace(Va,(t,r)=>r?r.toUpperCase():""),Ga=/\B([A-Z])/g,$a=e=>e.replace(Ga,"-$1").toLowerCase();class ye{constructor(...t){T(this,"parentElement",null),T(this,"parentNode",null),T(this,"ownerDocument"),T(this,"firstChild",null),T(this,"lastChild",null),T(this,"previousSibling",null),T(this,"nextSibling",null),T(this,"ELEMENT_NODE",1),T(this,"TEXT_NODE",3),T(this,"nodeType"),T(this,"nodeName"),T(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof ye){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class bi extends ye{constructor(...t){super(t),T(this,"nodeType",9),T(this,"nodeName","#document"),T(this,"compatMode","CSS1Compat"),T(this,"RRNodeType",V.Document),T(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===V.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===V.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===V.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===V.Element||r===V.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===V.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Si(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===V.Element||s===V.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===V.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=Xn(this,t,r);return i.parentElement=null,i}removeChild(t){return Qn(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const s=this.createDocumentType("html",r,"");this.open(),this.appendChild(s)}}createDocument(t,r,s){return new bi}createDocumentType(t,r,s){const i=new $n(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=new kt(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new Hn(t);return r.ownerDocument=this,r}createComment(t){const r=new Yn(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new Jn(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class $n extends ye{constructor(t,r,s){super(),T(this,"nodeType",10),T(this,"RRNodeType",V.DocumentType),T(this,"name"),T(this,"publicId"),T(this,"systemId"),T(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class kt extends ye{constructor(t){super(),T(this,"nodeType",1),T(this,"RRNodeType",V.Element),T(this,"tagName"),T(this,"attributes",{}),T(this,"shadowRoot",null),T(this,"scrollLeft"),T(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new Ja(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Wa(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(s,i,a)=>{if(r.test(s))return;const o=Yr(s);i?t[o]=i:delete t[o],a==="important"&&(t[o]+=" !important"),this.attributes.style=Vs(t)},t.removeProperty=s=>{if(r.test(s))return"";const i=Yr(s),a=t[i]||"";return delete t[i],this.attributes.style=Vs(t),a},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,s){this.setAttribute(r,s)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Si(this,t)}insertBefore(t,r){return Xn(this,t,r)}removeChild(t){return Qn(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class Ha extends kt{constructor(){super(...arguments),T(this,"currentTime"),T(this,"volume"),T(this,"paused"),T(this,"muted"),T(this,"playbackRate"),T(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Ya extends kt{constructor(){super(...arguments),T(this,"tagName","DIALOG"),T(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class Hn extends ye{constructor(t){super(),T(this,"nodeType",3),T(this,"nodeName","#text"),T(this,"RRNodeType",V.Text),T(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class Yn extends ye{constructor(t){super(),T(this,"nodeType",8),T(this,"nodeName","#comment"),T(this,"RRNodeType",V.Comment),T(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Jn extends ye{constructor(t){super(),T(this,"nodeName","#cdata-section"),T(this,"nodeType",4),T(this,"RRNodeType",V.CDATA),T(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Ja{constructor(t,r){if(T(this,"onChange"),T(this,"classes",[]),T(this,"add",(...s)=>{for(const i of s){const a=String(i);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))}),T(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const s=t.trim().split(/\s+/);this.classes.push(...s)}this.onChange=r}}function Si(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function Xn(e,t,r){if(!r)return Si(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function Qn(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var fe=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(fe||{});const Jr={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Xa={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let we=null;function wt(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=Qa(e,t,r,s),Kn(e,t,r,s),Ka(e,t,r)}function Qa(e,t,r,s){var i;if(r.afterAppend&&!we&&(we=new WeakSet,setTimeout(()=>{we=null},0)),!Ei(e,t)){const a=vt(t,r.mirror,s);(i=e.parentNode)==null||i.replaceChild(a,e),e=a}switch(t.RRNodeType){case V.Document:{if(!Fe(e,t,r.mirror,s)){const a=s.getMeta(t);a&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,a),we==null||we.add(e))}break}case V.Element:{const a=e,o=t;switch(o.tagName){case"IFRAME":{const l=e.contentDocument;if(!l)break;wt(l,t.contentDocument,r,s);break}}o.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),Kn(a.shadowRoot,o.shadowRoot,r,s)),Za(a,o,s);break}}return e}function Ka(e,t,r){var s;switch(t.RRNodeType){case V.Document:{const i=t.scrollData;i&&r.applyScroll(i,!0);break}case V.Element:{const i=e,a=t;switch(a.scrollData&&r.applyScroll(a.scrollData,!0),a.inputData&&r.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":{const o=e,l=a;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=t;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const u=i.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>r.applyCanvas(l.event,l.mutation,e));break}case"STYLE":{const o=i.sheet;o&&t.rules.forEach(l=>r.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,l=a,u=o.open,c=o.matches("dialog:modal"),n=l.open,p=l.isModal,f=c!==p,h=u!==n;if((f||u&&h)&&o.close(),n&&(h||f))try{p?o.showModal():o.show()}catch(d){console.warn(d)}break}}break}case V.Text:case V.Comment:case V.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}we!=null&&we.has(e)&&(we.delete(e),(s=r.afterAppend)==null||s.call(r,e,r.mirror.getId(e)))}function Za(e,t,r){const s=e.attributes,i=t.attributes;for(const a in i){const o=i[a],l=r.getMeta(t);if(l!=null&&l.isSVG&&Jr[a])e.setAttributeNS(Jr[a],a,o);else if(t.tagName==="CANVAS"&&a==="rr_dataURL"){const u=document.createElement("img");u.src=o,u.onload=()=>{const c=e.getContext("2d");c&&c.drawImage(u,0,0,u.width,u.height)}}else{if(t.tagName==="IFRAME"&&a==="srcdoc")continue;try{e.setAttribute(a,o)}catch(u){console.warn(u)}}}for(const{name:a}of Array.from(s))a in i||e.removeAttribute(a);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Kn(e,t,r,s){const i=Array.from(e.childNodes),a=t.childNodes;if(i.length===0&&a.length===0)return;let o=0,l=i.length-1,u=0,c=a.length-1,n=i[o],p=i[l],f=a[u],h=a[c],d,m;for(;o<=l&&u<=c;)if(n===void 0)n=i[++o];else if(p===void 0)p=i[--l];else if(Fe(n,f,r.mirror,s))n=i[++o],f=a[++u];else if(Fe(p,h,r.mirror,s))p=i[--l],h=a[--c];else if(Fe(n,h,r.mirror,s)){try{e.insertBefore(n,p.nextSibling)}catch(w){console.warn(w)}n=i[++o],h=a[--c]}else if(Fe(p,f,r.mirror,s)){try{e.insertBefore(p,n)}catch(w){console.warn(w)}p=i[--l],f=a[++u]}else{if(!d){d={};for(let S=o;S<=l;S++){const E=i[S];E&&r.mirror.hasNode(E)&&(d[r.mirror.getId(E)]=S)}}m=d[s.getId(f)];const w=i[m];if(m!==void 0&&w&&Fe(w,f,r.mirror,s)){try{e.insertBefore(w,n)}catch(S){console.warn(S)}i[m]=void 0}else{const S=vt(f,r.mirror,s);e.nodeName==="#document"&&n&&(S.nodeType===S.DOCUMENT_TYPE_NODE&&n.nodeType===n.DOCUMENT_TYPE_NODE||S.nodeType===S.ELEMENT_NODE&&n.nodeType===n.ELEMENT_NODE)&&(e.removeChild(n),r.mirror.removeNodeFromMap(n),n=i[++o]);try{e.insertBefore(S,n||null)}catch(E){console.warn(E)}}f=a[++u]}if(o>l){const w=a[c+1];let S=null;for(w&&(S=r.mirror.getNode(s.getId(w)));u<=c;++u){const E=vt(a[u],r.mirror,s);try{e.insertBefore(E,S)}catch(y){console.warn(y)}}}else if(u>c)for(;o<=l;o++){const w=i[o];if(!(!w||w.parentNode!==e))try{e.removeChild(w),r.mirror.removeNodeFromMap(w)}catch(S){console.warn(S)}}let g=e.firstChild,b=t.firstChild;for(;g!==null&&b!==null;)wt(g,b,r,s),g=g.nextSibling,b=b.nextSibling}function vt(e,t,r){const s=r.getId(e),i=r.getMeta(e);let a=null;if(s>-1&&(a=t.getNode(s)),a!==null&&Ei(a,e))return a;switch(e.RRNodeType){case V.Document:a=new Document;break;case V.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case V.Element:{let o=e.tagName.toLowerCase();o=Xa[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?a=document.createElementNS(Jr.svg,o):a=document.createElement(e.tagName);break}case V.Text:a=document.createTextNode(e.data);break;case V.Comment:a=document.createComment(e.data);break;case V.CDATA:a=document.createCDATASection(e.data);break}i&&t.add(a,H({},i));try{we==null||we.add(a)}catch(o){}return a}function Ei(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function Fe(e,t,r,s){const i=r.getId(e),a=s.getId(t);return i===-1||i!==a?!1:Ei(e,t)}class $e extends bi{constructor(t){super(),T(this,"UNSERIALIZED_STARTING_ID",-2),T(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),T(this,"mirror",fl()),T(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new $e}createDocumentType(t,r,s){const i=new el(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=t.toUpperCase();let s;switch(r){case"AUDIO":case"VIDEO":s=new tl(r);break;case"IFRAME":s=new nl(r,this.mirror);break;case"CANVAS":s=new il(r);break;case"STYLE":s=new sl(r);break;case"DIALOG":s=new rl(r);break;default:s=new It(r);break}return s.ownerDocument=this,s}createComment(t){const r=new al(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new ll(t);return r.ownerDocument=this,r}createTextNode(t){const r=new ol(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const el=$n;class It extends kt{constructor(){super(...arguments),T(this,"inputData",null),T(this,"scrollData",null)}}class tl extends Ha{}class rl extends Ya{}class il extends It{constructor(){super(...arguments),T(this,"rr_dataURL",null),T(this,"canvasMutations",[])}getContext(){return null}}class sl extends It{constructor(){super(...arguments),T(this,"rules",[])}}class nl extends It{constructor(t,r){super(t),T(this,"contentDocument",new $e),this.contentDocument.mirror=r}}const ol=Hn,al=Yn,ll=Jn;function ul(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function Zn(e,t,r,s){let i;switch(e.nodeType){case fe.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=t,i.compatMode=e.compatMode);break;case fe.DOCUMENT_TYPE_NODE:{const o=e;i=t.createDocumentType(o.name,o.publicId,o.systemId);break}case fe.ELEMENT_NODE:{const o=e,l=ul(o);i=t.createElement(l);const u=i;for(const{name:c,value:n}of Array.from(o.attributes))u.attributes[c]=n;o.scrollLeft&&(u.scrollLeft=o.scrollLeft),o.scrollTop&&(u.scrollTop=o.scrollTop);break}case fe.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case fe.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case fe.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case fe.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let a=r.getMeta(e);return t instanceof $e&&(a||(a=eo(i,t.unserializedId),r.add(e,a)),t.mirror.add(i,H({},a))),i}function cl(e,t=_a(),r=new $e){function s(i,a){const o=Zn(i,r,t,a);if(o!==null)if((a==null?void 0:a.nodeName)!=="IFRAME"&&i.nodeType!==fe.DOCUMENT_FRAGMENT_NODE&&(a==null||a.appendChild(o),o.parentNode=a,o.parentElement=a),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&s(l,o)}else(i.nodeType===fe.DOCUMENT_NODE||i.nodeType===fe.ELEMENT_NODE||i.nodeType===fe.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===fe.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,o),i.childNodes.forEach(l=>s(l,o)))}return s(e,null),r}function fl(){return new hl}class hl{constructor(){T(this,"idNodeMap",new Map),T(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function eo(e,t){switch(e.RRNodeType){case V.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case V.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case V.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case V.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case V.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case V.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const js={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Gs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ct={},to={},pl=()=>!!globalThis.Zone;function Ci(e){if(ct[e])return ct[e];const t=globalThis[e],r=t.prototype,s=e in js?js[e]:void 0,i=!!(s&&s.every(l=>{var u,c;return!!((c=(u=Object.getOwnPropertyDescriptor(r,l))==null?void 0:u.get)!=null&&c.toString().includes("[native code]"))})),a=e in Gs?Gs[e]:void 0,o=!!(a&&a.every(l=>{var u;return typeof r[l]=="function"&&((u=r[l])==null?void 0:u.toString().includes("[native code]"))}));if(i&&o&&!pl())return ct[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const u=l.contentWindow;if(!u)return t.prototype;const c=u[e].prototype;if(!c)return l.remove(),r;const n=navigator.userAgent;return n.includes("Safari")&&!n.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),to[e]=()=>l.remove()):l.remove(),ct[e]=c}catch(l){return r}}const Ur={};function Ce(e,t,r){var s;const i=`${e}.${String(r)}`;if(Ur[i])return Ur[i].call(t);const a=Ci(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(Ur[i]=o,o.call(t)):t[r]}const Br={};function ro(e,t,r){const s=`${e}.${String(r)}`;if(Br[s])return Br[s].bind(t);const a=Ci(e)[r];return typeof a!="function"?t[r]:(Br[s]=a,a.bind(t))}function dl(e){return Ce("Node",e,"ownerDocument")}function ml(e){return Ce("Node",e,"childNodes")}function gl(e){return Ce("Node",e,"parentNode")}function yl(e){return Ce("Node",e,"parentElement")}function wl(e){return Ce("Node",e,"textContent")}function vl(e,t){return ro("Node",e,"contains")(t)}function bl(e){return ro("Node",e,"getRootNode")()}function Sl(e){return!e||!("host"in e)?null:Ce("ShadowRoot",e,"host")}function El(e){return e.styleSheets}function Cl(e){return!e||!("shadowRoot"in e)?null:Ce("Element",e,"shadowRoot")}function xl(e,t){return Ce("Element",e,"querySelector")(t)}function Rl(e,t){return Ce("Element",e,"querySelectorAll")(t)}function Ml(){var e;return[Ci("MutationObserver").constructor,(e=to.MutationObserver)!=null?e:()=>{}]}let io=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(io=()=>new Date().getTime());function Nl(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const _l={ownerDocument:dl,childNodes:ml,parentNode:gl,parentElement:yl,textContent:wl,contains:vl,getRootNode:bl,host:Sl,styleSheets:El,shadowRoot:Cl,querySelector:xl,querySelectorAll:Rl,nowTimestamp:io,mutationObserverCtor:Ml,patch:Nl},Ue=`Please stop import mirror directly. Instead of that,\r
|
|
66
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
67
|
+
or you can use record.mirror to access the mirror instance during recording.`;let $s={map:{},getId(){return console.error(Ue),-1},getNode(){return console.error(Ue),null},removeNodeFromMap(){console.error(Ue)},has(){return console.error(Ue),!1},reset(){console.error(Ue)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&($s=new Proxy($s,{get(e,t,r){return t==="map"&&console.error(Ue),Reflect.get(e,t,r)}}));function Ol(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Al(e){const t={},r=(i,a)=>{const o={value:i,parent:a,children:[]};return t[i.node.id]=o,o},s=[];for(const i of e){const{nextId:a,parentId:o}=i;if(a&&a in t){const l=t[a];if(l.parent){const u=l.parent.children.indexOf(l);l.parent.children.splice(u,0,r(i,l.parent))}else{const u=s.indexOf(l);s.splice(u,0,r(i,null))}continue}if(o in t){const l=t[o];l.children.push(r(i,l));continue}s.push(r(i,null))}return s}function so(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)so(e.children[r],t)}function zr(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function no(e,t){var r,s;const i=(s=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:s.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const a=i.getBoundingClientRect(),o=no(i,t),l=a.height/i.clientHeight;return{x:a.x*o.relativeScale+o.x,y:a.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function ft(e){return e?e instanceof ye&&"shadowRoot"in e?!!e.shadowRoot:!!_l.shadowRoot(e):!1}function Je(e,t){const r=e==null?void 0:e[t[0]];return r?t.length===1?r:Je(r.cssRules,t.slice(1)):null}function Hs(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Dl(e){const t=new Set,r=[];for(let s=e.length;s--;){const i=e[s];t.has(i.id)||(r.push(i),t.add(i.id))}return r}class Pl{constructor(){L(this,"id",1),L(this,"styleIDMap",new WeakMap),L(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let s;return r===void 0?s=this.id++:s=r,this.styleIDMap.set(t,s),this.idStyleMap.set(s,t),s}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var te=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(te||{}),Y=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Y||{}),ne=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ne||{}),bt=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(bt||{}),Xr=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Xr||{}),G=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(G||{}),Re=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Re||{}),Ys="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xe=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var ht=0;ht<Ys.length;ht++)Xe[Ys.charCodeAt(ht)]=ht;var Tl=function(e){var t=e.length*.75,r=e.length,s,i=0,a,o,l,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var c=new ArrayBuffer(t),n=new Uint8Array(c);for(s=0;s<r;s+=4)a=Xe[e.charCodeAt(s)],o=Xe[e.charCodeAt(s+1)],l=Xe[e.charCodeAt(s+2)],u=Xe[e.charCodeAt(s+3)],n[i++]=a<<2|o>>4,n[i++]=(o&15)<<4|l>>2,n[i++]=(l&3)<<6|u&63;return c};const kl=`(function() {
|
|
68
|
+
"use strict";
|
|
69
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
70
|
+
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
71
|
+
for (var i = 0; i < chars.length; i++) {
|
|
72
|
+
lookup[chars.charCodeAt(i)] = i;
|
|
73
|
+
}
|
|
74
|
+
var encode = function(arraybuffer) {
|
|
75
|
+
var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
|
|
76
|
+
for (i2 = 0; i2 < len; i2 += 3) {
|
|
77
|
+
base64 += chars[bytes[i2] >> 2];
|
|
78
|
+
base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
|
|
79
|
+
base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
|
|
80
|
+
base64 += chars[bytes[i2 + 2] & 63];
|
|
81
|
+
}
|
|
82
|
+
if (len % 3 === 2) {
|
|
83
|
+
base64 = base64.substring(0, base64.length - 1) + "=";
|
|
84
|
+
} else if (len % 3 === 1) {
|
|
85
|
+
base64 = base64.substring(0, base64.length - 2) + "==";
|
|
86
|
+
}
|
|
87
|
+
return base64;
|
|
88
|
+
};
|
|
89
|
+
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
90
|
+
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
91
|
+
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
92
|
+
const id = \`\${width}-\${height}\`;
|
|
93
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
94
|
+
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
95
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
96
|
+
offscreen.getContext("2d");
|
|
97
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
98
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
99
|
+
const base64 = encode(arrayBuffer);
|
|
100
|
+
transparentBlobMap.set(id, base64);
|
|
101
|
+
return base64;
|
|
102
|
+
} else {
|
|
103
|
+
return "";
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const worker = self;
|
|
107
|
+
worker.onmessage = async function(e) {
|
|
108
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
109
|
+
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
110
|
+
const transparentBase64 = getTransparentBlobFor(
|
|
111
|
+
width,
|
|
112
|
+
height,
|
|
113
|
+
dataURLOptions
|
|
114
|
+
);
|
|
115
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
116
|
+
const ctx = offscreen.getContext("2d");
|
|
117
|
+
ctx.drawImage(bitmap, 0, 0);
|
|
118
|
+
bitmap.close();
|
|
119
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
120
|
+
const type = blob.type;
|
|
121
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
122
|
+
const base64 = encode(arrayBuffer);
|
|
123
|
+
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
124
|
+
lastBlobMap.set(id, base64);
|
|
125
|
+
return worker.postMessage({ id });
|
|
126
|
+
}
|
|
127
|
+
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
128
|
+
worker.postMessage({
|
|
129
|
+
id,
|
|
130
|
+
type,
|
|
131
|
+
base64,
|
|
132
|
+
width,
|
|
133
|
+
height
|
|
134
|
+
});
|
|
135
|
+
lastBlobMap.set(id, base64);
|
|
136
|
+
} else {
|
|
137
|
+
return worker.postMessage({ id: e.data.id });
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
})();
|
|
141
|
+
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
142
|
+
`;typeof self!="undefined"&&self.Blob&&new Blob([kl],{type:"text/javascript;charset=utf-8"});try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Pi=e.contentWindow)==null?void 0:Pi.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}An();function Il(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(i){i(r)}),(s=e.get("*"))&&s.slice().map(function(i){i(t,r)})}}}function Ll(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,s=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function o(b){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(b)}const l=o(e.navigator.userAgent)?1:0;function u(b,w){this.scrollLeft=b,this.scrollTop=w}function c(b){return .5*(1-Math.cos(Math.PI*b))}function n(b){if(b===null||typeof b!="object"||b.behavior===void 0||b.behavior==="auto"||b.behavior==="instant")return!0;if(typeof b=="object"&&b.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+b.behavior+" is not a valid value for enumeration ScrollBehavior.")}function p(b,w){if(w==="Y")return b.clientHeight+l<b.scrollHeight;if(w==="X")return b.clientWidth+l<b.scrollWidth}function f(b,w){const S=e.getComputedStyle(b,null)["overflow"+w];return S==="auto"||S==="scroll"}function h(b){const w=p(b,"Y")&&f(b,"Y"),S=p(b,"X")&&f(b,"X");return w||S}function d(b){for(;b!==t.body&&h(b)===!1;)b=b.parentNode||b.host;return b}function m(b){const w=a();let S,E,y,v=(w-b.startTime)/s;v=v>1?1:v,S=c(v),E=b.startX+(b.x-b.startX)*S,y=b.startY+(b.y-b.startY)*S,b.method.call(b.scrollable,E,y),(E!==b.x||y!==b.y)&&e.requestAnimationFrame(m.bind(e,b))}function g(b,w,S){let E,y,v,C;const x=a();b===t.body?(E=e,y=e.scrollX||e.pageXOffset,v=e.scrollY||e.pageYOffset,C=i.scroll):(E=b,y=b.scrollLeft,v=b.scrollTop,C=u),m({scrollable:E,method:C,startTime:x,startX:y,startY:v,x:w,y:S})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])){i.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(n(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const b=arguments[0].left,w=arguments[0].top;g.call(this,this,typeof b=="undefined"?this.scrollLeft:~~b,typeof w=="undefined"?this.scrollTop:~~w)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(n(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const b=d(this),w=b.getBoundingClientRect(),S=this.getBoundingClientRect();b!==t.body?(g.call(this,b,b.scrollLeft+S.left-w.left,b.scrollTop+S.top-w.top),e.getComputedStyle(b).position!=="fixed"&&e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):e.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}class Fl{constructor(t=[],r){L(this,"timeOffset",0),L(this,"speed"),L(this,"actions"),L(this,"raf",null),L(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const s=this.findActionIndex(t);this.actions.splice(s,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}updateLiveTime(){this.raf===!0&&this.rafCheck()}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,s=this.actions.length-1;for(;r<=s;){const i=Math.floor((r+s)/2);if(this.actions[i].delay<t.delay)r=i+1;else if(this.actions[i].delay>t.delay)s=i-1;else return i+1}return r}}function Js(e,t){if(e.type===te.IncrementalSnapshot&&e.data.source===Y.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,s=e.timestamp+r;return e.delay=s-t,s-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
143
|
+
Copyright (c) Microsoft Corporation.
|
|
144
|
+
|
|
145
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
146
|
+
purpose with or without fee is hereby granted.
|
|
147
|
+
|
|
148
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
149
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
150
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
151
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
152
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
153
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
154
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
155
|
+
***************************************************************************** */function Xs(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,i,a=r.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(s=a.next()).done;)o.push(s.value)}catch(l){i={error:l}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}var qe;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(qe||(qe={}));var oo={type:"xstate.init"};function qr(e){return e===void 0?[]:[].concat(e)}function Be(e){return{type:"xstate.assign",assignment:e}}function Qs(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function St(e){return function(t){return e===t}}function ao(e){return typeof e=="string"?{type:e}:e}function Ks(e,t){return{value:e,context:t,actions:[],changed:!1,matches:St(e)}}function Zs(e,t,r){var s=t,i=!1;return[e.filter(function(a){if(a.type==="xstate.assign"){i=!0;var o=Object.assign({},s);return typeof a.assignment=="function"?o=a.assignment(s,r):Object.keys(a.assignment).forEach(function(l){o[l]=typeof a.assignment[l]=="function"?a.assignment[l](s,r):a.assignment[l]}),s=o,!1}return!0}),s,i]}function lo(e,t){t===void 0&&(t={});var r=Xs(Zs(qr(e.states[e.initial].entry).map(function(o){return Qs(o,t.actions)}),e.context,oo),2),s=r[0],i=r[1],a={config:e,_options:t,initialState:{value:e.initial,actions:s,context:i,matches:St(e.initial)},transition:function(o,l){var u,c,n=typeof o=="string"?{value:o,context:e.context}:o,p=n.value,f=n.context,h=ao(l),d=e.states[p];if(d.on){var m=qr(d.on[h.type]);try{for(var g=function(U){var J=typeof Symbol=="function"&&Symbol.iterator,ee=J&&U[J],q=0;if(ee)return ee.call(U);if(U&&typeof U.length=="number")return{next:function(){return U&&q>=U.length&&(U=void 0),{value:U&&U[q++],done:!U}}};throw new TypeError(J?"Object is not iterable.":"Symbol.iterator is not defined.")}(m),b=g.next();!b.done;b=g.next()){var w=b.value;if(w===void 0)return Ks(p,f);var S=typeof w=="string"?{target:w}:w,E=S.target,y=S.actions,v=y===void 0?[]:y,C=S.cond,x=C===void 0?function(){return!0}:C,A=E===void 0,M=E!=null?E:p,z=e.states[M];if(x(f,h)){var k=Xs(Zs((A?qr(v):[].concat(d.exit,v,z.entry).filter(function(U){return U})).map(function(U){return Qs(U,a._options.actions)}),f,h),3),R=k[0],W=k[1],K=k[2],B=E!=null?E:p;return{value:B,context:W,actions:R,changed:E!==p||R.length>0||K,matches:St(B)}}}}catch(U){u={error:U}}finally{try{b&&!b.done&&(c=g.return)&&c.call(g)}finally{if(u)throw u.error}}}return Ks(p,f)}};return a}var en=function(e,t){return e.actions.forEach(function(r){var s=r.exec;return s&&s(e.context,t)})};function uo(e){var t=e.initialState,r=qe.NotStarted,s=new Set,i={_machine:e,send:function(a){r===qe.Running&&(t=e.transition(t,a),en(t,ao(a)),s.forEach(function(o){return o(t)}))},subscribe:function(a){return s.add(a),a(t),{unsubscribe:function(){return s.delete(a)}}},start:function(a){if(a){var o=typeof a=="object"?a:{context:e.config.context,value:a};t={value:o.value,actions:[],context:o.context,matches:St(o.value)}}return r=qe.Running,en(t,oo),i},stop:function(){return r=qe.Stopped,s.clear(),i},get state(){return t},get status(){return r}};return i}function Ul(e,t){for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type===te.Meta&&s.timestamp<=t)return e.slice(r)}return e}function Bl(e,{getCastFn:t,applyEventsSynchronously:r,emitter:s}){const i=lo({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Be({lastPlayedEvent:(a,o)=>o.type==="CAST_EVENT"?o.payload.event:a.lastPlayedEvent}),recordTimeOffset:Be((a,o)=>{let l=a.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),le(H({},a),{timeOffset:l,baselineTime:a.events[0].timestamp+l})}),play(a){var o;const{timer:l,events:u,baselineTime:c,lastPlayedEvent:n}=a;l.clear();for(const d of u)Js(d,c);const p=Ul(u,c);let f=n==null?void 0:n.timestamp;(n==null?void 0:n.type)===te.IncrementalSnapshot&&n.data.source===Y.MouseMove&&(f=n.timestamp+((o=n.data.positions[0])==null?void 0:o.timeOffset)),c<(f||0)&&s.emit(G.PlayBack);const h=new Array;for(const d of p)if(!(f&&f<c&&(d.timestamp<=f||d===n)))if(d.timestamp<c)h.push(d);else{const m=t(d,!1);l.addAction({doAction:()=>{m()},delay:d.delay})}r(h),s.emit(G.Flush),l.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:Be(a=>le(H({},a),{lastPlayedEvent:null})),startLive:Be({baselineTime:(a,o)=>(a.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:Be((a,o)=>{const{baselineTime:l,timer:u,events:c}=a;if(o.type==="ADD_EVENT"){const{event:n}=o.payload;Js(n,l);let p=c.length-1;if(!c[p]||c[p].timestamp<=n.timestamp)c.push(n);else{let d=-1,m=0;for(;m<=p;){const g=Math.floor((m+p)/2);c[g].timestamp<=n.timestamp?m=g+1:p=g-1}d===-1&&(d=m),c.splice(d,0,n)}const f=n.timestamp<l,h=t(n,f);f?h():u.isActive()&&u.addAction({doAction:()=>{h()},delay:n.delay})}return le(H({},a),{events:c})})}});return uo(i)}function zl(e){const t=lo({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,s)=>{"payload"in s&&r.timer.setSpeed(s.payload.speed)},recordSpeed:Be({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return uo(t)}const ql=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],tn=new Map;function co(e,t){let r=tn.get(e);return r||(r=new Map,tn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Me(e,t,r){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(r&&(r.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const i=await Me(e,t,r)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(r||t===null)return s;const{rr_type:i,index:a}=s;return co(t,i)[a]}else if("args"in s){const{rr_type:i,args:a}=s,o=window[i];return new o(...await Promise.all(a.map(Me(e,t,r))))}else{if("base64"in s)return Tl(s.base64);if("src"in s){const i=e.get(s.src);if(i)return i;{const a=new Image;return a.src=s.src,e.set(s.src,a),a}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(Me(e,t,r)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Me(e,t,r)));return s}}function Wl(e,t){try{return t===bt.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const Vl=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function jl(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!Vl.includes(r))return;const s=co(e,r);s.includes(t)||s.push(t)}async function Gl({mutation:e,target:t,type:r,imageMap:s,errorHandler:i}){try{const a=Wl(t,r);if(!a)return;if(e.setter){a[e.property]=e.args[0];return}const o=a[e.property],l=await Promise.all(e.args.map(Me(s,a))),u=o.apply(a,l);jl(a,u);const c=!1}catch(a){i(e,a)}}async function $l({event:e,mutations:t,target:r,imageMap:s,errorHandler:i}){const a=r.getContext("2d");if(!a){i(t[0],new Error("Canvas context is null"));return}const o=t.map(async u=>Promise.all(u.args.map(Me(s,a))));(await Promise.all(o)).forEach((u,c)=>{const n=t[c];try{if(n.setter){a[n.property]=n.args[0];return}const p=a[n.property];n.property==="drawImage"&&typeof n.args[0]=="string"?(s.get(e),p.apply(a,n.args)):p.apply(a,u)}catch(p){i(n,p)}})}async function rn({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:i,errorHandler:a}){try{const o=i.get(e)||t,l="commands"in o?o.commands:[o];if([bt.WebGL,bt.WebGL2].includes(t.type)){for(let u=0;u<l.length;u++){const c=l[u];await Gl({mutation:c,type:t.type,target:r,imageMap:s,errorHandler:a})}return}await $l({event:e,mutations:l,target:r,imageMap:s,errorHandler:a})}catch(o){a(t,o)}}class Hl{constructor(t){L(this,"mediaMap",new Map),L(this,"warn"),L(this,"service"),L(this,"speedService"),L(this,"emitter"),L(this,"getCurrentTime"),L(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(G.Start,this.start.bind(this)),this.emitter.on(G.SkipStart,this.start.bind(this)),this.emitter.on(G.Pause,this.pause.bind(this)),this.emitter.on(G.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,s)=>{this.syncTargetWithState(s),t.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:s}){if(s.isPlaying){const a=(t-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in r&&r.duration;if(Number.isNaN(o)){this.waitForMetadata(r);return}let l=s.currentTimeAtLastInteraction+a;r.loop&&o!==!1&&(l=l%o),r.currentTime=l}else r.pause(),r.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const s=this.mediaMap.get(t);s&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:s}){var h,d,m,g,b;const i=this.mediaMap.get(t),{type:a,playbackRate:o,currentTime:l,muted:u,volume:c,loop:n}=s;return{isPlaying:a===Xr.Play||a!==Xr.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(h=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?h:0,lastInteractionTimeOffset:r,playbackRate:(d=o!=null?o:i==null?void 0:i.playbackRate)!=null?d:1,volume:(m=c!=null?c:i==null?void 0:i.volume)!=null?m:1,muted:(g=u!=null?u:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(b=n!=null?n:i==null?void 0:i.loop)!=null?b:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:i,volume:a,isPlaying:o}=r,l=this.service.state.matches("paused"),u=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==a&&(t.volume=a),t.muted=s,t.loop=i,t.playbackRate!==u&&(t.playbackRate=u),o&&!l?t.play():t.pause()}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}}addMediaElements(t,r,s){if(!["AUDIO","VIDEO"].includes(t.nodeName))return;const i=t,a=s.getMeta(i);if(!a||!("attributes"in a))return;const o=this.service.state.matches("paused"),l=a.attributes;let u=!1;l.rr_mediaState?u=l.rr_mediaState==="played":u=i.getAttribute("autoplay")!==null,u&&o&&i.pause();let c=1;typeof l.rr_mediaPlaybackRate=="number"&&(c=l.rr_mediaPlaybackRate);let n=!1;typeof l.rr_mediaMuted=="boolean"?n=l.rr_mediaMuted:n=i.getAttribute("muted")!==null;let p=!1;typeof l.rr_mediaLoop=="boolean"?p=l.rr_mediaLoop:p=i.getAttribute("loop")!==null;let f=1;typeof l.rr_mediaVolume=="number"&&(f=l.rr_mediaVolume);let h=0;typeof l.rr_mediaCurrentTime=="number"&&(h=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:u,currentTimeAtLastInteraction:h,lastInteractionTimeOffset:r,playbackRate:c,volume:f,muted:n,loop:p}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:s}){this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t)}isSupportedMediaElement(t){return["AUDIO","VIDEO"].includes(t.nodeName)}reset(){this.mediaMap.clear()}}function pt(e,t){if(e.nodeName!=="DIALOG"||e instanceof ye)return;const r=e,s=r.open,i=s&&r.matches("dialog:modal"),a=r.getAttribute("rr_open_mode"),o=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",l=a==="modal";if(!(s&&!(i&&a==="non-modal"||!i&&l))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),o&&(l?r.showModal():r.show())}}function Yl(e,t){if(e.nodeName!=="DIALOG"||e instanceof ye)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const Jl=5*1e3,Xl=Il,sn="[replayer]",Wr={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function nn(e){return e.type==te.IncrementalSnapshot&&(e.data.source==Y.TouchMove||e.data.source==Y.MouseInteraction&&e.data.type==ne.TouchStart)}class Ql{constructor(t,r){if(L(this,"wrapper"),L(this,"iframe"),L(this,"UNSAFE_replayCanvas",!1),L(this,"service"),L(this,"speedService"),L(this,"config"),L(this,"usingVirtualDom",!1),L(this,"virtualDom",new $e),L(this,"mouse"),L(this,"mouseTail",null),L(this,"tailPositions",[]),L(this,"emitter",Xl()),L(this,"nextUserInteractionEvent"),L(this,"legacy_missingNodeRetryMap",{}),L(this,"cache",fs()),L(this,"imageMap",new Map),L(this,"canvasEventMap",new Map),L(this,"mirror",An()),L(this,"styleMirror",new Pl),L(this,"mediaManager"),L(this,"firstFullSnapshot",null),L(this,"newDocumentQueue",[]),L(this,"mousePos",null),L(this,"touchActive",null),L(this,"lastMouseDownEvent",null),L(this,"lastHoveredRootNode"),L(this,"lastSelectionData",null),L(this,"constructedStyleMutations",[]),L(this,"adoptedStyleSheets",[]),L(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const u of[this.mouseTail,this.iframe])u&&(u.setAttribute("width",String(l.width)),u.setAttribute("height",String(l.height)))}),L(this,"applyEventsSynchronously",l=>{for(const u of l){switch(u.type){case te.DomContentLoaded:case te.Load:case te.Custom:continue;case te.FullSnapshot:case te.Meta:case te.Plugin:case te.IncrementalSnapshot:break}this.getCastFn(u,!0)()}}),L(this,"getCastFn",(l,u=!1)=>{let c;switch(l.type){case te.DomContentLoaded:case te.Load:break;case te.Custom:c=()=>{this.emitter.emit(G.CustomEvent,l)};break;case te.Meta:c=()=>this.emitter.emit(G.Resize,{width:l.data.width,height:l.data.height});break;case te.FullSnapshot:c=()=>{var p;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,u),(p=this.iframe.contentWindow)==null||p.scrollTo(l.data.initialOffset)};break;case te.IncrementalSnapshot:c=()=>{if(this.applyIncremental(l,u),!u&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const p of this.service.state.context.events)if(!(p.timestamp<=l.timestamp)&&this.isUserInteraction(p)){p.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=p);break}if(this.nextUserInteractionEvent){const p=this.nextUserInteractionEvent.delay-l.delay,f={speed:Math.min(Math.round(p/Jl),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(G.SkipStart,f)}}};break}return()=>{c&&c();for(const f of this.config.plugins||[])f.handler&&f.handler(l,u,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const p=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[p]){const f=()=>{p<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(G.Finish))};let h=50;l.type===te.IncrementalSnapshot&&l.data.source===Y.MouseMove&&l.data.positions.length&&(h+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(f,h)}this.emitter.emit(G.EventCast,l)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Wr,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(G.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(G.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(u,c,n)=>{rn({event:u,mutation:c,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(u,c)=>{u.source===Y.StyleSheetRule?this.applyStyleSheetRule(u,c):u.source===Y.StyleDeclaration&&this.applyStyleDeclaration(u,c)},afterAppend:(u,c)=>{for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(u,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{wt(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(u){console.warn(u)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],n=vt(c.node,this.mirror,this.virtualDom.mirror);wt(n,c.node,l,this.virtualDom.mirror),c.node=n}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(u=>{this.applyStyleSheetMutation(u)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(u=>{this.applyAdoptedStyleSheet(u)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,u]=this.lastMouseDownEvent;l.dispatchEvent(u)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(G.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Fl([],{speed:this.config.speed});this.service=Bl({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,u)=>l.timestamp-u.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(G.StateChange,{player:l})}),this.speedService=zl({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(G.StateChange,{speed:l})}),this.mediaManager=new Hl({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const a=this.service.state.context.events.find(l=>l.type===te.Meta),o=this.service.state.context.events.find(l=>l.type===te.FullSnapshot);if(a){const{width:l,height:u}=a.data;setTimeout(()=>{this.emitter.emit(G.Resize,{width:l,height:u})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(nn)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.config.liveMode&&this.timer.updateLiveTime(),this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(G.Start)}pause(t){var r,s;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(G.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(G.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(G.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;nn(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=fs()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.config.UNSAFE_replayCanvas?(this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin allow-scripts"),this.wrapper.appendChild(this.iframe),this.UNSAFE_replayCanvas=!0):(this.iframe=Ea({root:this.wrapper}),this.UNSAFE_replayCanvas=!1),this.iframe.style.display="none",this.disableInteract(),this.iframe.contentWindow&&this.iframe.contentDocument&&(Ll(this.iframe.contentWindow,this.iframe.contentDocument),Ol(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],i=new Set,a=(u,c)=>{if(u.nodeName==="DIALOG"&&i.add(u),this.collectIframeAndAttachDocument(s,u),this.mediaManager.isSupportedMediaElement(u)){const{events:n}=this.service.state.context;this.mediaManager.addMediaElements(u,t.timestamp-n[0].timestamp,this.mirror)}for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(u,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Sa(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a,cache:this.cache,mirror:this.mirror,UNSAFE_allowUnprotectedRebuild:this.UNSAFE_replayCanvas}),a(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:u,builtNode:c}of s)this.attachDocumentToIframe(u,c),this.newDocumentQueue=this.newDocumentQueue.filter(n=>n!==u);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(u=>pt(u)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(G.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var s;const i=ql(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const a=this.virtualDom.createElement("style");this.virtualDom.mirror.add(a,eo(a,this.virtualDom.unserializedId)),t.insertBefore(a,r),a.rules.push({source:Y.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const a=document.createElement("style");t.insertBefore(a,r);for(let o=0;o<i.length;o++)(s=a.sheet)==null||s.insertRule(i[o],o)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],a=new Set,o=(l,u)=>{l.nodeName==="DIALOG"&&a.add(l),this.collectIframeAndAttachDocument(i,l);const c=s.getMeta(l);if((c==null?void 0:c.type)===Re.Element&&(c==null?void 0:c.tagName.toUpperCase())==="HTML"){const{documentElement:n,head:p}=r.contentDocument;this.insertStyleRules(n,p)}if(!this.usingVirtualDom)for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(l,{id:u,replayer:this})};Ke(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(r.contentDocument,t.node.id);for(const{mutationInQueue:l,builtNode:u}of i)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);a.forEach(l=>pt(l))}collectIframeAndAttachDocument(t,r){if(zr(r,this.mirror)){const s=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));s&&t.push({mutationInQueue:s,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const s=new Set;let i,a=this.service.state;const o=()=>{a=this.service.state};this.emitter.on(G.Start,o),this.emitter.on(G.Pause,o);const l=()=>{this.emitter.off(G.Start,o),this.emitter.off(G.Pause,o)};r.querySelectorAll('link[rel="stylesheet"]').forEach(u=>{u.sheet||(s.add(u),u.addEventListener("load",()=>{s.delete(u),s.size===0&&i!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(G.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(G.LoadStylesheetStart),i=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===te.IncrementalSnapshot&&r.data.source===Y.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const s=document.createElement("canvas"),i=s.getContext("2d"),a=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(a,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const s={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async a=>{const o=await Promise.all(a.args.map(Me(this.imageMap,null,s)));return le(H({},a),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,le(H({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(Me(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,le(H({},t),{args:i}))}}}applyIncremental(t,r){var s,i,a;const{data:o}=t;switch(o.source){case Y.Mutation:{try{this.applyMutation(o,r)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case Y.Drag:case Y.TouchMove:case Y.MouseMove:if(r){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const u={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,r,o)},delay:l.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(u)}),this.timer.addAction({doAction(){},delay:t.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case Y.MouseInteraction:{if(o.id===-1)break;const l=new Event(Ho(ne[o.type])),u=this.mirror.getNode(o.id);if(!u)return this.debugNodeNotFound(o,o.id);this.emitter.emit(G.MouseInteraction,{type:o.type,target:u});const{triggerFocus:c}=this.config;switch(o.type){case ne.Blur:"blur"in u&&u.blur();break;case ne.Focus:c&&u.focus&&u.focus({preventScroll:!0});break;case ne.Click:case ne.TouchStart:case ne.TouchEnd:case ne.MouseDown:case ne.MouseUp:r?(o.type===ne.TouchStart?this.touchActive=!0:o.type===ne.TouchEnd&&(this.touchActive=!1),o.type===ne.MouseDown?this.lastMouseDownEvent=[u,l]:o.type===ne.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===ne.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,r,o),o.type===ne.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===ne.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===ne.TouchEnd?this.mouse.classList.remove("touch-active"):u.dispatchEvent(l));break;case ne.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:u.dispatchEvent(l)}break}case Y.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,r);break}case Y.ViewportResize:this.emitter.emit(G.Resize,{width:o.width,height:o.height});break;case Y.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case Y.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const u=l,{events:c}=this.service.state.context;this.mediaManager.mediaMutation({target:u,timeOffset:t.timestamp-c[0].timestamp,mutation:o});break}case Y.StyleSheetRule:case Y.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case Y.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:t,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);rn({event:t,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case Y.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(l)}catch(l){this.warn(l)}break}case Y.Selection:{if(r){this.lastSelectionData=o;break}this.applySelection(o);break}case Y.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,cl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const c in this.legacy_missingNodeRetryMap)try{const n=this.legacy_missingNodeRetryMap[c],p=Zn(n.node,this.virtualDom,this.mirror);p&&(n.node=p)}catch(n){this.warn(n)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(c=>s.getNode(c.id)?!0:(this.warnNodeNotFound(t,c.id),!1)),t.removes.forEach(c=>{var n;const p=s.getNode(c.id);if(!p)return;let f=s.getNode(c.parentId);if(!f)return this.warnNodeNotFound(t,c.parentId);if(c.isShadow&&ft(f)&&(f=f.shadowRoot),s.removeNodeFromMap(p),f)try{f.removeChild(p),this.usingVirtualDom&&p.nodeName==="#text"&&f.nodeName==="STYLE"&&((n=f.rules)==null?void 0:n.length)>0&&(f.rules=[])}catch(h){if(h instanceof DOMException)this.warn("parent could not remove child in mutation",f,p,t);else throw h}});const i=H({},this.legacy_missingNodeRetryMap),a=[],o=c=>{let n=null;return c.nextId&&(n=s.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!n},l=c=>{var n,p;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=s.getNode(c.parentId);if(!f)return c.node.type===Re.Document?this.newDocumentQueue.push(c):a.push(c);c.node.isShadow&&(ft(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let h=null,d=null;if(c.previousId&&(h=s.getNode(c.previousId)),c.nextId&&(d=s.getNode(c.nextId)),o(c))return a.push(c);if(c.node.rootId&&!s.getNode(c.node.rootId))return;const m=c.node.rootId?s.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(zr(f,s)){this.attachDocumentToIframe(c,f);return}const g=(S,E)=>{if(!this.usingVirtualDom){pt(S);for(const y of this.config.plugins||[])y.onBuild&&y.onBuild(S,{id:E,replayer:this})}},b=Ke(c.node,{doc:m,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(c.previousId===-1||c.nextId===-1){i[c.node.id]={node:b,mutation:c};return}const w=s.getMeta(f);if(w&&w.type===Re.Element&&c.node.type===Re.Text){const S=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(w.tagName==="textarea")for(const E of S)E.nodeType===f.TEXT_NODE&&f.removeChild(E);else if(w.tagName==="style"&&S.length===1)for(const E of S)E.nodeType===f.TEXT_NODE&&!s.hasNode(E)&&(b.textContent=E.textContent,f.removeChild(E))}else if((w==null?void 0:w.type)===Re.Document){const S=f;c.node.type===Re.DocumentType&&((n=S.childNodes[0])==null?void 0:n.nodeType)===Node.DOCUMENT_TYPE_NODE&&S.removeChild(S.childNodes[0]),b.nodeName==="HTML"&&S.documentElement&&S.removeChild(S.documentElement)}if(h&&h.nextSibling&&h.nextSibling.parentNode?f.insertBefore(b,h.nextSibling):d&&d.parentNode?f.contains(d)?f.insertBefore(b,d):f.insertBefore(b,null):f.appendChild(b),g(b,c.node.id),this.usingVirtualDom&&b.nodeName==="#text"&&f.nodeName==="STYLE"&&((p=f.rules)==null?void 0:p.length)>0&&(f.rules=[]),zr(b,this.mirror)){const S=this.mirror.getId(b),E=this.newDocumentQueue.find(y=>y.parentId===S);E&&(this.attachDocumentToIframe(E,b),this.newDocumentQueue=this.newDocumentQueue.filter(y=>y!==E))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(i,f,b,c)};t.adds.forEach(c=>{l(c)});const u=Date.now();for(;a.length;){const c=Al(a);if(a.length=0,Date.now()-u>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(const n of c)s.getNode(n.value.parentId)?so(n,f=>{l(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",n)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Dl(t.texts).forEach(c=>{var n;const p=s.getNode(c.id);if(!p)return t.removes.find(h=>h.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);const f=p.parentElement;if(c.value&&f&&f.tagName==="STYLE"?p.textContent=_t(c.value,this.cache):p.textContent=c.value,this.usingVirtualDom){const h=p.parentNode;((n=h==null?void 0:h.rules)==null?void 0:n.length)>0&&(h.rules=[])}}),t.attributes.forEach(c=>{var n;const p=s.getNode(c.id);if(!p)return t.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);for(const f in c.attributes)if(typeof f=="string"){const h=c.attributes[f];if(h===null)p.removeAttribute(f),f==="open"&&Yl(p,c);else if(typeof h=="string")try{if(f==="_cssText"&&(p.nodeName==="LINK"||p.nodeName==="STYLE"))try{const d=s.getMeta(p),m=Ke(le(H({},d),{attributes:H(H({},d.attributes),c.attributes)}),{doc:p.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(d.attributes,c.attributes);const g=p.nextSibling,b=p.parentNode;if(m&&b){b.removeChild(p),b.insertBefore(m,g),s.replace(c.id,m);break}}catch(d){}if(f==="value"&&p.nodeName==="TEXTAREA"){const d=p;d.childNodes.forEach(g=>d.removeChild(g));const m=(n=p.ownerDocument)==null?void 0:n.createTextNode(h);m&&d.appendChild(m)}else p.setAttribute(f,h);f==="rr_open_mode"&&p.nodeName==="DIALOG"&&pt(p,c)}catch(d){this.warn("An error occurred may due to the checkout feature.",d)}else if(f==="style"){const d=h,m=p;for(const g in d)if(d[g]===!1)m.style.removeProperty(g);else if(d[g]instanceof Array){const b=d[g];m.style.setProperty(g,b[0],b[1])}else{const b=d[g];m.style.setProperty(g,b)}}}})}applyScroll(t,r){var s,i;const a=this.mirror.getNode(t.id);if(!a)return this.debugNodeNotFound(t,t.id);const o=this.mirror.getMeta(a);if(a===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((o==null?void 0:o.type)===Re.Document)(i=a.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(l){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(s){}}applySelection(t){try{const r=new Set,s=t.ranges.map(({start:i,startOffset:a,end:o,endOffset:l})=>{const u=this.mirror.getNode(i),c=this.mirror.getNode(o);if(!u||!c)return;const n=new Range;n.setStart(u,a),n.setEnd(c,l);const p=u.ownerDocument,f=p==null?void 0:p.getSelection();return f&&r.add(f),{range:n,selection:f}});r.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var a;return i&&((a=i.selection)==null?void 0:a.addRange(i.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let s=null;t.styleId?s=this.styleMirror.getStyle(t.styleId):t.id&&(s=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),s&&(t.source===Y.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===Y.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,i,a,o;if((s=t.adds)==null||s.forEach(({rule:l,index:u})=>{try{if(Array.isArray(u)){const{positions:c,index:n}=Hs(u),p=Je(r.cssRules,c);p==null||p.insertRule(l,n)}else{const c=u===void 0?void 0:Math.min(u,r.cssRules.length);r==null||r.insertRule(l,c)}}catch(c){}}),(i=t.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=Hs(l),n=Je(r.cssRules,u);n==null||n.deleteRule(c||0)}else r==null||r.deleteRule(l)}catch(u){}}),typeof t.replace=="string")try{(a=r.replace)==null||a.call(r,t.replace)}catch(l){}if(typeof t.replaceSync=="string")try{(o=r.replaceSync)==null||o.call(r,t.replaceSync)}catch(l){}}applyStyleDeclaration(t,r){if(t.set){const s=Je(r.rules,t.index);s!=null&&s.style&&s.style.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){const s=Je(r.rules,t.index);s!=null&&s.style&&s.style.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var r;const s=this.mirror.getNode(t.id);if(!s)return;(r=t.styles)==null||r.forEach(l=>{var u;let c=null,n=null;if(ft(s)?n=((u=s.ownerDocument)==null?void 0:u.defaultView)||null:s.nodeName==="#document"&&(n=s.defaultView),!!n)try{c=new n.CSSStyleSheet,this.styleMirror.add(c,l.styleId),this.applyStyleSheetRule({source:Y.StyleSheetRule,adds:l.rules},c)}catch(p){}});const i=10;let a=0;const o=(l,u)=>{const c=u.map(n=>this.styleMirror.getStyle(n)).filter(n=>n!==null);ft(l)?l.shadowRoot.adoptedStyleSheets=c:l.nodeName==="#document"&&(l.adoptedStyleSheets=c),c.length!==u.length&&a<i&&(setTimeout(()=>o(l,u),0+100*a),a++)};o(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,i){const{previousId:a,nextId:o}=i,l=a&&t[a],u=o&&t[o];if(l){const{node:c,mutation:n}=l;r.insertBefore(c,s),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,c,n)}if(u){const{node:c,mutation:n}=u;r.insertBefore(c,s.nextSibling),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,c,n)}}moveAndHover(t,r,s,i,a){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(a,s);const l=no(o,this.iframe),u=t*l.absoluteScale+l.x,c=r*l.absoluteScale+l.y;this.mouse.style.left=`${u}px`,this.mouse.style.top=`${c}px`,i||this.drawMouseTail({x:u,y:c}),this.hoverElements(o)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:i,duration:a}=this.config.mouseTail===!0?Wr:Object.assign({},Wr,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=s,l.lineCap=r,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(u=>l.lineTo(u.x,u.y)),l.stroke())};this.tailPositions.push(t),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==t),o()},a/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let s=t;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(t){return t.type!==te.IncrementalSnapshot?!1:t.data.source>Y.Mutation&&t.data.source<=Y.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(G.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(sn,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(sn,...t)}}var pe=Uint8Array,Ne=Uint16Array,Qr=Uint32Array,fo=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ho=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Kl=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),po=function(e,t){for(var r=new Ne(31),s=0;s<31;++s)r[s]=t+=1<<e[s-1];for(var i=new Qr(r[30]),s=1;s<30;++s)for(var a=r[s];a<r[s+1];++a)i[a]=a-r[s]<<5|s;return[r,i]},mo=po(fo,2),go=mo[0],Zl=mo[1];go[28]=258,Zl[258]=28;var eu=po(ho,0),tu=eu[0],Kr=new Ne(32768);for(var X=0;X<32768;++X){var xe=(X&43690)>>>1|(X&21845)<<1;xe=(xe&52428)>>>2|(xe&13107)<<2,xe=(xe&61680)>>>4|(xe&3855)<<4,Kr[X]=((xe&65280)>>>8|(xe&255)<<8)>>>1}var Ze=function(e,t,r){for(var s=e.length,i=0,a=new Ne(t);i<s;++i)++a[e[i]-1];var o=new Ne(t);for(i=0;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var l;if(r){l=new Ne(1<<t);var u=15-t;for(i=0;i<s;++i)if(e[i])for(var c=i<<4|e[i],n=t-e[i],p=o[e[i]-1]++<<n,f=p|(1<<n)-1;p<=f;++p)l[Kr[p]>>>u]=c}else for(l=new Ne(s),i=0;i<s;++i)l[i]=Kr[o[e[i]-1]++]>>>15-e[i];return l},st=new pe(288);for(var X=0;X<144;++X)st[X]=8;for(var X=144;X<256;++X)st[X]=9;for(var X=256;X<280;++X)st[X]=7;for(var X=280;X<288;++X)st[X]=8;var yo=new pe(32);for(var X=0;X<32;++X)yo[X]=5;var ru=Ze(st,9,1),iu=Ze(yo,5,1),Vr=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},de=function(e,t,r){var s=t/8>>0;return(e[s]|e[s+1]<<8)>>>(t&7)&r},jr=function(e,t){var r=t/8>>0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>>(t&7)},su=function(e){return(e/8>>0)+(e&7&&1)},wo=function(e,t,r){(r==null||r>e.length)&&(r=e.length);var s=new(e instanceof Ne?Ne:e instanceof Qr?Qr:pe)(r-t);return s.set(e.subarray(t,r)),s},nu=function(e,t,r){var s=e.length,i=!t||r,a=!r||r.i;r||(r={}),t||(t=new pe(s*3));var o=function(_){var P=t.length;if(_>P){var j=new pe(Math.max(P*2,_));j.set(t),t=j}},l=r.f||0,u=r.p||0,c=r.b||0,n=r.l,p=r.d,f=r.m,h=r.n,d=s*8;do{if(!n){r.f=l=de(e,u,1);var m=de(e,u+1,3);if(u+=3,m)if(m==1)n=ru,p=iu,f=9,h=5;else if(m==2){var S=de(e,u,31)+257,E=de(e,u+10,15)+4,y=S+de(e,u+5,31)+1;u+=14;for(var v=new pe(y),C=new pe(19),x=0;x<E;++x)C[Kl[x]]=de(e,u+x*3,7);u+=E*3;var A=Vr(C),M=(1<<A)-1;if(!a&&u+y*(A+7)>d)break;for(var z=Ze(C,A,1),x=0;x<y;){var k=z[de(e,u,M)];u+=k&15;var g=k>>>4;if(g<16)v[x++]=g;else{var R=0,W=0;for(g==16?(W=3+de(e,u,3),u+=2,R=v[x-1]):g==17?(W=3+de(e,u,7),u+=3):g==18&&(W=11+de(e,u,127),u+=7);W--;)v[x++]=R}}var K=v.subarray(0,S),B=v.subarray(S);f=Vr(K),h=Vr(B),n=Ze(K,f,1),p=Ze(B,h,1)}else throw"invalid block type";else{var g=su(u)+4,b=e[g-4]|e[g-3]<<8,w=g+b;if(w>s){if(a)throw"unexpected EOF";break}i&&o(c+b),t.set(e.subarray(g,w),c),r.b=c+=b,r.p=u=w*8;continue}if(u>d)throw"unexpected EOF"}i&&o(c+131072);for(var U=(1<<f)-1,J=(1<<h)-1,ee=f+h+18;a||u+ee<d;){var R=n[jr(e,u)&U],q=R>>>4;if(u+=R&15,u>d)throw"unexpected EOF";if(!R)throw"invalid length/literal";if(q<256)t[c++]=q;else if(q==256){n=null;break}else{var I=q-254;if(q>264){var x=q-257,ae=fo[x];I=de(e,u,(1<<ae)-1)+go[x],u+=ae}var N=p[jr(e,u)&J],D=N>>>4;if(!N)throw"invalid distance";u+=N&15;var B=tu[D];if(D>3){var ae=ho[D];B+=jr(e,u)&(1<<ae)-1,u+=ae}if(u>d)throw"unexpected EOF";i&&o(c+131072);for(var O=c+I;c<O;c+=4)t[c]=t[c-B],t[c+1]=t[c+1-B],t[c+2]=t[c+2-B],t[c+3]=t[c+3-B];c=O}}r.l=n,r.p=u,r.b=c,n&&(l=1,r.m=f,r.d=p,r.n=h)}while(!l);return c==t.length?t:wo(t,0,c)},ou=function(e){if((e[0]&15)!=8||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(e[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function au(e,t){return nu((ou(e),e.subarray(2,-4)),t)}function lu(e,t){for(var r=e.length,s=new pe(e.length+(e.length>>>1)),i=0,a=function(c){s[i++]=c},o=0;o<r;++o){if(i+5>s.length){var l=new pe(i+8+(r-o<<1));l.set(s),s=l}var u=e.charCodeAt(o);a(u)}return wo(s,0,i)}function uu(e,t){var r="";if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e);for(var s=0;s<e.length;){var i=e[s++];i<128||t?r+=String.fromCharCode(i):i<224?r+=String.fromCharCode((i&31)<<6|e[s++]&63):i<240?r+=String.fromCharCode((i&15)<<12|(e[s++]&63)<<6|e[s++]&63):(i=((i&15)<<18|(e[s++]&63)<<12|(e[s++]&63)<<6|e[s++]&63)-65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023))}return r}const on="v1",cu=e=>{if(typeof e!="string")return e;try{const t=JSON.parse(e);if(t.timestamp)return t}catch(t){}try{const t=JSON.parse(uu(au(lu(e,!0))));if(t.v===on)return t;throw new Error(`These events were packed with packer ${t.v} which is incompatible with current packer ${on}.`)}catch(t){throw console.error(t),new Error("Unknown data format.")}};var xi=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(xi||{}),Zr=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Zr||{});function an(e){let t="";return Object.keys(e).forEach(r=>{t+=`${r}: ${e[r]};`}),t}function Ye(e,t=2){let r=String(e);const s=Math.pow(10,t-1);if(e<s)for(;String(s).length>r.length;)r=`0${e}`;return r}const vo=1e3,ei=60*vo,ln=60*ei;function dt(e){if(e<=0)return"00:00";const t=Math.floor(e/ln);e=e%ln;const r=Math.floor(e/ei);e=e%ei;const s=Math.floor(e/vo);return t?`${Ye(t)}:${Ye(r)}:${Ye(s)}`:`${Ye(r)}:${Ye(s)}`}function fu(e){return e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():Promise.resolve()}function hu(){return document.exitFullscreen?document.exitFullscreen():document.mozExitFullscreen?document.mozExitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen?document.msExitFullscreen():Promise.resolve()}function un(){let e=!1;return["fullscreen","webkitIsFullScreen","mozFullScreen","msFullscreenElement"].forEach(t=>{t in document&&(e=e||!!document[t])}),e}function pu(e){return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}function cn(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(e)]}function du(e){return e.type!==xi.IncrementalSnapshot?!1:e.data.source>Zr.Mutation&&e.data.source<=Zr.Input}function mu(e,t){const r=[];let s=e[0].timestamp;for(const i of e)du(i)&&(i.timestamp-s>t&&r.push([s,i.timestamp]),s=i.timestamp);return r}function gu(e){let t,r,s,i,a,o,l,u,c;return{c(){t=oe("div"),r=oe("input"),s=he(),i=oe("label"),a=he(),o=oe("span"),l=De(e[3]),F(r,"type","checkbox"),F(r,"id",e[2]),r.disabled=e[1],F(r,"class","svelte-a6h7w7"),F(i,"for",e[2]),F(i,"class","svelte-a6h7w7"),F(o,"class","label svelte-a6h7w7"),F(t,"class","switch svelte-a6h7w7"),Ve(t,"disabled",e[1])},m(n,p){Ee(n,t,p),$(t,r),r.checked=e[0],$(t,s),$(t,i),$(t,a),$(t,o),$(o,l),u||(c=ze(r,"change",e[4]),u=!0)},p(n,[p]){p&4&&F(r,"id",n[2]),p&2&&(r.disabled=n[1]),p&1&&(r.checked=n[0]),p&4&&F(i,"for",n[2]),p&8&&yt(l,n[3]),p&2&&Ve(t,"disabled",n[1])},i:et,o:et,d(n){n&&ve(t),u=!1,c()}}}function yu(e,t,r){let{disabled:s}=t,{checked:i}=t,{id:a}=t,{label:o}=t;function l(){i=this.checked,r(0,i)}return e.$$set=u=>{"disabled"in u&&r(1,s=u.disabled),"checked"in u&&r(0,i=u.checked),"id"in u&&r(2,a=u.id),"label"in u&&r(3,o=u.label)},[i,s,a,o,l]}class wu extends ni{constructor(t){super(),si(this,t,yu,gu,ti,{disabled:1,checked:0,id:2,label:3})}}function fn(e,t,r){const s=e.slice();return s[38]=t[r],s}function hn(e,t,r){const s=e.slice();return s[41]=t[r],s}function pn(e,t,r){const s=e.slice();return s[44]=t[r],s}function dn(e){let t,r,s,i=dt(e[6])+"",a,o,l,u,c,n,p,f,h,d,m=dt(e[8].totalTime)+"",g,b,w,S,E,y,v,C,x,A,M,z,k,R=Ie(e[13]),W=[];for(let D=0;D<R.length;D+=1)W[D]=mn(pn(e,R,D));let K=Ie(e[9]),B=[];for(let D=0;D<K.length;D+=1)B[D]=gn(hn(e,K,D));function U(D,O){return D[7]==="playing"?bu:vu}let J=U(e),ee=J(e),q=Ie(e[3]),I=[];for(let D=0;D<q.length;D+=1)I[D]=yn(fn(e,q,D));function ae(D){e[29](D)}let N={id:"skip",disabled:e[10]==="skipping",label:"skip inactive"};return e[0]!==void 0&&(N.checked=e[0]),v=new wu({props:N}),Ae.push(()=>Bo(v,"checked",ae)),{c(){t=oe("div"),r=oe("div"),s=oe("span"),a=De(i),o=he(),l=oe("div"),u=oe("div"),c=he();for(let D=0;D<W.length;D+=1)W[D].c();n=he();for(let D=0;D<B.length;D+=1)B[D].c();p=he(),f=oe("div"),h=he(),d=oe("span"),g=De(m),b=he(),w=oe("div"),S=oe("button"),ee.c(),E=he();for(let D=0;D<I.length;D+=1)I[D].c();y=he(),_n(v.$$.fragment),x=he(),A=oe("button"),A.innerHTML=`<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M916 380c-26.4 0-48-21.6-48-48L868 223.2 613.6 477.6c-18.4
|
|
156
|
+
18.4-48.8 18.4-68 0-18.4-18.4-18.4-48.8 0-68L800 156 692 156c-26.4
|
|
157
|
+
0-48-21.6-48-48 0-26.4 21.6-48 48-48l224 0c26.4 0 48 21.6 48 48l0
|
|
158
|
+
224C964 358.4 942.4 380 916 380zM231.2 860l108.8 0c26.4 0 48 21.6 48
|
|
159
|
+
48s-21.6 48-48 48l-224 0c-26.4 0-48-21.6-48-48l0-224c0-26.4 21.6-48
|
|
160
|
+
48-48 26.4 0 48 21.6 48 48L164 792l253.6-253.6c18.4-18.4 48.8-18.4
|
|
161
|
+
68 0 18.4 18.4 18.4 48.8 0 68L231.2 860z"></path></svg>`,F(s,"class","rr-timeline__time svelte-189zk2r"),F(u,"class","rr-progress__step svelte-189zk2r"),se(u,"width",e[12]),F(f,"class","rr-progress__handler svelte-189zk2r"),se(f,"left",e[12]),F(l,"class","rr-progress svelte-189zk2r"),Ve(l,"disabled",e[10]==="skipping"),F(d,"class","rr-timeline__time svelte-189zk2r"),F(r,"class","rr-timeline svelte-189zk2r"),F(S,"class","svelte-189zk2r"),F(A,"class","svelte-189zk2r"),F(w,"class","rr-controller__btns svelte-189zk2r"),F(t,"class","rr-controller svelte-189zk2r")},m(D,O){Ee(D,t,O),$(t,r),$(r,s),$(s,a),$(r,o),$(r,l),$(l,u),$(l,c);for(let _=0;_<W.length;_+=1)W[_]&&W[_].m(l,null);$(l,n);for(let _=0;_<B.length;_+=1)B[_]&&B[_].m(l,null);$(l,p),$(l,f),e[27](l),$(r,h),$(r,d),$(d,g),$(t,b),$(t,w),$(w,S),ee.m(S,null),$(w,E);for(let _=0;_<I.length;_+=1)I[_]&&I[_].m(w,null);$(w,y),ri(v,w,null),$(w,x),$(w,A),M=!0,z||(k=[ze(l,"click",e[15]),ze(l,"keydown",e[16]),ze(S,"click",e[4]),ze(A,"click",e[30])],z=!0)},p(D,O){if((!M||O[0]&64)&&i!==(i=dt(D[6])+"")&&yt(a,i),(!M||O[0]&4096)&&se(u,"width",D[12]),O[0]&8192){R=Ie(D[13]);let P;for(P=0;P<R.length;P+=1){const j=pn(D,R,P);W[P]?W[P].p(j,O):(W[P]=mn(j),W[P].c(),W[P].m(l,n))}for(;P<W.length;P+=1)W[P].d(1);W.length=R.length}if(O[0]&512){K=Ie(D[9]);let P;for(P=0;P<K.length;P+=1){const j=hn(D,K,P);B[P]?B[P].p(j,O):(B[P]=gn(j),B[P].c(),B[P].m(l,p))}for(;P<B.length;P+=1)B[P].d(1);B.length=K.length}if((!M||O[0]&4096)&&se(f,"left",D[12]),(!M||O[0]&1024)&&Ve(l,"disabled",D[10]==="skipping"),(!M||O[0]&256)&&m!==(m=dt(D[8].totalTime)+"")&&yt(g,m),J!==(J=U(D))&&(ee.d(1),ee=J(D),ee&&(ee.c(),ee.m(S,null))),O[0]&1066){q=Ie(D[3]);let P;for(P=0;P<q.length;P+=1){const j=fn(D,q,P);I[P]?I[P].p(j,O):(I[P]=yn(j),I[P].c(),I[P].m(w,y))}for(;P<I.length;P+=1)I[P].d(1);I.length=q.length}const _={};O[0]&1024&&(_.disabled=D[10]==="skipping"),!C&&O[0]&1&&(C=!0,_.checked=D[0],Lo(()=>C=!1)),v.$set(_)},i(D){M||(Se(v.$$.fragment,D),M=!0)},o(D){je(v.$$.fragment,D),M=!1},d(D){D&&ve(t),Lt(W,D),Lt(B,D),e[27](null),ee.d(),Lt(I,D),ii(v),z=!1,Ge(k)}}}function mn(e){let t,r;return{c(){t=oe("div"),F(t,"title",r=e[44].name),se(t,"width",e[44].width),se(t,"height","4px"),se(t,"position","absolute"),se(t,"background",e[44].background),se(t,"left",e[44].position)},m(s,i){Ee(s,t,i)},p(s,i){i[0]&8192&&r!==(r=s[44].name)&&F(t,"title",r),i[0]&8192&&se(t,"width",s[44].width),i[0]&8192&&se(t,"background",s[44].background),i[0]&8192&&se(t,"left",s[44].position)},d(s){s&&ve(t)}}}function gn(e){let t,r;return{c(){t=oe("div"),F(t,"title",r=e[41].name),se(t,"width","10px"),se(t,"height","5px"),se(t,"position","absolute"),se(t,"top","2px"),se(t,"transform","translate(-50%, -50%)"),se(t,"background",e[41].background),se(t,"left",e[41].position)},m(s,i){Ee(s,t,i)},p(s,i){i[0]&512&&r!==(r=s[41].name)&&F(t,"title",r),i[0]&512&&se(t,"background",s[41].background),i[0]&512&&se(t,"left",s[41].position)},d(s){s&&ve(t)}}}function vu(e){let t,r;return{c(){t=gt("svg"),r=gt("path"),F(r,"d",`M170.65984 896l0-768 640 384zM644.66944
|
|
162
|
+
512l-388.66944-233.32864 0 466.65728z`),F(t,"class","icon"),F(t,"viewBox","0 0 1024 1024"),F(t,"version","1.1"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"xmlns:xlink","http://www.w3.org/1999/xlink"),F(t,"width","16"),F(t,"height","16")},m(s,i){Ee(s,t,i),$(t,r)},d(s){s&&ve(t)}}}function bu(e){let t,r;return{c(){t=gt("svg"),r=gt("path"),F(r,"d",`M682.65984 128q53.00224 0 90.50112 37.49888t37.49888 90.50112l0
|
|
163
|
+
512q0 53.00224-37.49888 90.50112t-90.50112
|
|
164
|
+
37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224
|
|
165
|
+
37.49888-90.50112t90.50112-37.49888zM341.34016 128q53.00224 0
|
|
166
|
+
90.50112 37.49888t37.49888 90.50112l0 512q0 53.00224-37.49888
|
|
167
|
+
90.50112t-90.50112
|
|
168
|
+
37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224
|
|
169
|
+
37.49888-90.50112t90.50112-37.49888zM341.34016 213.34016q-17.67424
|
|
170
|
+
0-30.16704 12.4928t-12.4928 30.16704l0 512q0 17.67424 12.4928
|
|
171
|
+
30.16704t30.16704 12.4928 30.16704-12.4928
|
|
172
|
+
12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928zM682.65984
|
|
173
|
+
213.34016q-17.67424 0-30.16704 12.4928t-12.4928 30.16704l0 512q0
|
|
174
|
+
17.67424 12.4928 30.16704t30.16704 12.4928 30.16704-12.4928
|
|
175
|
+
12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928z`),F(t,"class","icon"),F(t,"viewBox","0 0 1024 1024"),F(t,"version","1.1"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"xmlns:xlink","http://www.w3.org/1999/xlink"),F(t,"width","16"),F(t,"height","16")},m(s,i){Ee(s,t,i),$(t,r)},d(s){s&&ve(t)}}}function yn(e){let t,r=e[38]+"",s,i,a,o,l;function u(){return e[28](e[38])}return{c(){t=oe("button"),s=De(r),i=De("x"),t.disabled=a=e[10]==="skipping",F(t,"class","svelte-189zk2r"),Ve(t,"active",e[38]===e[1]&&e[10]!=="skipping")},m(c,n){Ee(c,t,n),$(t,s),$(t,i),o||(l=ze(t,"click",u),o=!0)},p(c,n){e=c,n[0]&8&&r!==(r=e[38]+"")&&yt(s,r),n[0]&1024&&a!==(a=e[10]==="skipping")&&(t.disabled=a),n[0]&1034&&Ve(t,"active",e[38]===e[1]&&e[10]!=="skipping")},d(c){c&&ve(t),o=!1,l()}}}function Su(e){let t,r,s=e[2]&&dn(e);return{c(){s&&s.c(),t=Oo()},m(i,a){s&&s.m(i,a),Ee(i,t,a),r=!0},p(i,a){i[2]?s?(s.p(i,a),a[0]&4&&Se(s,1)):(s=dn(i),s.c(),Se(s,1),s.m(t.parentNode,t)):s&&(Mn(),je(s,1,1,()=>{s=null}),Nn())},i(i){r||(Se(s),r=!0)},o(i){je(s),r=!1},d(i){i&&ve(t),s&&s.d(i)}}}function wn(e,t,r){const s=t-e;return(100-(t-r)/s*100).toFixed(2)}function Eu(e,t,r){const s=To();let{replayer:i}=t,{showController:a}=t,{autoPlay:o}=t,{skipInactive:l}=t,{speedOption:u}=t,{speed:c=u.length?u[0]:1}=t,{tags:n={}}=t,{inactiveColor:p}=t,f=0,h=null,d,m,g,b,w=!1,S=null,E=null,y,v,C,x;const A=()=>{M();function O(){r(6,f=i.getCurrentTime()),w&&f>=w&&(E?K(E.start,E.end,!0,void 0):(i.pause(),S&&(S(),S=null))),f<y.totalTime&&(h=requestAnimationFrame(O))}h=requestAnimationFrame(O)},M=()=>{h&&(cancelAnimationFrame(h),h=null)},z=()=>{switch(d){case"playing":R();break;case"paused":k();break}},k=()=>{d==="paused"&&(b?(i.play(),b=!1):i.play(f))},R=()=>{d==="playing"&&(i.pause(),w=!1)},W=(O,_)=>{r(6,f=O),w=!1,b=!1,(typeof _=="boolean"?_:d==="playing")?i.play(O):i.pause(O)},K=(O,_,P=!1,j=void 0)=>{P?E={start:O,end:_}:E=null,r(6,f=O),w=_,S=j||null,i.play(O)},B=O=>{if(m==="skipping")return;const _=g.getBoundingClientRect();let j=(O.clientX-_.left)/_.width;j<0?j=0:j>1&&(j=1);const ue=y.totalTime*j;W(ue)},U=O=>{m!=="skipping"&&(O.key==="ArrowLeft"?W(f-5):O.key==="ArrowRight"&&W(f+5))},J=O=>{let _=d==="playing";r(1,c=O),_&&i.pause(),i.setConfig({speed:c}),_&&i.play(f)},ee=()=>{r(0,l=!l)},q=()=>Promise.resolve().then(()=>{r(8,y=i.getMetaData())});Cn(()=>{r(7,d=i.service.state.value),r(10,m=i.speedService.state.value),i.on("state-change",O=>{const{player:_,speed:P}=O;if(_!=null&&_.value&&d!==_.value)switch(r(7,d=_.value),d){case"playing":A();break;case"paused":M();break}P!=null&&P.value&&m!==P.value&&r(10,m=P.value)}),i.on("finish",()=>{b=!0,S&&(S(),S=null)}),o&&i.play()}),Po(()=>{l!==i.config.skipInactive&&i.setConfig({skipInactive:l})}),xn(()=>{i.pause(),M()});function I(O){Ae[O?"unshift":"push"](()=>{g=O,r(11,g)})}const ae=O=>J(O);function N(O){l=O,r(0,l)}const D=()=>s("fullscreen");return e.$$set=O=>{"replayer"in O&&r(17,i=O.replayer),"showController"in O&&r(2,a=O.showController),"autoPlay"in O&&r(18,o=O.autoPlay),"skipInactive"in O&&r(0,l=O.skipInactive),"speedOption"in O&&r(3,u=O.speedOption),"speed"in O&&r(1,c=O.speed),"tags"in O&&r(19,n=O.tags),"inactiveColor"in O&&r(20,p=O.inactiveColor)},e.$$.update=()=>{if(e.$$.dirty[0]&64&&s("ui-update-current-time",{payload:f}),e.$$.dirty[0]&128&&s("ui-update-player-state",{payload:d}),e.$$.dirty[0]&131072&&r(8,y=i.getMetaData()),e.$$.dirty[0]&320){const O=Math.min(1,f/y.totalTime);r(12,v=`${100*O}%`),s("ui-update-progress",{payload:O})}e.$$.dirty[0]&655360&&r(9,C=(()=>{const{context:O}=i.service.state,_=O.events.length,P=O.events[0].timestamp,j=O.events[_-1].timestamp,ue=[];return O.events.forEach(ce=>{if(ce.type===xi.Custom){const ie={name:ce.data.tag,background:n[ce.data.tag]||"rgb(73, 80, 246)",position:`${wn(P,j,ce.timestamp)}%`};ue.push(ie)}}),ue})()),e.$$.dirty[0]&1179648&&r(13,x=(()=>{try{const{context:O}=i.service.state,_=O.events.length,P=O.events[0].timestamp,j=O.events[_-1].timestamp,ue=mu(O.events,i.config.inactivePeriodThreshold),ce=(ie,be,_e,So)=>{const Eo=be-ie;return((So-_e)/Eo*100).toFixed(2)};return ue.map(ie=>({name:"inactive period",background:p,position:`${wn(P,j,ie[0])}%`,width:`${ce(P,j,ie[0],ie[1])}%`}))}catch(O){return[]}})())},[l,c,a,u,z,J,f,d,y,C,m,g,v,x,s,B,U,i,o,n,p,k,R,W,K,ee,q,I,ae,N,D]}class Cu extends ni{constructor(t){super(),si(this,t,Eu,Su,ti,{replayer:17,showController:2,autoPlay:18,skipInactive:0,speedOption:3,speed:1,tags:19,inactiveColor:20,toggle:4,play:21,pause:22,goto:23,playRange:24,setSpeed:5,toggleSkipInactive:25,triggerUpdateMeta:26},null,[-1,-1])}get toggle(){return this.$$.ctx[4]}get play(){return this.$$.ctx[21]}get pause(){return this.$$.ctx[22]}get goto(){return this.$$.ctx[23]}get playRange(){return this.$$.ctx[24]}get setSpeed(){return this.$$.ctx[5]}get toggleSkipInactive(){return this.$$.ctx[25]}get triggerUpdateMeta(){return this.$$.ctx[26]}}function vn(e){let t,r,s={replayer:e[7],showController:e[3],autoPlay:e[1],speedOption:e[2],skipInactive:e[0],tags:e[4],inactiveColor:e[5]};return t=new Cu({props:s}),e[32](t),t.$on("fullscreen",e[33]),{c(){_n(t.$$.fragment)},m(i,a){ri(t,i,a),r=!0},p(i,a){const o={};a[0]&128&&(o.replayer=i[7]),a[0]&8&&(o.showController=i[3]),a[0]&2&&(o.autoPlay=i[1]),a[0]&4&&(o.speedOption=i[2]),a[0]&1&&(o.skipInactive=i[0]),a[0]&16&&(o.tags=i[4]),a[0]&32&&(o.inactiveColor=i[5]),t.$set(o)},i(i){r||(Se(t.$$.fragment,i),r=!0)},o(i){je(t.$$.fragment,i),r=!1},d(i){e[32](null),ii(t,i)}}}function xu(e){let t,r,s,i,a=e[7]&&vn(e);return{c(){t=oe("div"),r=oe("div"),s=he(),a&&a.c(),F(r,"class","rr-player__frame"),F(r,"style",e[11]),F(t,"class","rr-player"),F(t,"style",e[12])},m(o,l){Ee(o,t,l),$(t,r),e[31](r),$(t,s),a&&a.m(t,null),e[34](t),i=!0},p(o,l){(!i||l[0]&2048)&&F(r,"style",o[11]),o[7]?a?(a.p(o,l),l[0]&128&&Se(a,1)):(a=vn(o),a.c(),Se(a,1),a.m(t,null)):a&&(Mn(),je(a,1,1,()=>{a=null}),Nn()),(!i||l[0]&4096)&&F(t,"style",o[12])},i(o){i||(Se(a),i=!0)},o(o){je(a),i=!1},d(o){o&&ve(t),e[31](null),a&&a.d(),e[34](null)}}}const bn=80;function Ru(e,t,r){let{width:s=1024}=t,{height:i=576}=t,{maxScale:a=1}=t,{events:o}=t,{skipInactive:l=!0}=t,{autoPlay:u=!0}=t,{speedOption:c=[1,2,4,8]}=t,{speed:n=1}=t,{showController:p=!0}=t,{tags:f={}}=t,{inactiveColor:h="#D4D4D4"}=t,d;const m=()=>d.getMirror();let g,b,w,S=s,E=i,y,v,C;const x=(_,P)=>{const j=s/P.width,ue=i/P.height,ce=[j,ue];a&&ce.push(a),_.style.transform=`scale(${Math.min(...ce)})translate(-50%, -50%)`},A=()=>{x(d.wrapper,{width:d.iframe.offsetWidth,height:d.iframe.offsetHeight})},M=()=>{g&&(un()?hu():fu(g))},z=(_,P)=>{switch(d.on(_,P),_){case"ui-update-current-time":case"ui-update-progress":case"ui-update-player-state":y.$on(_,({detail:j})=>P(j))}},k=_=>{d.addEvent(_),y.triggerUpdateMeta()},R=()=>d.getMetaData(),W=()=>d,K=()=>{y.toggle()},B=_=>{y.setSpeed(_)},U=()=>{y.toggleSkipInactive()},J=()=>{y.play()},ee=()=>{y.pause()},q=(_,P)=>{y.goto(_,P)},I=(_,P,j=!1,ue=void 0)=>{y.playRange(_,P,j,ue)};Cn(()=>{if(c!==void 0&&cn(c)!=="array")throw new Error("speedOption must be array");if(c.forEach(_=>{if(cn(_)!=="number")throw new Error("item of speedOption must be number")}),c.indexOf(n)<0)throw new Error(`speed must be one of speedOption,
|
|
176
|
+
current config:
|
|
177
|
+
{
|
|
178
|
+
...
|
|
179
|
+
speed: ${n},
|
|
180
|
+
speedOption: [${c.toString()}]
|
|
181
|
+
...
|
|
182
|
+
}
|
|
183
|
+
`);r(7,d=new Ql(o,H({speed:n,root:b,unpackFn:cu},t))),d.on("resize",_=>{x(d.wrapper,_)}),w=pu(()=>{un()?setTimeout(()=>{S=s,E=i,r(13,s=g.offsetWidth),r(14,i=g.offsetHeight-(p?bn:0)),x(d.wrapper,{width:d.iframe.offsetWidth,height:d.iframe.offsetHeight})},0):(r(13,s=S),r(14,i=E),x(d.wrapper,{width:d.iframe.offsetWidth,height:d.iframe.offsetHeight}))})}),xn(()=>{w&&w()});function ae(_){Ae[_?"unshift":"push"](()=>{b=_,r(9,b)})}function N(_){Ae[_?"unshift":"push"](()=>{y=_,r(10,y)})}const D=()=>M();function O(_){Ae[_?"unshift":"push"](()=>{g=_,r(8,g)})}return e.$$set=_=>{r(39,t=Oi(Oi({},t),Di(_))),"width"in _&&r(13,s=_.width),"height"in _&&r(14,i=_.height),"maxScale"in _&&r(15,a=_.maxScale),"events"in _&&r(16,o=_.events),"skipInactive"in _&&r(0,l=_.skipInactive),"autoPlay"in _&&r(1,u=_.autoPlay),"speedOption"in _&&r(2,c=_.speedOption),"speed"in _&&r(17,n=_.speed),"showController"in _&&r(3,p=_.showController),"tags"in _&&r(4,f=_.tags),"inactiveColor"in _&&r(5,h=_.inactiveColor)},e.$$.update=()=>{e.$$.dirty[0]&24576&&r(11,v=an({width:`${s}px`,height:`${i}px`})),e.$$.dirty[0]&24584&&r(12,C=an({width:`${s}px`,height:`${i+(p?bn:0)}px`}))},t=Di(t),[l,u,c,p,f,h,M,d,g,b,y,v,C,s,i,a,o,n,m,A,z,k,R,W,K,B,U,J,ee,q,I,ae,N,D,O]}let Mu=class extends ni{constructor(t){super(),si(this,t,Ru,xu,ti,{width:13,height:14,maxScale:15,events:16,skipInactive:0,autoPlay:1,speedOption:2,speed:17,showController:3,tags:4,inactiveColor:5,getMirror:18,triggerResize:19,toggleFullscreen:6,addEventListener:20,addEvent:21,getMetaData:22,getReplayer:23,toggle:24,setSpeed:25,toggleSkipInactive:26,play:27,pause:28,goto:29,playRange:30},null,[-1,-1])}get getMirror(){return this.$$.ctx[18]}get triggerResize(){return this.$$.ctx[19]}get toggleFullscreen(){return this.$$.ctx[6]}get addEventListener(){return this.$$.ctx[20]}get addEvent(){return this.$$.ctx[21]}get getMetaData(){return this.$$.ctx[22]}get getReplayer(){return this.$$.ctx[23]}get toggle(){return this.$$.ctx[24]}get setSpeed(){return this.$$.ctx[25]}get toggleSkipInactive(){return this.$$.ctx[26]}get play(){return this.$$.ctx[27]}get pause(){return this.$$.ctx[28]}get goto(){return this.$$.ctx[29]}get playRange(){return this.$$.ctx[30]}};class bo extends Mu{constructor(t){super({target:t.target,props:t.data||t.props})}}exports.Player=bo;exports.default=bo;
|
|
184
|
+
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
185
|
+
var __cp = (to, from, except, desc) => {
|
|
186
|
+
if ((from && typeof from === "object") || typeof from === "function") {
|
|
187
|
+
for (let key of Object.getOwnPropertyNames(from)) {
|
|
188
|
+
if (!Object.prototype.hasOwnProperty.call(to, key) && key !== except)
|
|
189
|
+
Object.defineProperty(to, key, {
|
|
190
|
+
get: () => from[key],
|
|
191
|
+
enumerable: !(desc = Object.getOwnPropertyDescriptor(from, key)) || desc.enumerable,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return to;
|
|
196
|
+
};
|
|
197
|
+
module.exports = __cp(module.exports, exports);
|
|
198
|
+
}
|
|
199
|
+
return module.exports;
|
|
200
|
+
}))
|
|
201
|
+
//# sourceMappingURL=rrweb-player.umd.min.cjs.map
|