@amplitude/session-replay-browser 1.22.7-prereleasenetworkcapture.0 → 1.22.11

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.
Files changed (113) hide show
  1. package/lib/cjs/config/joined-config.d.ts +2 -2
  2. package/lib/cjs/config/joined-config.d.ts.map +1 -1
  3. package/lib/cjs/config/joined-config.js +10 -2
  4. package/lib/cjs/config/joined-config.js.map +1 -1
  5. package/lib/cjs/config/types.d.ts +22 -1
  6. package/lib/cjs/config/types.d.ts.map +1 -1
  7. package/lib/cjs/config/types.js.map +1 -1
  8. package/lib/cjs/constants.d.ts +2 -1
  9. package/lib/cjs/constants.d.ts.map +1 -1
  10. package/lib/cjs/constants.js +1 -0
  11. package/lib/cjs/constants.js.map +1 -1
  12. package/lib/cjs/helpers.d.ts +7 -1
  13. package/lib/cjs/helpers.d.ts.map +1 -1
  14. package/lib/cjs/helpers.js +2 -2
  15. package/lib/cjs/helpers.js.map +1 -1
  16. package/lib/cjs/session-replay.d.ts +4 -1
  17. package/lib/cjs/session-replay.d.ts.map +1 -1
  18. package/lib/cjs/session-replay.js +59 -30
  19. package/lib/cjs/session-replay.js.map +1 -1
  20. package/lib/cjs/utils/get-input-type.d.ts +9 -0
  21. package/lib/cjs/utils/get-input-type.d.ts.map +1 -0
  22. package/lib/cjs/utils/get-input-type.js +25 -0
  23. package/lib/cjs/utils/get-input-type.js.map +1 -0
  24. package/lib/cjs/version.d.ts +1 -1
  25. package/lib/cjs/version.d.ts.map +1 -1
  26. package/lib/cjs/version.js +1 -1
  27. package/lib/cjs/version.js.map +1 -1
  28. package/lib/esm/config/types.d.ts +1 -1
  29. package/lib/esm/config/types.d.ts.map +1 -1
  30. package/lib/esm/config/types.js.map +1 -1
  31. package/lib/esm/helpers.d.ts +7 -1
  32. package/lib/esm/helpers.d.ts.map +1 -1
  33. package/lib/esm/helpers.js +1 -1
  34. package/lib/esm/helpers.js.map +1 -1
  35. package/lib/esm/session-replay.d.ts +1 -0
  36. package/lib/esm/session-replay.d.ts.map +1 -1
  37. package/lib/esm/session-replay.js +32 -23
  38. package/lib/esm/session-replay.js.map +1 -1
  39. package/lib/esm/utils/get-input-type.d.ts +9 -0
  40. package/lib/esm/utils/get-input-type.d.ts.map +1 -0
  41. package/lib/esm/utils/get-input-type.js +20 -0
  42. package/lib/esm/utils/get-input-type.js.map +1 -0
  43. package/lib/esm/version.d.ts +1 -1
  44. package/lib/esm/version.d.ts.map +1 -1
  45. package/lib/esm/version.js +1 -1
  46. package/lib/esm/version.js.map +1 -1
  47. package/lib/scripts/console-plugin-min.js.gz +0 -0
  48. package/lib/scripts/session-replay-browser-esm.js +1 -1
  49. package/lib/scripts/session-replay-browser-esm.js.gz +0 -0
  50. package/lib/scripts/session-replay-browser-esm.js.map +1 -1
  51. package/lib/scripts/session-replay-browser-min.js +1 -1
  52. package/lib/scripts/session-replay-browser-min.js.gz +0 -0
  53. package/lib/scripts/session-replay-browser-min.js.map +1 -1
  54. package/package.json +3 -4
  55. package/lib/scripts/amplitude-min.js +0 -2
  56. package/lib/scripts/amplitude-min.js.gz +0 -0
  57. package/lib/scripts/amplitude-min.js.map +0 -1
  58. package/lib/scripts/amplitude-min.umd.js +0 -1
  59. package/lib/scripts/amplitude-min.umd.js.gz +0 -0
  60. package/lib/scripts/beacon-transport.d.ts +0 -28
  61. package/lib/scripts/beacon-transport.d.ts.map +0 -1
  62. package/lib/scripts/config/joined-config.d.ts +0 -13
  63. package/lib/scripts/config/joined-config.d.ts.map +0 -1
  64. package/lib/scripts/config/local-config.d.ts +0 -27
  65. package/lib/scripts/config/local-config.d.ts.map +0 -1
  66. package/lib/scripts/config/types.d.ts +0 -147
  67. package/lib/scripts/config/types.d.ts.map +0 -1
  68. package/lib/scripts/constants.d.ts +0 -29
  69. package/lib/scripts/constants.d.ts.map +0 -1
  70. package/lib/scripts/events/base-events-store.d.ts +0 -31
  71. package/lib/scripts/events/base-events-store.d.ts.map +0 -1
  72. package/lib/scripts/events/event-compressor.d.ts +0 -27
  73. package/lib/scripts/events/event-compressor.d.ts.map +0 -1
  74. package/lib/scripts/events/events-idb-store.d.ts +0 -52
  75. package/lib/scripts/events/events-idb-store.d.ts.map +0 -1
  76. package/lib/scripts/events/events-manager.d.ts +0 -13
  77. package/lib/scripts/events/events-manager.d.ts.map +0 -1
  78. package/lib/scripts/events/events-memory-store.d.ts +0 -15
  79. package/lib/scripts/events/events-memory-store.d.ts.map +0 -1
  80. package/lib/scripts/events/legacy-idb-types.d.ts +0 -26
  81. package/lib/scripts/events/legacy-idb-types.d.ts.map +0 -1
  82. package/lib/scripts/events/multi-manager.d.ts +0 -26
  83. package/lib/scripts/events/multi-manager.d.ts.map +0 -1
  84. package/lib/scripts/helpers.d.ts +0 -46
  85. package/lib/scripts/helpers.d.ts.map +0 -1
  86. package/lib/scripts/hooks/click.d.ts +0 -27
  87. package/lib/scripts/hooks/click.d.ts.map +0 -1
  88. package/lib/scripts/hooks/scroll.d.ts +0 -44
  89. package/lib/scripts/hooks/scroll.d.ts.map +0 -1
  90. package/lib/scripts/identifiers.d.ts +0 -11
  91. package/lib/scripts/identifiers.d.ts.map +0 -1
  92. package/lib/scripts/index.d.ts +0 -7
  93. package/lib/scripts/index.d.ts.map +0 -1
  94. package/lib/scripts/libs/finder.d.ts +0 -14
  95. package/lib/scripts/libs/finder.d.ts.map +0 -1
  96. package/lib/scripts/logger.d.ts +0 -13
  97. package/lib/scripts/logger.d.ts.map +0 -1
  98. package/lib/scripts/messages.d.ts +0 -7
  99. package/lib/scripts/messages.d.ts.map +0 -1
  100. package/lib/scripts/observers.d.ts +0 -24
  101. package/lib/scripts/observers.d.ts.map +0 -1
  102. package/lib/scripts/session-replay-factory.d.ts +0 -7
  103. package/lib/scripts/session-replay-factory.d.ts.map +0 -1
  104. package/lib/scripts/session-replay.d.ts +0 -56
  105. package/lib/scripts/session-replay.d.ts.map +0 -1
  106. package/lib/scripts/track-destination.d.ts +0 -37
  107. package/lib/scripts/track-destination.d.ts.map +0 -1
  108. package/lib/scripts/typings/session-replay.d.ts +0 -129
  109. package/lib/scripts/typings/session-replay.d.ts.map +0 -1
  110. package/lib/scripts/version.d.ts +0 -2
  111. package/lib/scripts/version.d.ts.map +0 -1
  112. package/lib/scripts/worker/compression.d.ts +0 -2
  113. package/lib/scripts/worker/compression.d.ts.map +0 -1
@@ -1,2 +0,0 @@
1
- var sessionReplay=function(e){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};function r(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function s(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)}var s=function(){return s=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};function n(e,t,r,s){return new(r||(r=Promise))((function(n,o){function i(e){try{l(s.next(e))}catch(e){o(e)}}function a(e){try{l(s.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((s=s.apply(e,t||[])).next())}))}function o(e,t){var r,s,n,o,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(i=0)),i;)try{if(r=1,s&&(n=2&a[0]?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,s=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(n=i.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(6===a[0]&&i.label<n[1]){i.label=n[1],n=a;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(a);break}n[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],s=0}finally{r=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function i(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],s=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var s,n,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(s=o.next()).done;)i.push(s.value)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}function l(e,t,r){if(r||2===arguments.length)for(var s,n=0,o=t.length;n<o;n++)!s&&n in t||(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var c,u="".concat("AMP","_unsent"),h="https://api2.amplitude.com/2/httpapi";!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(c||(c={}));var p,d=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},f=function(e){return{promise:e||Promise.resolve()}};!function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(p||(p={}));var m="Amplitude Logger ",g=function(){function e(){this.logLevel=p.None}return e.prototype.disable=function(){this.logLevel=p.None},e.prototype.enable=function(e){void 0===e&&(e=p.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<p.Verbose||console.log("".concat(m,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<p.Warn||console.warn("".concat(m,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<p.Error||console.error("".concat(m,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<p.Debug||console.log("".concat(m,"[Debug]: ").concat(e.join(" ")))},e}(),y=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:p.Warn,loggerProvider:new g,offline:!1,optOut:!1,serverUrl:h,serverZone:"US",useBatch:!1}},v=function(){function e(e){var t,r,s,n;this._optOut=!1;var o=y();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(r=e.logLevel)&&void 0!==r?r:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!==(s=e.optOut)&&void 0!==s?s:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(n=e.useBatch)&&void 0!==n?n:o.useBatch,this.loggerProvider.enable(this.logLevel);var i=b(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=i.serverZone,this.serverUrl=i.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),w=function(e,t){return"EU"===e?t?"https://api.eu.amplitude.com/batch":"https://api.eu.amplitude.com/2/httpapi":t?"https://api2.amplitude.com/batch":h},b=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=y().serverZone),void 0===r&&(r=y().useBatch),e)return{serverUrl:e,serverZone:void 0};var s=["US","EU"].includes(t)?t:y().serverZone;return{serverZone:s,serverUrl:w(s,r)}},S=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:C(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),C=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},x=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach((function(t){e(t)})),this.queue=[])},e}(),I=function(){return I=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},I.apply(this,arguments)};function k(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],s=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function O(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var s,n,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(s=o.next()).done;)i.push(s.value)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}"function"==typeof SuppressedError&&SuppressedError;var E=function(e,t){var r,s,n=typeof e;if(n!==typeof t)return!1;try{for(var o=k(["string","number","boolean","undefined"]),i=o.next();!i.done;i=o.next()){if(i.value===n)return e===t}}catch(e){r={error:e}}finally{try{i&&!i.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var a=Array.isArray(e),l=Array.isArray(t);if(a!==l)return!1;if(!a||!l){var c=Object.keys(e).sort(),u=Object.keys(t).sort();if(!E(c,u))return!1;var h=!0;return Object.keys(e).forEach((function(r){E(e[r],t[r])||(h=!1)})),h}for(var p=0;p<e.length;p++)if(!E(e[p],t[p]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,s=new Array(r);r--;)s[r]=[t[r],e[t[r]]];return s});var A,R=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=I({},this.identity.userProperties),r=I(I({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},setOptOut:function(e){return r.optOut=e,this},updateUserProperties:function(e){var t,s,n,o,i,a,l=r.userProperties||{};try{for(var c=k(Object.entries(e)),u=c.next();!u.done;u=c.next()){var h=O(u.value,2),p=h[0],d=h[1];switch(p){case"$set":try{for(var f=(n=void 0,k(Object.entries(d))),m=f.next();!m.done;m=f.next()){var g=O(m.value,2),y=g[0],v=g[1];l[y]=v}}catch(e){n={error:e}}finally{try{m&&!m.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}break;case"$unset":try{for(var w=(i=void 0,k(Object.keys(d))),b=w.next();!b.done;b=w.next()){delete l[y=b.value]}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=w.return)&&a.call(w)}finally{if(i)throw i.error}}break;case"$clearAll":l={}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(t)throw t.error}}return r.userProperties=l,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return I({},this.identity)},e.prototype.setIdentity=function(e){var t=I({},this.identity);this.identity=I({},e),E(t,this.identity)||this.listeners.forEach((function(t){t(e)}))},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,P=function(){function e(){this.identityStore=new R,this.eventBridge=new x,this.applicationContextProvider=new S}return e.getInstance=function(t){return M.analyticsConnectorInstances||(M.analyticsConnectorInstances={}),M.analyticsConnectorInstances[t]||(M.analyticsConnectorInstances[t]=new e),M.analyticsConnectorInstances[t]},e}(),N=function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))},T=function(e,t,r,s,n){return void 0===n&&(n=null),function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var a=r(),l=a.logger,c=a.logLevel;if(c&&c<p.Debug||!c||!l)return e.apply(n,o);var u={type:"invoke public method",name:t,args:o,stacktrace:N(1),time:{start:(new Date).toISOString()},states:{}};s&&u.states&&(u.states.before=s());var h=e.apply(n,o);return h&&h.promise?h.promise.then((function(){s&&u.states&&(u.states.after=s()),u.time&&(u.time.end=(new Date).toISOString()),l.debug(JSON.stringify(u,null,2))})):(s&&u.states&&(u.states.after=s()),u.time&&(u.time.end=(new Date).toISOString()),l.debug(JSON.stringify(u,null,2))),h}},L=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,r,s,n,o,i,a,l,u,h,p,d,f,m,g,y,v,w,b,S,C,x;if("object"!=typeof e)return null;var I=e.code||0,k=this.buildStatus(I);switch(k){case c.Success:return{status:k,statusCode:I,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(r=e.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(s=e.server_upload_time)&&void 0!==s?s:0}};case c.Invalid:return{status:k,statusCode:I,body:{error:null!==(n=e.error)&&void 0!==n?n:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(i=e.events_with_invalid_fields)&&void 0!==i?i:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(u=e.eps_threshold)&&void 0!==u?u:0,exceededDailyQuotaDevices:null!==(h=e.exceeded_daily_quota_devices)&&void 0!==h?h:{},silencedDevices:null!==(p=e.silenced_devices)&&void 0!==p?p:[],silencedEvents:null!==(d=e.silenced_events)&&void 0!==d?d:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(m=e.throttled_events)&&void 0!==m?m:[]}};case c.PayloadTooLarge:return{status:k,statusCode:I,body:{error:null!==(g=e.error)&&void 0!==g?g:""}};case c.RateLimit:return{status:k,statusCode:I,body:{error:null!==(y=e.error)&&void 0!==y?y:"",epsThreshold:null!==(v=e.eps_threshold)&&void 0!==v?v:0,throttledDevices:null!==(w=e.throttled_devices)&&void 0!==w?w:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(S=e.exceeded_daily_quota_devices)&&void 0!==S?S:{},exceededDailyQuotaUsers:null!==(C=e.exceeded_daily_quota_users)&&void 0!==C?C:{},throttledEvents:null!==(x=e.throttled_events)&&void 0!==x?x:[]}};case c.Timeout:default:return{status:k,statusCode:I}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?c.Success:429===e?c.RateLimit:413===e?c.PayloadTooLarge:408===e?c.Timeout:e>=400&&e<500?c.Invalid:e>=500?c.Failed:c.Unknown},e}(),D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.send=function(e,t){return n(this,void 0,void 0,(function(){var r,s,n;return o(this,(function(o){switch(o.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return r={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,r)];case 1:return[4,(s=o.sent()).text()];case 2:n=o.sent();try{return[2,this.buildResponse(JSON.parse(n))]}catch(e){return[2,this.buildResponse({code:s.status})]}return[2]}}))}))},t}(L);!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(A||(A={}));var F,_="[Amplitude]",B="".concat(_," Session Replay ID"),U=A.US,j="".concat(_," Session Replay Debug"),z="amp-mask";!function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request"}(F||(F={}));var W,V=function(){function e(e){this.logger=e,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}return e.prototype.getSafeMethod=function(e){var t;if(!this.logger)return function(){};var r=this.logger[e];return"function"==typeof r?(null!==(t=r.__rrweb_original__)&&void 0!==t?t:r).bind(this.logger):function(){}},e.prototype.enable=function(e){this.logger.enable(e)},e.prototype.disable=function(){this.logger.disable()},e}(),G=function(){return{flushMaxRetries:2,logLevel:p.Warn,loggerProvider:new g,transportProvider:new D}},Z=function(e){function t(t,r){var n,o=this,i=G();return(o=e.call(this,s(s({transportProvider:i.transportProvider,loggerProvider:new V(r.loggerProvider||i.loggerProvider)},r),{apiKey:t}))||this).flushMaxRetries=void 0!==r.flushMaxRetries&&r.flushMaxRetries<=i.flushMaxRetries?r.flushMaxRetries:i.flushMaxRetries,o.apiKey=t,o.sampleRate=r.sampleRate||0,o.serverZone=r.serverZone||U,o.configServerUrl=r.configServerUrl,o.trackServerUrl=r.trackServerUrl,o.shouldInlineStylesheet=r.shouldInlineStylesheet,o.version=r.version,o.performanceConfig=r.performanceConfig,o.storeType=null!==(n=r.storeType)&&void 0!==n?n:"idb",r.privacyConfig&&(o.privacyConfig=r.privacyConfig),r.debugMode&&(o.debugMode=r.debugMode),r.experimental&&(o.experimental=r.experimental),o}return r(t,e),t}(v),Y=Object.defineProperty,J=(e,t,r)=>((e,t,r)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),q=Object.defineProperty,K=(e,t,r)=>((e,t,r)=>t in e?q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),X=(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))(X||{});const H={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},$={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Q={};function ee(e){if(Q[e])return Q[e];const t=globalThis[e],r=t.prototype,s=e in H?H[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in $?$[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return Q[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?Q[e]=o:r}catch{return r}}const te={};function re(e,t,r){var s;const n=`${e}.${String(r)}`;if(te[n])return te[n].call(t);const o=ee(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(te[n]=i,i.call(t)):t[r]}const se={};function ne(e,t,r){const s=`${e}.${String(r)}`;if(se[s])return se[s].bind(t);const n=ee(e)[r];return"function"!=typeof n?t[r]:(se[s]=n,n.bind(t))}const oe={childNodes:function(e){return re("Node",e,"childNodes")},parentNode:function(e){return re("Node",e,"parentNode")},parentElement:function(e){return re("Node",e,"parentElement")},textContent:function(e){return re("Node",e,"textContent")},contains:function(e,t){return ne("Node",e,"contains")(t)},getRootNode:function(e){return ne("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?re("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?re("Element",e,"shadowRoot"):null},querySelector:function(e,t){return re("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return re("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return ee("MutationObserver").constructor}};function ie(e){return e.nodeType===e.ELEMENT_NODE}function ae(e){const t=e&&"host"in e&&"mode"in e&&oe.host(e)||null;return Boolean(t&&"shadowRoot"in t&&oe.shadowRoot(t)===e)}function le(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ce(e){try{const r=e.rules||e.cssRules;if(!r)return null;let s=e.href;!s&&e.ownerNode&&e.ownerNode.ownerDocument&&(s=e.ownerNode.ownerDocument.location.href);const n=Array.from(r,(e=>ue(e,s))).join("");return(t=n).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function ue(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=ce(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?Se(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(r)),t?Se(r,t):r}}class he{constructor(){K(this,"idNodeMap",new Map),K(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function pe({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:o}){let i=n||"";const a=s&&de(s);return(t[r.toLowerCase()]||a&&t[a])&&(i=o?o(i,e):"*".repeat(i.length)),i}function de(e){return e.toLowerCase()}const fe="__rrweb_original__";function me(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?de(t):null}function ge(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}const s=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==s?void 0:s[1])??null}const ye=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ve=/^(?:[a-z+]+:)?\/\//i,we=/^www\..*/i,be=/^(data:)([^,]*),(.*)/i;function Se(e,t){return(e||"").replace(ye,((e,r,s,n,o,i)=>{const a=s||o||i,l=r||n||"";if(!a)return e;if(ve.test(a)||we.test(a))return`url(${l}${a}${l})`;if(be.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),u=a.split("/");c.pop();for(const e of u)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`}))}function Ce(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function xe(e,t){return function(e,t,r=!1){const s=Array.from(t.childNodes),n=[];let o=0;if(s.length>1&&e&&"string"==typeof e){let t=Ce(e,r);const i=t.length/e.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&"string"==typeof s[a].textContent){const l=Ce(s[a].textContent,r),c=100;let u=3;for(;u<l.length&&(l[u].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,u),1));u++);for(;u<l.length;u++){let h=l.substring(0,u),p=t.split(h),d=-1;if(2===p.length)d=p[0].length;else if(p.length>2&&""===p[0]&&""!==s[a-1].textContent)d=t.indexOf(h,1);else if(1===p.length){if(h=h.substring(0,h.length-1),p=t.split(h),p.length<=1)return n.push(e),n;u=c+1}else u===l.length-1&&(d=t.indexOf(h));if(p.length>=2&&u>c){const e=s[a-1].textContent;if(e&&"string"==typeof e){const r=Ce(e).length;d=t.indexOf(h,r)}-1===d&&(d=p[0].length)}if(-1!==d){let a=Math.floor(d/i);for(;a>0&&a<e.length;){if(o+=1,o>50*s.length)return n.push(e),n;const l=Ce(e.substring(0,a),r);if(l.length===d){n.push(e.substring(0,a)),e=e.substring(a),t=t.substring(d);break}l.length<d?a+=Math.max(1,Math.floor((d-l.length)/i)):a-=Math.max(1,Math.floor((l.length-d)*i))}break}}}}return n.push(e),n}(e,t).join("/* rr_split */")}let Ie=1;const ke=new RegExp("[^a-z0-9-_:]");function Oe(){return Ie++}let Ee,Ae;const Re=/^[^ \t\n\r\u000c]+/,Me=/^[, \t\n\r\u000c]+/;const Pe=new WeakMap;function Ne(e,t){return t&&""!==t.trim()?Le(e,t):t}function Te(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Le(e,t){let r=Pe.get(e);if(r||(r=e.createElement("a"),Pe.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function De(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?Ne(e,s):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function s(e){let s;const n=e.exec(t.substring(r));return n?(s=n[0],r+=s.length,s):""}const n=[];for(;s(Me),!(r>=t.length);){let o=s(Re);if(","===o.slice(-1))o=Ne(e,o.substring(0,o.length-1)),n.push(o);else{let s="";o=Ne(e,o);let i=!1;for(;;){const e=t.charAt(r);if(""===e){n.push((o+s).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){r+=1,n.push((o+s).trim());break}"("===e&&(i=!0)}s+=e,r+=1}}}return n.join(", ")}(e,s):"style"===r?Se(s,Le(e)):"object"===t&&"data"===r?Ne(e,s):s:Ne(e,s):s}function Fe(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function _e(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&_e(oe.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&_e(oe.parentNode(e),t,r)}function Be(e,t,r,s){let n;if(ie(e)){if(n=e,!oe.childNodes(n).length)return!1}else{if(null===oe.parentElement(e))return!1;n=oe.parentElement(e)}try{if("string"==typeof t){if(s){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(_e(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function Ue(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:i,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m=!1,cssCaptured:g=!1}=t,y=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:X.Document,childNodes:[],compatMode:e.compatMode}:{type:X.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:X.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:o,maskInputOptions:i={},maskInputFn:a,dataURLOptions:l={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:d}=t,f=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,s,n),m=function(e){if(e instanceof HTMLFormElement)return"form";const t=de(e.tagName);return ke.test(t)?"div":t}(e);let g={};const y=e.attributes.length;for(let t=0;t<y;t++){const s=e.attributes[t];Fe(m,s.name,s.value)||(g[s.name]=De(r,m,de(s.name),s.value))}if("link"===m&&o){const t=Array.from(r.styleSheets).find((t=>t.href===e.href));let s=null;t&&(s=ce(t)),s&&(delete g.rel,delete g.href,g._cssText=s)}if("style"===m&&e.sheet){let t=ce(e.sheet);t&&(e.childNodes.length>1&&(t=xe(t,e)),g._cssText=t)}if("input"===m||"textarea"===m||"select"===m){const t=e.value,r=e.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&t?g.value=pe({element:e,type:me(e),tagName:m,value:t,maskInputOptions:i,maskInputFn:a}):r&&(g.checked=r)}"option"===m&&(e.selected&&!i.select?g.selected=!0:delete g.selected);"dialog"===m&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===m&&u)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let s=0;s<e.height;s+=50){const n=t.getImageData,o=fe in n?n[fe]:n;if(new Uint32Array(o.call(t,r,s,Math.min(50,e.width-r),Math.min(50,e.height-s)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height;t!==s.toDataURL(l.type,l.quality)&&(g.rr_dataURL=t)}if("img"===m&&c){Ee||(Ee=r.createElement("canvas"),Ae=Ee.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{Ee.width=t.naturalWidth,Ee.height=t.naturalHeight,Ae.drawImage(t,0,0),g.rr_dataURL=Ee.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${s}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(n?g.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if("audio"===m||"video"===m){const t=g;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}p||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop));if(f){const{width:t,height:r}=e.getBoundingClientRect();g={class:g.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==m||h(g.src)||(e.contentDocument||(g.rr_src=g.src),delete g.src);let v;try{customElements.get(m)&&(v=!0)}catch(e){}return{type:X.Element,tagName:m,attributes:g,childNodes:[],isSVG:Te(e)||void 0,needBlock:f,rootId:d,isCustom:v}}(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:u,dataURLOptions:h,inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:o}=t,i=oe.parentNode(e),a=i&&i.tagName;let l="";const c="STYLE"===a||void 0,u="SCRIPT"===a||void 0;u?l="SCRIPT_PLACEHOLDER":o||(l=oe.textContent(e),c&&l&&(l=Se(l,Le(t.doc))));!c&&!u&&l&&r&&(l=s?s(l,oe.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:X.Text,textContent:l||"",rootId:n}}(e,{doc:r,needsMask:i,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:X.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:X.Comment,textContent:oe.textContent(e)||"",rootId:y};default:return!1}}function je(e){return null==e?"":e.toLowerCase()}function ze(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,maskTextClass:i,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:C=(()=>!1),newlyAddedElement:x=!1,cssCaptured:I=!1}=t;let{needsMask:k}=t,{preserveWhiteSpace:O=!0}=t;if(!k){k=Be(e,i,a,void 0===k)}const E=Ue(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:k,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:C,newlyAddedElement:x,cssCaptured:I});if(!E)return console.warn(e,"not serialized"),null;let A;A=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===X.Comment)return!0;if(e.type===X.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===ge(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(je(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===je(e.attributes.name)||"icon"===je(e.attributes.rel)||"apple-touch-icon"===je(e.attributes.rel)||"shortcut icon"===je(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&je(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(je(e.attributes.property).match(/^(og|twitter|fb):/)||je(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===je(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===je(e.attributes.name)||"googlebot"===je(e.attributes.name)||"bingbot"===je(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===je(e.attributes.name)||"generator"===je(e.attributes.name)||"framework"===je(e.attributes.name)||"publisher"===je(e.attributes.name)||"progid"===je(e.attributes.name)||je(e.attributes.property).match(/^article:/)||je(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===je(e.attributes.name)||"yandex-verification"===je(e.attributes.name)||"csrf-token"===je(e.attributes.name)||"p:domain_verify"===je(e.attributes.name)||"verify-v1"===je(e.attributes.name)||"verification"===je(e.attributes.name)||"shopify-checkout-api-token"===je(e.attributes.name)))return!0}}return!1}(E,d)||!O&&E.type===X.Text&&!E.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Oe();const R=Object.assign(E,{id:A});if(s.add(e,R),-2===A)return null;y&&y(e);let M=!l;if(R.type===X.Element){M=M&&!R.needBlock,delete R.needBlock;const t=oe.shadowRoot(e);t&&le(t)&&(R.isShadowHost=!0)}if((R.type===X.Document||R.type===X.Element)&&M){d.headWhitespace&&R.type===X.Element&&"head"===R.tagName&&(O=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:k,maskTextClass:i,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C,cssCaptured:!1};if(R.type===X.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else{R.type===X.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(oe.childNodes(e))){const e=ze(r,t);e&&R.childNodes.push(e)}}let x=null;if(ie(e)&&(x=oe.shadowRoot(e)))for(const e of Array.from(oe.childNodes(x))){const r=ze(e,t);r&&(le(x)&&(r.isShadow=!0),R.childNodes.push(r))}}const P=oe.parentNode(e);return P&&ae(P)&&le(P)&&(R.isShadow=!0),R.type===X.Element&&"iframe"===R.tagName&&function(e,t,r){const s=e.contentWindow;if(!s)return;let n,o=!1;try{n=s.document.readyState}catch(e){return}if("complete"!==n){const s=setTimeout((()=>{o||(t(),o=!0)}),r);return void e.addEventListener("load",(()=>{clearTimeout(s),o=!0,t()}))}const i="about:blank";if(s.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&v){const r=ze(t,{doc:t,mirror:s,blockClass:n,blockSelector:o,needsMask:k,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});r&&v(e,r)}}),w),R.type===X.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===ge(R.attributes.href))&&function(e,t,r){let s,n=!1;try{s=e.sheet}catch(e){return}if(s)return;const o=setTimeout((()=>{n||(t(),n=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(o),n=!0,t()}))}(e,(()=>{if(b){const t=ze(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:k,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:C});t&&b(e,t)}}),S),R}function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ve(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?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(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Ge={exports:{}},Ze=String,Ye=function(){return{isColorSupported:!1,reset:Ze,bold:Ze,dim:Ze,italic:Ze,underline:Ze,inverse:Ze,hidden:Ze,strikethrough:Ze,black:Ze,red:Ze,green:Ze,yellow:Ze,blue:Ze,magenta:Ze,cyan:Ze,white:Ze,gray:Ze,bgBlack:Ze,bgRed:Ze,bgGreen:Ze,bgYellow:Ze,bgBlue:Ze,bgMagenta:Ze,bgCyan:Ze,bgWhite:Ze}};Ge.exports=Ye(),Ge.exports.createColors=Ye;var Je=Ge.exports;const qe=Ve(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ke=Je,Xe=qe,He=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Ke.isColorSupported),Xe&&e&&(t=Xe(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=Ke.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var $e=He;He.default=He;var Qe={};Qe.isClean=Symbol("isClean"),Qe.my=Symbol("my");const et={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let tt=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return et[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=et[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var rt=tt;tt.default=tt;let st=rt;function nt(e,t){new st(t).stringify(e)}var ot=nt;nt.default=nt;let{isClean:it,my:at}=Qe,lt=$e,ct=rt,ut=ot;function ht(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>ht(e,r))):("object"===o&&null!==n&&(n=ht(n)),r[s]=n)}return r}let pt=class{constructor(e={}){this.raws={},this[it]=!1,this[at]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ht(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new lt(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[it]){this[it]=!1;let e=this;for(;e=e.parent;)e[it]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new ct).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ut){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var dt=pt;pt.default=pt;let ft=dt,mt=class extends ft{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var gt=mt;mt.default=mt;var yt={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:vt,SourceMapGenerator:wt}=qe,{existsSync:bt,readFileSync:St}=qe,{dirname:Ct,join:xt}=qe;let It=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ct(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new vt(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Ct(e),bt(e))return this.mapFile=e,St(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof vt)return wt.fromSourceMap(t).toString();if(t instanceof wt)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=xt(Ct(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var kt=It;It.default=It;let{SourceMapConsumer:Ot,SourceMapGenerator:Et}=qe,{fileURLToPath:At,pathToFileURL:Rt}=qe,{isAbsolute:Mt,resolve:Pt}=qe,{nanoid:Nt}=yt,Tt=qe,Lt=$e,Dt=kt,Ft=Symbol("fromOffsetCache"),_t=Boolean(Ot&&Et),Bt=Boolean(Pt&&Mt),Ut=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Bt||/^\w+:\/\//.test(t.from)||Mt(t.from)?this.file=t.from:this.file=Pt(t.from)),Bt&&_t){let e=new Dt(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+Nt(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new Lt(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new Lt(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(Rt&&(n.input.url=Rt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Ft])r=this[Ft];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[Ft]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Pt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=Mt(a.source)?Rt(a.source):new URL(a.source,this.map.consumer().sourceRoot||Rt(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!At)throw new Error("file: protocol is not available in this PostCSS build");l.file=At(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var jt=Ut;Ut.default=Ut,Tt&&Tt.registerInput&&Tt.registerInput(Ut);let{SourceMapConsumer:zt,SourceMapGenerator:Wt}=qe,{dirname:Vt,relative:Gt,resolve:Zt,sep:Yt}=qe,{pathToFileURL:Jt}=qe,qt=jt,Kt=Boolean(zt&&Wt),Xt=Boolean(Vt&&Zt&&Gt&&Yt);var Ht=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||Vt(e.file);!1===this.mapOpts.sourcesContent?(t=new zt(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Xt&&Kt&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Wt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Wt({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 Wt({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Vt(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Vt(Zt(r,this.mapOpts.annotation)));let s=Gt(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new qt(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Jt){let t=Jt(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Yt&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let $t=dt,Qt=class extends $t{constructor(e){super(e),this.type="comment"}};var er=Qt;Qt.default=Qt;let tr,rr,sr,nr,{isClean:or,my:ir}=Qe,ar=gt,lr=er,cr=dt;function ur(e){return e.map((e=>(e.nodes&&(e.nodes=ur(e.nodes)),delete e.source,e)))}function hr(e){if(e[or]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)hr(t)}let pr=class e extends cr{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=ur(tr(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new ar(t)]}else if(t.selector)t=[new rr(t)];else if(t.name)t=[new sr(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new lr(t)]}return t.map((t=>(t[ir]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[or]&&hr(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};pr.registerParse=e=>{tr=e},pr.registerRule=e=>{rr=e},pr.registerAtRule=e=>{sr=e},pr.registerRoot=e=>{nr=e};var dr=pr;pr.default=pr,pr.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,sr.prototype):"rule"===e.type?Object.setPrototypeOf(e,rr.prototype):"decl"===e.type?Object.setPrototypeOf(e,ar.prototype):"comment"===e.type?Object.setPrototypeOf(e,lr.prototype):"root"===e.type&&Object.setPrototypeOf(e,nr.prototype),e[ir]=!0,e.nodes&&e.nodes.forEach((e=>{pr.rebuild(e)}))};let fr,mr,gr=dr,yr=class extends gr{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new fr(new mr,this,e).stringify()}};yr.registerLazyResult=e=>{fr=e},yr.registerProcessor=e=>{mr=e};var vr=yr;yr.default=yr;let wr={};var br=function(e){wr[e]||(wr[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Sr=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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}};var Cr=Sr;Sr.default=Sr;let xr=Cr,Ir=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new xr(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var kr=Ir;Ir.default=Ir;const Or="'".charCodeAt(0),Er='"'.charCodeAt(0),Ar="\\".charCodeAt(0),Rr="/".charCodeAt(0),Mr="\n".charCodeAt(0),Pr=" ".charCodeAt(0),Nr="\f".charCodeAt(0),Tr="\t".charCodeAt(0),Lr="\r".charCodeAt(0),Dr="[".charCodeAt(0),Fr="]".charCodeAt(0),_r="(".charCodeAt(0),Br=")".charCodeAt(0),Ur="{".charCodeAt(0),jr="}".charCodeAt(0),zr=";".charCodeAt(0),Wr="*".charCodeAt(0),Vr=":".charCodeAt(0),Gr="@".charCodeAt(0),Zr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Yr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Jr=/.[\r\n"'(/\\]/,qr=/[\da-f]/i;let Kr=dr,Xr=class extends Kr{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Hr=Xr;Xr.default=Xr,Kr.registerAtRule(Xr);let $r,Qr,es=dr,ts=class extends es{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new $r(new Qr,this,e).stringify()}};ts.registerLazyResult=e=>{$r=e},ts.registerProcessor=e=>{Qr=e};var rs=ts;ts.default=ts,es.registerRoot(ts);let ss={comma:e=>ss.split(e,[","],!0),space:e=>ss.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var ns=ss;ss.default=ss;let os=dr,is=ns,as=class extends os{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return is.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var ls=as;as.default=as,os.registerRule(as);let cs=gt,us=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case Mr:case Pr:case Tr:case Lr:case Nr:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===Pr||r===Mr||r===Tr||r===Lr||r===Nr);h=["space",p.slice(m,s)],m=s-1;break;case Dr:case Fr:case Ur:case jr:case Vr:case zr:case Br:{let e=String.fromCharCode(r);h=[e,e,m];break}case _r:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==Or&&u!==Er&&u!==Pr&&u!==Mr&&u!==Tr&&u!==Nr&&u!==Lr){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}v("bracket")}for(l=s;p.charCodeAt(l-1)===Ar;)l-=1,a=!a}while(a);h=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||Jr.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case Or:case Er:n=r===Or?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}v("string")}for(l=s;p.charCodeAt(l-1)===Ar;)l-=1,a=!a}while(a);h=["string",p.slice(m,s+1),m,s],m=s;break;case Gr:Zr.lastIndex=m+1,Zr.test(p),s=0===Zr.lastIndex?p.length-1:Zr.lastIndex-2,h=["at-word",p.slice(m,s+1),m,s],m=s;break;case Ar:for(s=m,i=!0;p.charCodeAt(s+1)===Ar;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==Rr&&r!==Pr&&r!==Mr&&r!==Tr&&r!==Lr&&r!==Nr&&(s+=1,qr.test(p.charAt(s)))){for(;qr.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===Pr&&(s+=1)}h=["word",p.slice(m,s+1),m,s],m=s;break;default:r===Rr&&p.charCodeAt(m+1)===Wr?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:v("comment")),h=["comment",p.slice(m,s+1),m,s],m=s):(Yr.lastIndex=m+1,Yr.test(p),s=0===Yr.lastIndex?p.length-1:Yr.lastIndex-2,h=["word",p.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},hs=er,ps=Hr,ds=rs,fs=ls;const ms={empty:!0,space:!0};var gs=class{constructor(e){this.input=e,this.root=new ds,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new ps;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new hs;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=us(this.input)}decl(e,t){let r=new cs;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new fs;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",ms[a]||ms[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new fs;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let ys=dr,vs=gs,ws=jt;function bs(e,t){let r=new ws(e,t),s=new vs(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var Ss=bs;bs.default=bs,ys.registerParse(bs);let{isClean:Cs,my:xs}=Qe,Is=Ht,ks=ot,Os=dr,Es=vr,As=br,Rs=kr,Ms=Ss,Ps=rs;const Ns={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ts={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},Ls={Once:!0,postcssPlugin:!0,prepare:!0};function Ds(e){return"object"==typeof e&&"function"==typeof e.then}function Fs(e){let t=!1,r=Ns[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function _s(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Fs(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Bs(e){return e[Cs]=!1,e.nodes&&e.nodes.forEach((e=>Bs(e))),e}let Us={},js=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Rs)n=Bs(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=Ms;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[xs]&&Os.rebuild(n)}else n=Bs(r);this.result=new Rs(t,n,s),this.helpers={...Us,postcss:Us,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!Ts[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ls[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Ds(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Cs];){e[Cs]=!0;let t=[_s(e)];for(;t.length>0;){let e=this.visitTick(t);if(Ds(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return Ds(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ks;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Is(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){if(Ds(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Cs];)e[Cs]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||As("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Ds(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[Cs])return s[Cs]=!0,void e.push(_s(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Cs]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Cs]=!0;let t=Fs(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[Cs]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};js.registerPostcss=e=>{Us=e};var zs=js;js.default=js,Ps.registerLazyResult(js),Es.registerLazyResult(js);let Ws=Ht,Vs=ot,Gs=br,Zs=Ss;const Ys=kr;let Js=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Vs;this.result=new Ys(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Ws(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||Gs("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}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 e,t=Zs;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var qs=Js;Js.default=Js;let Ks=qs,Xs=zs,Hs=vr,$s=rs,Qs=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Xs(this,e,t):new Ks(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var en=Qs;Qs.default=Qs,$s.registerProcessor(Qs),Hs.registerProcessor(Qs);let tn=gt,rn=kt,sn=er,nn=Hr,on=jt,an=rs,ln=ls;function cn(e,t){if(Array.isArray(e))return e.map((e=>cn(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:on.prototype};r.map&&(r.map={...r.map,__proto__:rn.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>cn(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new an(s);if("decl"===s.type)return new tn(s);if("rule"===s.type)return new ln(s);if("comment"===s.type)return new sn(s);if("atrule"===s.type)return new nn(s);throw new Error("Unknown node type: "+e.type)}var un=cn;cn.default=cn;let hn=$e,pn=gt,dn=zs,fn=dr,mn=en,gn=ot,yn=un,vn=vr,wn=Cr,bn=er,Sn=Hr,Cn=kr,xn=jt,In=Ss,kn=ns,On=ls,En=rs,An=dt;function Rn(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new mn(e)}Rn.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new mn).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Rn([n(r)]).process(e,t)},n},Rn.stringify=gn,Rn.parse=In,Rn.fromJSON=yn,Rn.list=kn,Rn.comment=e=>new bn(e),Rn.atRule=e=>new Sn(e),Rn.decl=e=>new pn(e),Rn.rule=e=>new On(e),Rn.root=e=>new En(e),Rn.document=e=>new vn(e),Rn.CssSyntaxError=hn,Rn.Declaration=pn,Rn.Container=fn,Rn.Processor=mn,Rn.Document=vn,Rn.Comment=bn,Rn.Warning=wn,Rn.AtRule=Sn,Rn.Result=Cn,Rn.Input=xn,Rn.Rule=On,Rn.Root=En,Rn.Node=An,dn.registerPostcss(Rn);var Mn=Rn;Rn.default=Rn;const Pn=We(Mn);Pn.stringify,Pn.fromJSON,Pn.plugin,Pn.parse,Pn.list,Pn.document,Pn.comment,Pn.atRule,Pn.rule,Pn.decl,Pn.root,Pn.CssSyntaxError,Pn.Declaration,Pn.Container,Pn.Processor,Pn.Document,Pn.Comment,Pn.Warning,Pn.AtRule,Pn.Result,Pn.Input,Pn.Rule,Pn.Root,Pn.Node;var Nn=Object.defineProperty,Tn=(e,t,r)=>((e,t,r)=>t in e?Nn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Ln(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Dn(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?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(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Fn={exports:{}},_n=String,Bn=function(){return{isColorSupported:!1,reset:_n,bold:_n,dim:_n,italic:_n,underline:_n,inverse:_n,hidden:_n,strikethrough:_n,black:_n,red:_n,green:_n,yellow:_n,blue:_n,magenta:_n,cyan:_n,white:_n,gray:_n,bgBlack:_n,bgRed:_n,bgGreen:_n,bgYellow:_n,bgBlue:_n,bgMagenta:_n,bgCyan:_n,bgWhite:_n}};Fn.exports=Bn(),Fn.exports.createColors=Bn;var Un=Fn.exports;const jn=Dn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let zn=Un,Wn=jn,Vn=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=zn.isColorSupported),Wn&&e&&(t=Wn(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=zn.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Gn=Vn;Vn.default=Vn;var Zn={};Zn.isClean=Symbol("isClean"),Zn.my=Symbol("my");const Yn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Jn=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Yn[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Yn[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var qn=Jn;Jn.default=Jn;let Kn=qn;function Xn(e,t){new Kn(t).stringify(e)}var Hn=Xn;Xn.default=Xn;let{isClean:$n,my:Qn}=Zn,eo=Gn,to=qn,ro=Hn;function so(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>so(e,r))):("object"===o&&null!==n&&(n=so(n)),r[s]=n)}return r}let no=class{constructor(e={}){this.raws={},this[$n]=!1,this[Qn]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=so(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new eo(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[$n]){this[$n]=!1;let e=this;for(;e=e.parent;)e[$n]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new to).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ro){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var oo=no;no.default=no;let io=oo,ao=class extends io{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var lo=ao;ao.default=ao;var co={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:uo,SourceMapGenerator:ho}=jn,{existsSync:po,readFileSync:fo}=jn,{dirname:mo,join:go}=jn;let yo=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=mo(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new uo(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=mo(e),po(e))return this.mapFile=e,fo(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof uo)return ho.fromSourceMap(t).toString();if(t instanceof ho)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=go(mo(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var vo=yo;yo.default=yo;let{SourceMapConsumer:wo,SourceMapGenerator:bo}=jn,{fileURLToPath:So,pathToFileURL:Co}=jn,{isAbsolute:xo,resolve:Io}=jn,{nanoid:ko}=co,Oo=jn,Eo=Gn,Ao=vo,Ro=Symbol("fromOffsetCache"),Mo=Boolean(wo&&bo),Po=Boolean(Io&&xo),No=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Po||/^\w+:\/\//.test(t.from)||xo(t.from)?this.file=t.from:this.file=Io(t.from)),Po&&Mo){let e=new Ao(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+ko(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new Eo(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new Eo(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(Co&&(n.input.url=Co(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Ro])r=this[Ro];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[Ro]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Io(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=xo(a.source)?Co(a.source):new URL(a.source,this.map.consumer().sourceRoot||Co(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!So)throw new Error("file: protocol is not available in this PostCSS build");l.file=So(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var To=No;No.default=No,Oo&&Oo.registerInput&&Oo.registerInput(No);let{SourceMapConsumer:Lo,SourceMapGenerator:Do}=jn,{dirname:Fo,relative:_o,resolve:Bo,sep:Uo}=jn,{pathToFileURL:jo}=jn,zo=To,Wo=Boolean(Lo&&Do),Vo=Boolean(Fo&&Bo&&_o&&Uo);var Go=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||Fo(e.file);!1===this.mapOpts.sourcesContent?(t=new Lo(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Vo&&Wo&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Do.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Do({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 Do({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Fo(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Fo(Bo(r,this.mapOpts.annotation)));let s=_o(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new zo(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(jo){let t=jo(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Uo&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Zo=oo,Yo=class extends Zo{constructor(e){super(e),this.type="comment"}};var Jo=Yo;Yo.default=Yo;let qo,Ko,Xo,Ho,{isClean:$o,my:Qo}=Zn,ei=lo,ti=Jo,ri=oo;function si(e){return e.map((e=>(e.nodes&&(e.nodes=si(e.nodes)),delete e.source,e)))}function ni(e){if(e[$o]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)ni(t)}let oi=class e extends ri{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=si(qo(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new ei(t)]}else if(t.selector)t=[new Ko(t)];else if(t.name)t=[new Xo(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new ti(t)]}return t.map((t=>(t[Qo]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[$o]&&ni(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};oi.registerParse=e=>{qo=e},oi.registerRule=e=>{Ko=e},oi.registerAtRule=e=>{Xo=e},oi.registerRoot=e=>{Ho=e};var ii=oi;oi.default=oi,oi.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Xo.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ko.prototype):"decl"===e.type?Object.setPrototypeOf(e,ei.prototype):"comment"===e.type?Object.setPrototypeOf(e,ti.prototype):"root"===e.type&&Object.setPrototypeOf(e,Ho.prototype),e[Qo]=!0,e.nodes&&e.nodes.forEach((e=>{oi.rebuild(e)}))};let ai,li,ci=ii,ui=class extends ci{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ai(new li,this,e).stringify()}};ui.registerLazyResult=e=>{ai=e},ui.registerProcessor=e=>{li=e};var hi=ui;ui.default=ui;let pi={};var di=function(e){pi[e]||(pi[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let fi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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}};var mi=fi;fi.default=fi;let gi=mi,yi=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new gi(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var vi=yi;yi.default=yi;const wi="'".charCodeAt(0),bi='"'.charCodeAt(0),Si="\\".charCodeAt(0),Ci="/".charCodeAt(0),xi="\n".charCodeAt(0),Ii=" ".charCodeAt(0),ki="\f".charCodeAt(0),Oi="\t".charCodeAt(0),Ei="\r".charCodeAt(0),Ai="[".charCodeAt(0),Ri="]".charCodeAt(0),Mi="(".charCodeAt(0),Pi=")".charCodeAt(0),Ni="{".charCodeAt(0),Ti="}".charCodeAt(0),Li=";".charCodeAt(0),Di="*".charCodeAt(0),Fi=":".charCodeAt(0),_i="@".charCodeAt(0),Bi=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ui=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ji=/.[\r\n"'(/\\]/,zi=/[\da-f]/i;let Wi=ii,Vi=class extends Wi{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Gi=Vi;Vi.default=Vi,Wi.registerAtRule(Vi);let Zi,Yi,Ji=ii,qi=class extends Ji{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Zi(new Yi,this,e).stringify()}};qi.registerLazyResult=e=>{Zi=e},qi.registerProcessor=e=>{Yi=e};var Ki=qi;qi.default=qi,Ji.registerRoot(qi);let Xi={comma:e=>Xi.split(e,[","],!0),space:e=>Xi.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Hi=Xi;Xi.default=Xi;let $i=ii,Qi=Hi,ea=class extends $i{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Qi.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var ta=ea;ea.default=ea,$i.registerRule(ea);let ra=lo,sa=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case xi:case Ii:case Oi:case Ei:case ki:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===Ii||r===xi||r===Oi||r===Ei||r===ki);h=["space",p.slice(m,s)],m=s-1;break;case Ai:case Ri:case Ni:case Ti:case Fi:case Li:case Pi:{let e=String.fromCharCode(r);h=[e,e,m];break}case Mi:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==wi&&u!==bi&&u!==Ii&&u!==xi&&u!==Oi&&u!==ki&&u!==Ei){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}v("bracket")}for(l=s;p.charCodeAt(l-1)===Si;)l-=1,a=!a}while(a);h=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||ji.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case wi:case bi:n=r===wi?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}v("string")}for(l=s;p.charCodeAt(l-1)===Si;)l-=1,a=!a}while(a);h=["string",p.slice(m,s+1),m,s],m=s;break;case _i:Bi.lastIndex=m+1,Bi.test(p),s=0===Bi.lastIndex?p.length-1:Bi.lastIndex-2,h=["at-word",p.slice(m,s+1),m,s],m=s;break;case Si:for(s=m,i=!0;p.charCodeAt(s+1)===Si;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==Ci&&r!==Ii&&r!==xi&&r!==Oi&&r!==Ei&&r!==ki&&(s+=1,zi.test(p.charAt(s)))){for(;zi.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===Ii&&(s+=1)}h=["word",p.slice(m,s+1),m,s],m=s;break;default:r===Ci&&p.charCodeAt(m+1)===Di?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:v("comment")),h=["comment",p.slice(m,s+1),m,s],m=s):(Ui.lastIndex=m+1,Ui.test(p),s=0===Ui.lastIndex?p.length-1:Ui.lastIndex-2,h=["word",p.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},na=Jo,oa=Gi,ia=Ki,aa=ta;const la={empty:!0,space:!0};var ca=class{constructor(e){this.input=e,this.root=new ia,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new oa;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new na;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=sa(this.input)}decl(e,t){let r=new ra;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new aa;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",la[a]||la[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new aa;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let ua=ii,ha=ca,pa=To;function da(e,t){let r=new pa(e,t),s=new ha(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var fa=da;da.default=da,ua.registerParse(da);let{isClean:ma,my:ga}=Zn,ya=Go,va=Hn,wa=ii,ba=hi,Sa=di,Ca=vi,xa=fa,Ia=Ki;const ka={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Oa={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},Ea={Once:!0,postcssPlugin:!0,prepare:!0};function Aa(e){return"object"==typeof e&&"function"==typeof e.then}function Ra(e){let t=!1,r=ka[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Ma(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Ra(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Pa(e){return e[ma]=!1,e.nodes&&e.nodes.forEach((e=>Pa(e))),e}let Na={},Ta=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Ca)n=Pa(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=xa;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[ga]&&wa.rebuild(n)}else n=Pa(r);this.result=new Ca(t,n,s),this.helpers={...Na,postcss:Na,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!Oa[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ea[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Aa(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ma];){e[ma]=!0;let t=[Ma(e)];for(;t.length>0;){let e=this.visitTick(t);if(Aa(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return Aa(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=va;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new ya(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){if(Aa(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ma];)e[ma]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Sa("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Aa(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[ma])return s[ma]=!0,void e.push(Ma(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[ma]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[ma]=!0;let t=Ra(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[ma]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};Ta.registerPostcss=e=>{Na=e};var La=Ta;Ta.default=Ta,Ia.registerLazyResult(Ta),ba.registerLazyResult(Ta);let Da=Go,Fa=Hn,_a=di,Ba=fa;const Ua=vi;let ja=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Fa;this.result=new Ua(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Da(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||_a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}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 e,t=Ba;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var za=ja;ja.default=ja;let Wa=za,Va=La,Ga=hi,Za=Ki,Ya=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Va(this,e,t):new Wa(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ja=Ya;Ya.default=Ya,Za.registerProcessor(Ya),Ga.registerProcessor(Ya);let qa=lo,Ka=vo,Xa=Jo,Ha=Gi,$a=To,Qa=Ki,el=ta;function tl(e,t){if(Array.isArray(e))return e.map((e=>tl(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:$a.prototype};r.map&&(r.map={...r.map,__proto__:Ka.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>tl(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Qa(s);if("decl"===s.type)return new qa(s);if("rule"===s.type)return new el(s);if("comment"===s.type)return new Xa(s);if("atrule"===s.type)return new Ha(s);throw new Error("Unknown node type: "+e.type)}var rl=tl;tl.default=tl;let sl=Gn,nl=lo,ol=La,il=ii,al=Ja,ll=Hn,cl=rl,ul=hi,hl=mi,pl=Jo,dl=Gi,fl=vi,ml=To,gl=fa,yl=Hi,vl=ta,wl=Ki,bl=oo;function Sl(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new al(e)}Sl.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new al).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Sl([n(r)]).process(e,t)},n},Sl.stringify=ll,Sl.parse=gl,Sl.fromJSON=cl,Sl.list=yl,Sl.comment=e=>new pl(e),Sl.atRule=e=>new dl(e),Sl.decl=e=>new nl(e),Sl.rule=e=>new vl(e),Sl.root=e=>new wl(e),Sl.document=e=>new ul(e),Sl.CssSyntaxError=sl,Sl.Declaration=nl,Sl.Container=il,Sl.Processor=al,Sl.Document=ul,Sl.Comment=pl,Sl.Warning=hl,Sl.AtRule=dl,Sl.Result=fl,Sl.Input=ml,Sl.Rule=vl,Sl.Root=wl,Sl.Node=bl,ol.registerPostcss(Sl);var Cl=Sl;Sl.default=Sl;const xl=Ln(Cl);xl.stringify,xl.fromJSON,xl.plugin,xl.parse,xl.list,xl.document,xl.comment,xl.atRule,xl.rule,xl.decl,xl.root,xl.CssSyntaxError,xl.Declaration,xl.Container,xl.Processor,xl.Document,xl.Comment,xl.Warning,xl.AtRule,xl.Result,xl.Input,xl.Rule,xl.Root,xl.Node;class Il{constructor(...e){Tn(this,"parentElement",null),Tn(this,"parentNode",null),Tn(this,"ownerDocument"),Tn(this,"firstChild",null),Tn(this,"lastChild",null),Tn(this,"previousSibling",null),Tn(this,"nextSibling",null),Tn(this,"ELEMENT_NODE",1),Tn(this,"TEXT_NODE",3),Tn(this,"nodeType"),Tn(this,"nodeName"),Tn(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof Il))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const kl={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ol={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},El={};function Al(e){if(El[e])return El[e];const t=globalThis[e],r=t.prototype,s=e in kl?kl[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in Ol?Ol[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return El[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?El[e]=o:r}catch{return r}}const Rl={};function Ml(e,t,r){var s;const n=`${e}.${String(r)}`;if(Rl[n])return Rl[n].call(t);const o=Al(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(Rl[n]=i,i.call(t)):t[r]}const Pl={};function Nl(e,t,r){const s=`${e}.${String(r)}`;if(Pl[s])return Pl[s].bind(t);const n=Al(e)[r];return"function"!=typeof n?t[r]:(Pl[s]=n,n.bind(t))}function Tl(){return Al("MutationObserver").constructor}const Ll={childNodes:function(e){return Ml("Node",e,"childNodes")},parentNode:function(e){return Ml("Node",e,"parentNode")},parentElement:function(e){return Ml("Node",e,"parentElement")},textContent:function(e){return Ml("Node",e,"textContent")},contains:function(e,t){return Nl("Node",e,"contains")(t)},getRootNode:function(e){return Nl("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ml("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ml("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ml("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ml("Element",e,"querySelectorAll")(t)},mutationObserver:Tl};function Dl(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Fl="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let _l={map:{},getId:()=>(console.error(Fl),-1),getNode:()=>(console.error(Fl),null),removeNodeFromMap(){console.error(Fl)},has:()=>(console.error(Fl),!1),reset(){console.error(Fl)}};function Bl(e,t,r={}){let s=null,n=0;return function(...o){const i=Date.now();n||!1!==r.leading||(n=i);const a=t-(i-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=i,e.apply(l,o)):s||!1===r.trailing||(s=setTimeout((()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,o)}),a))}}function Ul(e,t,r,s,n=window){const o=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>Ul(e,t,o||{},!0)}function jl(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(_l=new Proxy(_l,{get:(e,t,r)=>("map"===t&&console.error(Fl),Reflect.get(e,t,r))}));let zl=Date.now;function Wl(e){var t,r,s,n;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=Ll.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(s=Ll.parentElement(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}}function Vl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Gl(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Zl(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Ll.parentElement(e)}function Yl(e,t,r,s){if(!e)return!1;const n=Zl(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(_e(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1}function Jl(e,t){return-1!==t.getId(e)}function ql(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function Kl(e,t){if(ae(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=Ll.parentNode(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||Kl(s,t))}function Xl(e){return Boolean(e.changedTouches)}function Hl(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 $l(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Ql(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function ec(e){return!!e&&(e instanceof Il&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Ll.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(zl=()=>(new Date).getTime());class tc{constructor(){J(this,"id",1),J(this,"styleIDMap",new WeakMap),J(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function rc(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Ll.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ll.host(Ll.getRootNode(e))&&(r=Ll.host(Ll.getRootNode(e))),r}function sc(e){let t,r=e;for(;t=rc(r);)r=t;return r}function nc(e){const t=e.ownerDocument;if(!t)return!1;const r=sc(e);return Ll.contains(t,r)}function oc(e){const t=e.ownerDocument;return!!t&&(Ll.contains(t,e)||nc(e))}const ic=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:tc,get _mirror(){return _l},closestElementOfNode:Zl,getBaseDimension:function e(t,r){var s,n;const o=null==(n=null==(s=t.ownerDocument)?void 0:s.defaultView)?void 0:n.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=e(o,r),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){const s=t[r[0]];return 1===r.length?s:e(s.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:sc,getShadowHost:rc,getWindowHeight:Vl,getWindowScroll:Wl,getWindowWidth:Gl,hasShadowRoot:ec,hookSetter:Ul,inDom:oc,isAncestorRemoved:Kl,isBlocked:Yl,isIgnored:ql,isSerialized:Jl,isSerializedIframe:$l,isSerializedStylesheet:Ql,iterateResolveTree:function e(t,r){r(t.value);for(let s=t.children.length-1;s>=0;s--)e(t.children[s],r)},legacy_isTouchEvent:Xl,get nowTimestamp(){return zl},on:Dl,patch:jl,polyfill:Hl,queueToResolveTrees:function(e){const t={},r=(e,r)=>{const s={value:e,parent:r,children:[]};return t[e.node.id]=s,s},s=[];for(const n of e){const{nextId:e,parentId:o}=n;if(e&&e in t){const o=t[e];if(o.parent){const e=o.parent.children.indexOf(o);o.parent.children.splice(e,0,r(n,o.parent))}else{const e=s.indexOf(o);s.splice(e,0,r(n,null))}}else if(o in t){const e=t[o];e.children.push(r(n,e))}else s.push(r(n,null))}return s},shadowHostInDom:nc,throttle:Bl,uniqueTextMutations:function(e){const t=new Set,r=[];for(let s=e.length;s--;){const n=e[s];t.has(n.id)||(r.push(n),t.add(n.id))}return r}},Symbol.toStringTag,{value:"Module"}));var ac=(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))(ac||{}),lc=(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))(lc||{}),cc=(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))(cc||{}),uc=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(uc||{}),hc=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(hc||{}),pc=(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))(pc||{}),dc=(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))(dc||{});function fc(e){return"__ln"in e}class mc{constructor(){J(this,"length",0),J(this,"head",null),J(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&fc(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&fc(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const gc=(e,t)=>`${e}@${t}`;class yc{constructor(){J(this,"frozen",!1),J(this,"locked",!1),J(this,"texts",[]),J(this,"attributes",[]),J(this,"attributeMap",new WeakMap),J(this,"removes",[]),J(this,"mapRemoves",[]),J(this,"movedMap",{}),J(this,"addedSet",new Set),J(this,"movedSet",new Set),J(this,"droppedSet",new Set),J(this,"removesSubTreeCache",new Set),J(this,"mutationCb"),J(this,"blockClass"),J(this,"blockSelector"),J(this,"maskTextClass"),J(this,"maskTextSelector"),J(this,"inlineStylesheet"),J(this,"maskInputOptions"),J(this,"maskTextFn"),J(this,"maskInputFn"),J(this,"keepIframeSrcFn"),J(this,"recordCanvas"),J(this,"inlineImages"),J(this,"slimDOMOptions"),J(this,"dataURLOptions"),J(this,"doc"),J(this,"mirror"),J(this,"iframeManager"),J(this,"stylesheetManager"),J(this,"shadowDomManager"),J(this,"canvasManager"),J(this,"processedNodeManager"),J(this,"unattachedDoc"),J(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),J(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new mc,s=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},n=n=>{const o=Ll.parentNode(n);if(!o||!oc(n))return;let i=!1;if(n.nodeType===Node.TEXT_NODE){const e=o.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(o)&&(i=!0)}const a=ae(o)?this.mirror.getId(rc(n)):this.mirror.getId(o),l=s(n);if(-1===a||-1===l)return r.addNode(n);const c=ze(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{$l(e,this.mirror)&&this.iframeManager.addIframe(e),Ql(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),ec(n)&&this.shadowDomManager.addShadowRoot(Ll.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:i});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)wc(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(Ll.parentNode(e))||n(e);for(const e of this.addedSet)bc(this.droppedSet,e)||wc(this.removesSubTreeCache,e,this.mirror)?bc(this.movedSet,e)?n(e):this.droppedSet.add(e):n(e);let o=null;for(;r.length;){let e=null;if(o){const t=this.mirror.getId(Ll.parentNode(o.value)),r=s(o.value);-1!==t&&-1!==r&&(e=o)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(Ll.parentNode(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,s=Ll.parentNode(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=Ll.host(s);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}o=e.previous,r.removeNode(e.value),n(e.value)}const i={texts:this.texts.map((e=>{const t=e.node,r=Ll.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const r=JSON.stringify(e.styleDiff),s=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+s).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(i))})),J(this,"genTextAreaValueMutation",(e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(Ll.childNodes(e),(e=>Ll.textContent(e)||"")).join("");t.attributes.value=pe({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:me(e),value:r,maskInputFn:this.maskInputFn})})),J(this,"processMutation",(e=>{if(!ql(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Ll.textContent(e.target);Yl(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:Be(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Zl(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if("value"===r){const e=me(t);s=pe({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(Yl(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(s)){if(t.contentDocument)return;r="rr_src"}if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Fe(t.tagName,r))if(n.attributes[r]=De(this.doc,de(t.tagName),de(r),s),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const s=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);s!==r.style.getPropertyValue(e)||o!==r.style.getPropertyPriority(e)?n.styleDiff[e]=""===o?s:[s,o]:n._unchangedStyles[e]=[s,o]}for(const e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(n.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":if(Yl(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const r=this.mirror.getId(t),s=ae(e.target)?this.mirror.getId(Ll.host(e.target)):this.mirror.getId(e.target);Yl(e.target,this.blockClass,this.blockSelector,!1)||ql(t,this.mirror,this.slimDOMOptions)||!Jl(t,this.mirror)||(this.addedSet.has(t)?(vc(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Kl(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[gc(r,s)]?vc(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!ae(e.target)||!le(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),Ll.childNodes(e).forEach((e=>r.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),J(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(ql(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[gc(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Yl(e,this.blockClass,this.blockSelector,!1)||(Ll.childNodes(e).forEach((e=>this.genAdds(e))),ec(e)&&Ll.childNodes(Ll.shadowRoot(e)).forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}))}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function vc(e,t){e.delete(t),Ll.childNodes(t).forEach((t=>vc(e,t)))}function wc(e,t,r){return 0!==e.size&&function(e,t,r){const s=Ll.parentNode(t);return!!s&&e.has(s)}(e,t)}function bc(e,t){return 0!==e.size&&Sc(e,t)}function Sc(e,t){const r=Ll.parentNode(t);return!!r&&(!!e.has(r)||Sc(e,r))}let Cc;const xc=e=>{if(!Cc)return e;return(...t)=>{try{return e(...t)}catch(e){if(Cc&&!0===Cc(e))return;throw e}}};function Ic(e){return(...t)=>{try{return e(...t)}catch(e){try{e._external_=!0}catch{}throw e}}}const kc=[];function Oc(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Ec(e,t){const r=new yc;kc.push(r),r.init(e);const s=new(Tl())(xc(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Ac({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const i=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];let l=null;return Object.keys(cc).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e])).forEach((o=>{let i=de(o);const c=(t=>o=>{const i=Oc(o);if(Yl(i,s,n,!0))return;let a=null,c=t;if("pointerType"in o){switch(o.pointerType){case"mouse":a=uc.Mouse;break;case"touch":a=uc.Touch;break;case"pen":a=uc.Pen}a===uc.Touch?cc[t]===cc.MouseDown?c="TouchStart":cc[t]===cc.MouseUp&&(c="TouchEnd"):uc.Pen}else Xl(o)&&(a=uc.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===uc.Touch||c.startsWith("Mouse")&&a===uc.Mouse)&&(a=null)):cc[t]===cc.Click&&(a=l,l=null);const u=Xl(o)?o.changedTouches[0]:o;if(!u)return;const h=r.getId(i),{clientX:p,clientY:d}=u;xc(e)({type:cc[c],id:h,x:p,y:d,...null!==a&&{pointerType:a}})})(o);if(window.PointerEvent)switch(cc[o]){case cc.MouseDown:case cc.MouseUp:i=i.replace("mouse","pointer");break;case cc.TouchStart:case cc.TouchEnd:return}a.push(Dl(i,c,t))})),xc((()=>{a.forEach((e=>e()))}))}function Rc({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:o}){const i=xc(Bl(xc((o=>{const i=Oc(o);if(!i||Yl(i,s,n,!0))return;const a=r.getId(i);if(i===t&&t.defaultView){const r=Wl(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})})),o.scroll||100));return Dl("scroll",i,t)}const Mc=["INPUT","TEXTAREA","SELECT"],Pc=new WeakMap;function Nc(e){return function(e,t){if(Fc("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Fc("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Fc("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Fc("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function Tc(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function Lc({mirror:e,stylesheetManager:t},r){var s,n,o;let i=null;i="#document"===r.nodeName?e.getId(r):e.getId(Ll.host(r));const a="#document"===r.nodeName?null==(s=r.defaultView)?void 0:s.Document:null==(o=null==(n=r.ownerDocument)?void 0:n.defaultView)?void 0:o.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==i&&-1!==i&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;const s=null==(r=l.set)?void 0:r.call(this,e);if(null!==i&&-1!==i)try{t.adoptStyleSheets(e,i)}catch(e){}return s}}),xc((()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function Dc(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let s;!function(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:i,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:d,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),s(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),o(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),i(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),h(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),d(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(s=Ec(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(!1===t.mousemove)return()=>{};const n="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const l=Bl(xc((t=>{const r=Date.now()-i;e(a.map((e=>(e.timeOffset-=r,e))),t),a=[],i=null})),o),c=xc(Bl(xc((e=>{const t=Oc(e),{clientX:r,clientY:n}=Xl(e)?e.changedTouches[0]:e;i||(i=zl()),a.push({x:r,y:n,id:s.getId(t),timeOffset:zl()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?lc.Drag:e instanceof MouseEvent?lc.MouseMove:lc.TouchMove)})),n,{trailing:!1})),u=[Dl("mousemove",c,r),Dl("touchmove",c,r),Dl("drag",c,r)];return xc((()=>{u.forEach((e=>e()))}))}(e),o=Ac(e),i=Rc(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return Dl("resize",xc(Bl(xc((()=>{const t=Vl(),n=Gl();r===t&&s===n||(e({width:Number(n),height:Number(t)}),r=t,s=n)})),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,ignoreClass:o,ignoreSelector:i,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:u}){function h(e){let r=Oc(e);const c=e.isTrusted,h=r&&r.tagName;if(r&&"OPTION"===h&&(r=Ll.parentElement(r)),!r||!h||Mc.indexOf(h)<0||Yl(r,s,n,!0))return;if(r.classList.contains(o)||i&&r.matches(i))return;let d=r.value,f=!1;const m=me(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[h.toLowerCase()]||a[m])&&(d=pe({element:r,maskInputOptions:a,tagName:h,type:m,value:d,maskInputFn:l})),p(r,u?{text:d,isChecked:f,userTriggered:c}:{text:d,isChecked:f});const g=r.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach((e=>{if(e!==r){const t=e.value;p(e,u?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}}))}function p(t,s){const n=Pc.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){Pc.set(t,s);const n=r.getId(t);xc(e)({...s,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map((e=>Dl(e,xc(h),t))),f=t.defaultView;if(!f)return()=>{d.forEach((e=>e()))};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&d.push(...g.map((e=>Ul(e[0],e[1],{set(){xc(h)({target:this,isTrusted:!1})}},!1,f)))),xc((()=>{d.forEach((e=>e()))}))}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:o}){const i=xc((o=>Bl(xc((n=>{const i=Oc(n);if(!i||Yl(i,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:u,loop:h}=i;e({type:o,id:s.getId(i),currentTime:a,volume:l,muted:c,playbackRate:u,loop:h})})),n.media||500))),a=[Dl("play",i(pc.Play),o),Dl("pause",i(pc.Pause),o),Dl("seeked",i(pc.Seeked),o),Dl("volumechange",i(pc.VolumeChange),o),Dl("ratechange",i(pc.RateChange),o)];return xc((()=>{a.forEach((e=>e()))}))}(e);let u=()=>{},h=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const n=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:xc(((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=Tc(n,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:a}]}),Ic((()=>s.apply(n,o)))()}))}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){const n=`${e} { ${t} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};const o=s.CSSStyleSheet.prototype.deleteRule;let i,a;s.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:xc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Tc(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:i}]}),Ic((()=>s.apply(n,o)))()}))}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:xc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Tc(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:i}),s.apply(n,o)}))})),s.CSSStyleSheet.prototype.replaceSync&&(a=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:xc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Tc(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:i}),s.apply(n,o)}))}));const l={};_c("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(_c("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),_c("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),_c("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(l).forEach((([s,n])=>{c[s]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[s].insertRule,{apply:xc(((s,n,o)=>{const[i,a]=o,{id:l,styleId:c}=Tc(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:[...Nc(n),a||0]}]}),s.apply(n,o)}))}),n.prototype.deleteRule=new Proxy(c[s].deleteRule,{apply:xc(((s,n,o)=>{const[i]=o,{id:a,styleId:l}=Tc(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...Nc(n),i]}]}),s.apply(n,o)}))})})),xc((()=>{s.CSSStyleSheet.prototype.insertRule=n,s.CSSStyleSheet.prototype.deleteRule=o,i&&(s.CSSStyleSheet.prototype.replace=i),a&&(s.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach((([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule}))}))}(e,{win:r}),h=Lc(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:n}){const o=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:xc(((n,i,a)=>{var l;const[c,u,h]=a;if(r.has(c))return o.apply(i,[c,u,h]);const{id:p,styleId:d}=Tc(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:u,priority:h},index:Nc(i.parentRule)}),n.apply(i,a)}))});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:xc(((n,o,a)=>{var l;const[c]=a;if(r.has(c))return i.apply(o,[c]);const{id:u,styleId:h}=Tc(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(u&&-1!==u||h&&-1!==h)&&e({id:u,styleId:h,remove:{property:c},index:Nc(o.parentRule)}),n.apply(o,a)}))}),xc((()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=i}))}(e,{win:r}),e.collectFonts&&(d=function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],n=new WeakMap,o=r.FontFace;r.FontFace=function(e,t,r){const s=new o(e,t,r);return n.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};const i=jl(t.fonts,"add",(function(t){return function(r){return setTimeout(xc((()=>{const t=n.get(r);t&&(e(t),n.delete(r))})),0),t.apply(this,[r])}}));return s.push((()=>{r.FontFace=o})),s.push(i),xc((()=>{s.forEach((e=>e()))}))}(e)));const f=function(e){const{doc:t,mirror:r,blockClass:s,blockSelector:n,selectionCb:o}=e;let i=!0;const a=xc((()=>{const e=t.getSelection();if(!e||i&&(null==e?void 0:e.isCollapsed))return;i=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const o=e.getRangeAt(t),{startContainer:i,startOffset:l,endContainer:c,endOffset:u}=o;Yl(i,s,n,!0)||Yl(c,s,n,!0)||a.push({start:r.getId(i),startOffset:l,end:r.getId(c),endOffset:u})}o({ranges:a})}));return a(),Dl("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?jl(r.customElements,"define",(function(e){return function(r,s,n){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,s,n])}})):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,r,t.options));return xc((()=>{kc.forEach((e=>e.reset())),null==s||s.disconnect(),n(),o(),i(),a(),l(),c(),u(),h(),p(),d(),f(),m(),g.forEach((e=>e()))}))}function Fc(e){return void 0!==window[e]}function _c(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Bc{constructor(e){J(this,"iframeIdToRemoteIdMap",new WeakMap),J(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const n=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e);let i=n.get(t);return i||(i=this.generateIdFn(),n.set(t,i),o.set(i,t)),i}getIds(e,t){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,r,s)))}getRemoteId(e,t,r){const s=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const n=s.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Uc{constructor(e){J(this,"iframes",new WeakMap),J(this,"crossOriginIframeMap",new WeakMap),J(this,"crossOriginIframeMirror",new Bc(Oe)),J(this,"crossOriginIframeStyleMirror"),J(this,"crossOriginIframeRootIdMap",new WeakMap),J(this,"mirror"),J(this,"mutationCb"),J(this,"wrappedEmit"),J(this,"loadListener"),J(this,"stylesheetManager"),J(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Bc(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(s=this.loadListener)||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const s=this.transformCrossOriginEvent(r,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case ac.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:ac.IncrementalSnapshot,data:{source:lc.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ac.Meta:case ac.Load:case ac.DomContentLoaded:return!1;case ac.Plugin:return t;case ac.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case ac.IncrementalSnapshot:switch(t.data.source){case lc.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case lc.Drag:case lc.TouchMove:case lc.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case lc.ViewportResize:return!1;case lc.MediaInteraction:case lc.MouseInteraction:case lc.Scroll:case lc.CanvasMutation:case lc.Input:return this.replaceIds(t.data,e,["id"]),t;case lc.StyleSheetRule:case lc.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case lc.Font:return t;case lc.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case lc.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,s){for(const n of s)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===dc.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class jc{constructor(e){J(this,"shadowDoms",new WeakSet),J(this,"mutationCb"),J(this,"scrollCb"),J(this,"bypassOptions"),J(this,"mirror"),J(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!le(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Ec({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(Rc({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(Ll.host(e))),this.restoreHandlers.push(Lc({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(jl(e.prototype,"attachShadow",(function(e){return function(s){const n=e.call(this,s),o=Ll.shadowRoot(this);return o&&oc(this)&&r.addShadowRoot(o,t),n}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var zc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wc="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Vc=0;Vc<zc.length;Vc++)Wc[zc.charCodeAt(Vc)]=Vc;const Gc=new Map;const Zc=(e,t,r)=>{if(!e||!qc(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=Gc.get(e);return r||(r=new Map,Gc.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let n=s.indexOf(e);return-1===n&&(n=s.length,s.push(e)),n};function Yc(e,t,r){if(e instanceof Array)return e.map((e=>Yc(e,t,r)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),s=r.length,n="";for(t=0;t<s;t+=3)n+=zc[r[t]>>2],n+=zc[(3&r[t])<<4|r[t+1]>>4],n+=zc[(15&r[t+1])<<2|r[t+2]>>6],n+=zc[63&r[t+2]];return s%3==2?n=n.substring(0,n.length-1)+"=":s%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Yc(e.buffer,t,r),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Yc(e.data,t,r),e.width,e.height]}}if(qc(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Zc(e,t,r)}}return e}const Jc=(e,t,r)=>e.map((e=>Yc(e,t,r))),qc=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))};function Kc(e,t,r,s){const n=[];try{const o=jl(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n,...o){if(!Yl(this,t,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),s&&["webgl","webgl2"].includes(e))if(o[0]&&"object"==typeof o[0]){const e=o[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...o])}}));n.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((e=>e()))}}function Xc(e,t,r,s,n,o){const i=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=jl(e,l,(function(e){return function(...i){const a=e.apply(this,i);if(Zc(a,o,this),"tagName"in this.canvas&&!Yl(this.canvas,s,n,!0)){const e=Jc(i,o,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}}));i.push(a)}catch{const s=Ul(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});i.push(s)}return i}const Hc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",$c="undefined"!=typeof window&&window.Blob&&new Blob([(Qc=Hc,Uint8Array.from(atob(Qc),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});var Qc;function eu(e){let t;try{if(t=$c&&(window.URL||window.webkitURL).createObjectURL($c),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;base64,"+Hc,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class tu{constructor(e){J(this,"pendingCanvasMutations",new Map),J(this,"rafStamps",{latestId:0,invokeId:null}),J(this,"mirror"),J(this,"mutationCb"),J(this,"resetObservers"),J(this,"frozen",!1),J(this,"locked",!1),J(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));const{sampling:t="all",win:r,blockClass:s,blockSelector:n,recordCanvas:o,dataURLOptions:i}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,s,n),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,n,{dataURLOptions:i})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,s,n){const o=Kc(t,r,s,!0),i=new Map,a=new eu;a.onmessage=e=>{const{id:t}=e.data;if(i.set(t,!1),!("base64"in e.data))return;const{base64:r,type:s,width:n,height:o}=e.data;this.mutationCb({id:t,type:hc["2D"],commands:[{property:"clearRect",args:[0,0,n,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:s}]},0,0]}]})};const l=1e3/e;let c,u=0;const h=e=>{u&&e-u<l||(u=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach((t=>{Yl(t,r,s,!0)||e.push(t)})),e})().forEach((async e=>{var t;const r=this.mirror.getId(e);if(i.get(r))return;if(0===e.width||0===e.height)return;if(i.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}const s=await createImageBitmap(e);a.postMessage({id:r,bitmap:s,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[s])}))),c=requestAnimationFrame(h)};c=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Kc(e,t,r,!1),n=function(e,t,r,s){const n=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const i of o)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])continue;const o=jl(t.CanvasRenderingContext2D.prototype,i,(function(n){return function(...o){return Yl(this.canvas,r,s,!0)||setTimeout((()=>{const r=Jc(o,t,this);e(this.canvas,{type:hc["2D"],property:i,args:r})}),0),n.apply(this,o)}}));n.push(o)}catch{const r=Ul(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:hc["2D"],property:i,args:[t],setter:!0})}});n.push(r)}return()=>{n.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r),o=function(e,t,r,s){const n=[];return n.push(...Xc(t.WebGLRenderingContext.prototype,hc.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...Xc(t.WebGL2RenderingContext.prototype,hc.WebGL2,e,r,s,t)),()=>{n.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const s=r.map((e=>{const{type:t,...r}=e;return r})),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}}class ru{constructor(e){J(this,"trackedLinkElements",new WeakSet),J(this,"mutationCb"),J(this,"adoptedStyleSheetCb"),J(this,"styleMirror",new tc),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const r={id:t,styleIds:[]},s=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),s.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:ue(e,t.href),index:r})))})),r.styleIds.push(e)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class su{constructor(){J(this,"nodeMap",new WeakMap),J(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let nu,ou,iu,au=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(W=e.contentWindow)?void 0:W.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const lu=new he;function cu(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:i="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:d,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:v={},dataURLOptions:w={},mousemoveWait:b,recordDOM:S=!0,recordCanvas:C=!1,recordCrossOriginIframes:x=!1,recordAfter:I=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:k=!1,collectFonts:O=!1,inlineImages:E=!1,plugins:A,keepIframeSrcFn:R=(()=>!1),ignoreCSSAttributes:M=new Set([]),errorHandler:P}=e;Cc=P;const N=!x||window.parent===window;let T=!1;if(!N)try{window.parent.document&&(T=!1)}catch(e){T=!0}if(N&&!t)throw new Error("emit function is required");if(!N&&!T)return()=>{};void 0!==b&&void 0===v.mousemove&&(v.mousemove=b),lu.reset();const L=!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==p?p:{password:!0},D=!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===d,headMetaDescKeywords:"all"===d,headTitleMutations:"all"===d}:d||{};let F;Hl();let _=0;const B=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!T&&(e=y(e)),e};nu=(e,n)=>{var o;const i=e;if(i.timestamp=zl(),!(null==(o=kc[0])?void 0:o.isFrozen())||i.type===ac.FullSnapshot||i.type===ac.IncrementalSnapshot&&i.data.source===lc.Mutation||kc.forEach((e=>e.unfreeze())),N)null==t||t(B(i),n);else if(T){const e={type:"rrweb",event:B(i),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(i.type===ac.FullSnapshot)F=i,_=0;else if(i.type===ac.IncrementalSnapshot){if(i.data.source===lc.Mutation&&i.data.isAttachIframe)return;_++;const e=s&&_>=s,t=r&&i.timestamp-F.timestamp>r;(e||t)&&ou(!0)}};const U=e=>{nu({type:ac.IncrementalSnapshot,data:{source:lc.Mutation,...e}})},j=e=>nu({type:ac.IncrementalSnapshot,data:{source:lc.Scroll,...e}}),z=e=>nu({type:ac.IncrementalSnapshot,data:{source:lc.CanvasMutation,...e}}),W=new ru({mutationCb:U,adoptedStyleSheetCb:e=>nu({type:ac.IncrementalSnapshot,data:{source:lc.AdoptedStyleSheet,...e}})}),V=new Uc({mirror:lu,mutationCb:U,stylesheetManager:W,recordCrossOriginIframes:x,wrappedEmit:nu});for(const e of A||[])e.getMirror&&e.getMirror({nodeMirror:lu,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});const G=new su;iu=new tu({recordCanvas:C,mutationCb:z,win:window,blockClass:n,blockSelector:o,mirror:lu,sampling:v.canvas,dataURLOptions:w});const Z=new jc({mutationCb:U,scrollCb:j,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:L,dataURLOptions:w,maskTextFn:m,maskInputFn:f,recordCanvas:C,inlineImages:E,sampling:v,slimDOMOptions:D,iframeManager:V,stylesheetManager:W,canvasManager:iu,keepIframeSrcFn:R,processedNodeManager:G},mirror:lu});ou=(e=!1)=>{if(!S)return;nu({type:ac.Meta,data:{href:window.location.href,width:Gl(),height:Vl()}},e),W.reset(),Z.init(),kc.forEach((e=>e.lock()));const t=function(e,t){const{mirror:r=new he,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:o="rr-mask",maskTextSelector:i=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:p,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:b,keepIframeSrcFn:S=(()=>!1)}=t||{};return ze(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:i,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===u?{password:!0}:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:b,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:lu,blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:L,maskTextFn:m,maskInputFn:f,slimDOM:D,dataURLOptions:w,recordCanvas:C,inlineImages:E,onSerialize:e=>{$l(e,lu)&&V.addIframe(e),Ql(e,lu)&&W.trackLinkElement(e),ec(e)&&Z.addShadowRoot(Ll.shadowRoot(e),document)},onIframeLoad:(e,t)=>{V.attachIframe(e,t),Z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{W.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");nu({type:ac.FullSnapshot,data:{node:t,initialOffset:Wl(window)}},e),kc.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,lu.getId(document))};try{const e=[],t=e=>{var t;return xc(Dc)({mutationCb:U,mousemoveCb:(e,t)=>nu({type:ac.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>nu({type:ac.IncrementalSnapshot,data:{source:lc.MouseInteraction,...e}}),scrollCb:j,viewportResizeCb:e=>nu({type:ac.IncrementalSnapshot,data:{source:lc.ViewportResize,...e}}),inputCb:e=>nu({type:ac.IncrementalSnapshot,data:{source:lc.Input,...e}}),mediaInteractionCb:e=>nu({type:ac.IncrementalSnapshot,data:{source:lc.MediaInteraction,...e}}),styleSheetRuleCb:e=>nu({type:ac.IncrementalSnapshot,data:{source:lc.StyleSheetRule,...e}}),styleDeclarationCb:e=>nu({type:ac.IncrementalSnapshot,data:{source:lc.StyleDeclaration,...e}}),canvasMutationCb:z,fontCb:e=>nu({type:ac.IncrementalSnapshot,data:{source:lc.Font,...e}}),selectionCb:e=>{nu({type:ac.IncrementalSnapshot,data:{source:lc.Selection,...e}})},customElementCb:e=>{nu({type:ac.IncrementalSnapshot,data:{source:lc.CustomElement,...e}})},blockClass:n,ignoreClass:i,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:L,inlineStylesheet:u,sampling:v,recordDOM:S,recordCanvas:C,inlineImages:E,userTriggeredOnInput:k,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:R,blockSelector:o,slimDOMOptions:D,dataURLOptions:w,mirror:lu,iframeManager:V,stylesheetManager:W,shadowDomManager:Z,processedNodeManager:G,canvasManager:iu,ignoreCSSAttributes:M,plugins:(null==(t=null==A?void 0:A.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>nu({type:ac.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};V.addLoadListener((r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}}));const r=()=>{ou(),e.push(t(document)),au=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(Dl("DOMContentLoaded",(()=>{nu({type:ac.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&r()}))),e.push(Dl("load",(()=>{nu({type:ac.Load,data:{}}),"load"===I&&r()}),window))),()=>{e.forEach((e=>e())),G.destroy(),au=!1,Cc=void 0}}catch(e){console.warn(e)}}var uu,hu,pu,du;cu.addCustomEvent=(e,t)=>{if(!au)throw new Error("please add custom event after start recording");nu({type:ac.Custom,data:{tag:e,payload:t}})},cu.freezePage=()=>{kc.forEach((e=>e.freeze()))},cu.takeFullSnapshot=e=>{if(!au)throw new Error("please take full snapshot after start recording");ou(e)},cu.mirror=lu,(hu=uu||(uu={}))[hu.NotStarted=0]="NotStarted",hu[hu.Running=1]="Running",hu[hu.Stopped=2]="Stopped",function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(pu||(pu={})),function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(du||(du={}));var fu=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,r,s,n,o,i,a,l,c,u,h,p,d,f,m,g,y,v,w,b,S,C;if("object"!=typeof e)return null;var x=e.code||0,I=this.buildStatus(x);switch(I){case du.Success:return{status:I,statusCode:x,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(r=e.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(s=e.server_upload_time)&&void 0!==s?s:0}};case du.Invalid:return{status:I,statusCode:x,body:{error:null!==(n=e.error)&&void 0!==n?n:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(i=e.events_with_invalid_fields)&&void 0!==i?i:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(u=e.exceeded_daily_quota_devices)&&void 0!==u?u:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(d=e.throttled_devices)&&void 0!==d?d:{},throttledEvents:null!==(f=e.throttled_events)&&void 0!==f?f:[]}};case du.PayloadTooLarge:return{status:I,statusCode:x,body:{error:null!==(m=e.error)&&void 0!==m?m:""}};case du.RateLimit:return{status:I,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(v=e.throttled_devices)&&void 0!==v?v:{},throttledUsers:null!==(w=e.throttled_users)&&void 0!==w?w:{},exceededDailyQuotaDevices:null!==(b=e.exceeded_daily_quota_devices)&&void 0!==b?b:{},exceededDailyQuotaUsers:null!==(S=e.exceeded_daily_quota_users)&&void 0!==S?S:{},throttledEvents:null!==(C=e.throttled_events)&&void 0!==C?C:[]}};case du.Timeout:default:return{status:I,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?du.Success:429===e?du.RateLimit:413===e?du.PayloadTooLarge:408===e?du.Timeout:e>=400&&e<500?du.Invalid:e>=500?du.Failed:du.Unknown},e}(),mu="Remote config fetch rejected due to timeout after 5 seconds",gu="Unexpected error occurred",yu=function(){function e(e){var t=e.localConfig,r=e.configKeys,a=this;this.retryTimeout=1e3,this.attempts=0,this.sessionTargetingMatch=!1,this.metrics={},this.getRemoteConfig=function(e,t,r){return n(a,void 0,void 0,(function(){var s,n,i;return o(this,(function(o){switch(o.label){case 0:return s=Date.now(),[4,this.fetchWithTimeout(r)];case 1:return(n=o.sent())&&(i=n.configs&&n.configs[e])?(this.metrics.fetchTimeAPISuccess=Date.now()-s,[2,i[t]]):(this.metrics.fetchTimeAPIFail=Date.now()-s,[2,void 0])}}))}))},this.fetchWithTimeout=function(e){return n(a,void 0,void 0,(function(){var t,r,s;return o(this,(function(n){switch(n.label){case 0:return t=new AbortController,r=setTimeout((function(){return t.abort()}),5e3),[4,this.fetchRemoteConfig(t.signal,e)];case 1:return s=n.sent(),clearTimeout(r),[2,s]}}))}))},this.fetchRemoteConfig=function(e,t){return n(a,void 0,void 0,(function(){var r,n,a,l,c,u,h,p,d,f,m,g;return o(this,(function(o){switch(o.label){case 0:if(t===this.lastFetchedSessionId&&this.attempts>=this.localConfig.flushMaxRetries)return[2,this.completeRequest({err:"Remote config fetch rejected due to exceeded retry count"})];if(e.aborted)return[2,this.completeRequest({err:mu})];t!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=t,this.attempts=0),o.label=1;case 1:o.trys.push([1,3,,4]),r=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(n=i(this.configKeys),a=n.next();!a.done;a=n.next())l=a.value,r.append("config_keys",l)}catch(e){f={error:e}}finally{try{a&&!a.done&&(m=n.return)&&m.call(n)}finally{if(f)throw f.error}}return t&&r.set("session_id",String(t)),c={headers:{Accept:"*/*"},method:"GET"},u="".concat(this.getServerUrl(),"?").concat(r.toString()),this.attempts+=1,[4,fetch(u,s(s({},c),{signal:e}))];case 2:if(null===(h=o.sent()))return[2,this.completeRequest({err:gu})];switch((new fu).buildStatus(h.status)){case du.Success:return this.attempts=0,[2,this.parseAndStoreConfig(h)];case du.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}case 3:return p=o.sent(),d=p,e.aborted?[2,this.completeRequest({err:mu})]:[2,this.completeRequest({err:null!==(g=d.message)&&void 0!==g?g:gu})];case 4:return[2]}}))}))},this.retryFetch=function(e,t){return n(a,void 0,void 0,(function(){var r=this;return o(this,(function(s){switch(s.label){case 0:return[4,new Promise((function(e){return setTimeout(e,r.attempts*r.retryTimeout)}))];case 1:return s.sent(),[2,this.fetchRemoteConfig(e,t)]}}))}))},this.parseAndStoreConfig=function(e){return n(a,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return[4,e.json()];case 1:return t=r.sent(),this.completeRequest({success:"Remote config successfully fetched"}),[2,t]}}))}))},this.localConfig=t,this.configKeys=r}return e.prototype.getServerUrl=function(){return this.localConfig.configServerUrl?this.localConfig.configServerUrl:this.localConfig.serverZone===pu.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===pu.EU?"https://sr-client-cfg.eu.amplitude.com/config":"https://sr-client-cfg.amplitude.com/config"},e.prototype.completeRequest=function(e){var t=e.err,r=e.success;if(t)throw new Error(t);r&&this.localConfig.loggerProvider.log(r)},e}(),vu=function(e){var t=e.localConfig,r=e.configKeys;return n(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,new yu({localConfig:t,configKeys:r})]}))}))};function wu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bu(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?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(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Su={exports:{}},Cu=String,xu=function(){return{isColorSupported:!1,reset:Cu,bold:Cu,dim:Cu,italic:Cu,underline:Cu,inverse:Cu,hidden:Cu,strikethrough:Cu,black:Cu,red:Cu,green:Cu,yellow:Cu,blue:Cu,magenta:Cu,cyan:Cu,white:Cu,gray:Cu,bgBlack:Cu,bgRed:Cu,bgGreen:Cu,bgYellow:Cu,bgBlue:Cu,bgMagenta:Cu,bgCyan:Cu,bgWhite:Cu}};Su.exports=xu(),Su.exports.createColors=xu;var Iu=Su.exports;const ku=bu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ou=Iu,Eu=ku,Au=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Ou.isColorSupported),Eu&&e&&(t=Eu(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=Ou.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ru=Au;Au.default=Au;var Mu={};Mu.isClean=Symbol("isClean"),Mu.my=Symbol("my");const Pu={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Nu=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Pu[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Pu[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Tu=Nu;Nu.default=Nu;let Lu=Tu;function Du(e,t){new Lu(t).stringify(e)}var Fu=Du;Du.default=Du;let{isClean:_u,my:Bu}=Mu,Uu=Ru,ju=Tu,zu=Fu;function Wu(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>Wu(e,r))):("object"===o&&null!==n&&(n=Wu(n)),r[s]=n)}return r}let Vu=class{constructor(e={}){this.raws={},this[_u]=!1,this[Bu]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Wu(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Uu(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[_u]){this[_u]=!1;let e=this;for(;e=e.parent;)e[_u]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new ju).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=zu){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Gu=Vu;Vu.default=Vu;let Zu=Gu,Yu=class extends Zu{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Ju=Yu;Yu.default=Yu;var qu={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:Ku,SourceMapGenerator:Xu}=ku,{existsSync:Hu,readFileSync:$u}=ku,{dirname:Qu,join:eh}=ku;let th=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Qu(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Ku(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Qu(e),Hu(e))return this.mapFile=e,$u(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Ku)return Xu.fromSourceMap(t).toString();if(t instanceof Xu)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=eh(Qu(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var rh=th;th.default=th;let{SourceMapConsumer:sh,SourceMapGenerator:nh}=ku,{fileURLToPath:oh,pathToFileURL:ih}=ku,{isAbsolute:ah,resolve:lh}=ku,{nanoid:ch}=qu,uh=ku,hh=Ru,ph=rh,dh=Symbol("fromOffsetCache"),fh=Boolean(sh&&nh),mh=Boolean(lh&&ah),gh=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!mh||/^\w+:\/\//.test(t.from)||ah(t.from)?this.file=t.from:this.file=lh(t.from)),mh&&fh){let e=new ph(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+ch(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new hh(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new hh(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(ih&&(n.input.url=ih(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[dh])r=this[dh];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[dh]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:lh(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=ah(a.source)?ih(a.source):new URL(a.source,this.map.consumer().sourceRoot||ih(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!oh)throw new Error("file: protocol is not available in this PostCSS build");l.file=oh(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var yh=gh;gh.default=gh,uh&&uh.registerInput&&uh.registerInput(gh);let{SourceMapConsumer:vh,SourceMapGenerator:wh}=ku,{dirname:bh,relative:Sh,resolve:Ch,sep:xh}=ku,{pathToFileURL:Ih}=ku,kh=yh,Oh=Boolean(vh&&wh),Eh=Boolean(bh&&Ch&&Sh&&xh);var Ah=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||bh(e.file);!1===this.mapOpts.sourcesContent?(t=new vh(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Eh&&Oh&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=wh.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new wh({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 wh({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?bh(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=bh(Ch(r,this.mapOpts.annotation)));let s=Sh(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new kh(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ih){let t=Ih(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===xh&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Rh=Gu,Mh=class extends Rh{constructor(e){super(e),this.type="comment"}};var Ph=Mh;Mh.default=Mh;let Nh,Th,Lh,Dh,{isClean:Fh,my:_h}=Mu,Bh=Ju,Uh=Ph,jh=Gu;function zh(e){return e.map((e=>(e.nodes&&(e.nodes=zh(e.nodes)),delete e.source,e)))}function Wh(e){if(e[Fh]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Wh(t)}let Vh=class e extends jh{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=zh(Nh(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Bh(t)]}else if(t.selector)t=[new Th(t)];else if(t.name)t=[new Lh(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Uh(t)]}let s=t.map((t=>(t[_h]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Fh]&&Wh(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return s}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};Vh.registerParse=e=>{Nh=e},Vh.registerRule=e=>{Th=e},Vh.registerAtRule=e=>{Lh=e},Vh.registerRoot=e=>{Dh=e};var Gh=Vh;Vh.default=Vh,Vh.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Lh.prototype):"rule"===e.type?Object.setPrototypeOf(e,Th.prototype):"decl"===e.type?Object.setPrototypeOf(e,Bh.prototype):"comment"===e.type?Object.setPrototypeOf(e,Uh.prototype):"root"===e.type&&Object.setPrototypeOf(e,Dh.prototype),e[_h]=!0,e.nodes&&e.nodes.forEach((e=>{Vh.rebuild(e)}))};let Zh,Yh,Jh=Gh,qh=class extends Jh{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Zh(new Yh,this,e).stringify()}};qh.registerLazyResult=e=>{Zh=e},qh.registerProcessor=e=>{Yh=e};var Kh=qh;qh.default=qh;let Xh={};var Hh=function(e){Xh[e]||(Xh[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let $h=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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}};var Qh=$h;$h.default=$h;let ep=Qh,tp=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new ep(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var rp=tp;tp.default=tp;const sp="'".charCodeAt(0),np='"'.charCodeAt(0),op="\\".charCodeAt(0),ip="/".charCodeAt(0),ap="\n".charCodeAt(0),lp=" ".charCodeAt(0),cp="\f".charCodeAt(0),up="\t".charCodeAt(0),hp="\r".charCodeAt(0),pp="[".charCodeAt(0),dp="]".charCodeAt(0),fp="(".charCodeAt(0),mp=")".charCodeAt(0),gp="{".charCodeAt(0),yp="}".charCodeAt(0),vp=";".charCodeAt(0),wp="*".charCodeAt(0),bp=":".charCodeAt(0),Sp="@".charCodeAt(0),Cp=/[\t\n\f\r "#'()/;[\\\]{}]/g,xp=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ip=/.[\r\n"'(/\\]/,kp=/[\da-f]/i;let Op=Gh,Ep=class extends Op{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ap=Ep;Ep.default=Ep,Op.registerAtRule(Ep);let Rp,Mp,Pp=Gh,Np=class extends Pp{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Rp(new Mp,this,e).stringify()}};Np.registerLazyResult=e=>{Rp=e},Np.registerProcessor=e=>{Mp=e};var Tp=Np;Np.default=Np,Pp.registerRoot(Np);let Lp={comma:e=>Lp.split(e,[","],!0),space:e=>Lp.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Dp=Lp;Lp.default=Lp;let Fp=Gh,_p=Dp,Bp=class extends Fp{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return _p.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Up=Bp;Bp.default=Bp,Fp.registerRule(Bp);let jp=Ju,zp=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case ap:case lp:case up:case hp:case cp:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===lp||r===ap||r===up||r===hp||r===cp);h=["space",p.slice(m,s)],m=s-1;break;case pp:case dp:case gp:case yp:case bp:case vp:case mp:{let e=String.fromCharCode(r);h=[e,e,m];break}case fp:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==sp&&u!==np&&u!==lp&&u!==ap&&u!==up&&u!==cp&&u!==hp){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}v("bracket")}for(l=s;p.charCodeAt(l-1)===op;)l-=1,a=!a}while(a);h=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||Ip.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case sp:case np:n=r===sp?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}v("string")}for(l=s;p.charCodeAt(l-1)===op;)l-=1,a=!a}while(a);h=["string",p.slice(m,s+1),m,s],m=s;break;case Sp:Cp.lastIndex=m+1,Cp.test(p),s=0===Cp.lastIndex?p.length-1:Cp.lastIndex-2,h=["at-word",p.slice(m,s+1),m,s],m=s;break;case op:for(s=m,i=!0;p.charCodeAt(s+1)===op;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==ip&&r!==lp&&r!==ap&&r!==up&&r!==hp&&r!==cp&&(s+=1,kp.test(p.charAt(s)))){for(;kp.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===lp&&(s+=1)}h=["word",p.slice(m,s+1),m,s],m=s;break;default:r===ip&&p.charCodeAt(m+1)===wp?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:v("comment")),h=["comment",p.slice(m,s+1),m,s],m=s):(xp.lastIndex=m+1,xp.test(p),s=0===xp.lastIndex?p.length-1:xp.lastIndex-2,h=["word",p.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},Wp=Ph,Vp=Ap,Gp=Tp,Zp=Up;const Yp={empty:!0,space:!0};var Jp=class{constructor(e){this.input=e,this.root=new Gp,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new Vp;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new Wp;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=zp(this.input)}decl(e,t){let r=new jp;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}let a=e.some((e=>"space"!==e[0]&&"comment"!==e[0]));a&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Zp;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",Yp[a]||Yp[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Zp;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let qp=Gh,Kp=Jp,Xp=yh;function Hp(e,t){let r=new Xp(e,t),s=new Kp(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var $p=Hp;Hp.default=Hp,qp.registerParse(Hp);let{isClean:Qp,my:ed}=Mu,td=Ah,rd=Fu,sd=Gh,nd=Kh,od=Hh,id=rp,ad=$p,ld=Tp;const cd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ud={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},hd={Once:!0,postcssPlugin:!0,prepare:!0};function pd(e){return"object"==typeof e&&"function"==typeof e.then}function dd(e){let t=!1,r=cd[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function fd(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:dd(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function md(e){return e[Qp]=!1,e.nodes&&e.nodes.forEach((e=>md(e))),e}let gd={},yd=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof id)n=md(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=ad;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[ed]&&sd.rebuild(n)}else n=md(r);this.result=new id(t,n,s),this.helpers={...gd,postcss:gd,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!ud[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!hd[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(pd(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Qp];){e[Qp]=!0;let t=[fd(e)];for(;t.length>0;){let e=this.visitTick(t);if(pd(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return pd(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=rd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new td(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){if(pd(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Qp];)e[Qp]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||od("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(pd(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[Qp])return s[Qp]=!0,void e.push(fd(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Qp]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Qp]=!0;let t=dd(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[Qp]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};yd.registerPostcss=e=>{gd=e};var vd=yd;yd.default=yd,ld.registerLazyResult(yd),nd.registerLazyResult(yd);let wd=Ah,bd=Fu,Sd=Hh,Cd=$p;const xd=rp;let Id=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=bd;this.result=new xd(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new wd(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||Sd("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}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 e,t=Cd;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var kd=Id;Id.default=Id;let Od=kd,Ed=vd,Ad=Kh,Rd=Tp,Md=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Ed(this,e,t):new Od(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Pd=Md;Md.default=Md,Rd.registerProcessor(Md),Ad.registerProcessor(Md);let Nd=Ju,Td=rh,Ld=Ph,Dd=Ap,Fd=yh,_d=Tp,Bd=Up;function Ud(e,t){if(Array.isArray(e))return e.map((e=>Ud(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Fd.prototype};r.map&&(r.map={...r.map,__proto__:Td.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Ud(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new _d(s);if("decl"===s.type)return new Nd(s);if("rule"===s.type)return new Bd(s);if("comment"===s.type)return new Ld(s);if("atrule"===s.type)return new Dd(s);throw new Error("Unknown node type: "+e.type)}var jd=Ud;Ud.default=Ud;let zd=Ru,Wd=Ju,Vd=vd,Gd=Gh,Zd=Pd,Yd=Fu,Jd=jd,qd=Kh,Kd=Qh,Xd=Ph,Hd=Ap,$d=rp,Qd=yh,ef=$p,tf=Dp,rf=Up,sf=Tp,nf=Gu;function of(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Zd(e)}of.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Zd).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return of([n(r)]).process(e,t)},n},of.stringify=Yd,of.parse=ef,of.fromJSON=Jd,of.list=tf,of.comment=e=>new Xd(e),of.atRule=e=>new Hd(e),of.decl=e=>new Wd(e),of.rule=e=>new rf(e),of.root=e=>new sf(e),of.document=e=>new qd(e),of.CssSyntaxError=zd,of.Declaration=Wd,of.Container=Gd,of.Processor=Zd,of.Document=qd,of.Comment=Xd,of.Warning=Kd,of.AtRule=Hd,of.Result=$d,of.Input=Qd,of.Rule=rf,of.Root=sf,of.Node=nf,Vd.registerPostcss(of);var af=of;of.default=of;const lf=wu(af);lf.stringify,lf.fromJSON,lf.plugin,lf.parse,lf.list,lf.document,lf.comment,lf.atRule,lf.rule,lf.decl,lf.root,lf.CssSyntaxError,lf.Declaration,lf.Container,lf.Processor,lf.Document,lf.Comment,lf.Warning,lf.AtRule,lf.Result,lf.Input,lf.Rule,lf.Root,lf.Node;var cf="medium",uf=function(e,t,r){switch(t){case"light":if("input"!==e)return!0;var s=r?function(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}(r):"";return!!s&&(!!["password","hidden","email","tel"].includes(s)||!!r.autocomplete.startsWith("cc-"));case"medium":case"conservative":return!0;default:return uf(e,cf,r)}},hf=function(e,t){return function(r,s){return function(e,t,r){var s,n,o;if(void 0===t&&(t={defaultMaskLevel:cf}),r){if(r.closest("."+z))return!0;var i=(null!==(s=t.maskSelector)&&void 0!==s?s:[]).some((function(e){return r.closest(e)}));if(i)return!0;if(r.closest(".amp-unmask"))return!1;var a=(null!==(n=t.unmaskSelector)&&void 0!==n?n:[]).some((function(e){return r.closest(e)}));if(a)return!1}return uf(e,null!==(o=t.defaultMaskLevel)&&void 0!==o?o:cf,r)}(e,t,s)?r.replace(/[^\s]/g,"*"):r}},pf=function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r),t|=0}return t},df=function(e,t){return t||(e===A.STAGING?"https://api-sr.stag2.amplitude.com/sessions/v2/track":e===A.EU?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track")},ff=function(){return n(void 0,void 0,void 0,(function(){var e,t,r,s,n,i,a;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),(e=d())?[4,e.navigator.storage.estimate()]:[3,2];case 1:return t=o.sent(),r=t.usage,s=t.quota,n=t.usageDetails,i=r?Math.round(r/1024):0,a=r&&s?Math.round(1e3*(r/s+Number.EPSILON))/1e3:0,[2,{totalStorageSize:i,percentOfQuota:a,usageDetails:JSON.stringify(n)}];case 2:return[3,4];case 3:return o.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:""}]}}))}))},mf=function(e){var t=s({},e),r=t.apiKey;return t.apiKey="****".concat(r.substring(r.length-4)),t},gf=function(){function e(e,t){this.localConfig=t,this.remoteConfigFetch=e}return e.prototype.generateJoinedConfig=function(e){var t,r,l;return n(this,void 0,void 0,(function(){var n,c,u,h,p,d,f,m,g,y,v,w,b,S,C,x,I,k,O,E,A;return o(this,(function(o){switch(o.label){case 0:(n=s({},this.localConfig)).optOut=this.localConfig.optOut,n.captureEnabled=!0,o.label=1;case 1:return o.trys.push([1,6,,7]),[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_sampling_config",e)];case 2:return u=o.sent(),[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_privacy_config",e)];case 3:return h=o.sent(),p=n,[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_interaction_config",e)];case 4:return p.interactionConfig=o.sent(),d=n,[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_logging_config",e)];case 5:return d.loggingConfig=o.sent(),(u||h)&&(c={},u&&(c.sr_sampling_config=u),h&&(c.sr_privacy_config=h)),[3,7];case 6:return f=o.sent(),m=f,this.localConfig.loggerProvider.warn(m.message),n.captureEnabled=!1,[3,7];case 7:if(!c)return[2,n];if(g=c.sr_sampling_config,y=c.sr_privacy_config,g&&Object.keys(g).length>0?(Object.prototype.hasOwnProperty.call(g,"capture_enabled")?n.captureEnabled=g.capture_enabled:n.captureEnabled=!1,Object.prototype.hasOwnProperty.call(g,"sample_rate")&&(n.sampleRate=g.sample_rate)):(n.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),y){v=null!==(t=n.privacyConfig)&&void 0!==t?t:{},w={defaultMaskLevel:null!==(l=null!==(r=y.defaultMaskLevel)&&void 0!==r?r:v.defaultMaskLevel)&&void 0!==l?l:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[]},b=function(e){var t,r,s,n,o,a,l,c,u,h={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);try{for(var p=i(null!==(l=e.blockSelector)&&void 0!==l?l:[]),d=p.next();!d.done;d=p.next()){h[d.value]="block"}}catch(e){t={error:e}}finally{try{d&&!d.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}}try{for(var f=i(null!==(c=e.maskSelector)&&void 0!==c?c:[]),m=f.next();!m.done;m=f.next()){h[m.value]="mask"}}catch(e){s={error:e}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(s)throw s.error}}try{for(var g=i(null!==(u=e.unmaskSelector)&&void 0!==u?u:[]),y=g.next();!y.done;y=g.next()){h[y.value]="unmask"}}catch(e){o={error:e}}finally{try{y&&!y.done&&(a=g.return)&&a.call(g)}finally{if(o)throw o.error}}return h},S=s(s({},b(v)),b(y));try{for(C=i(Object.entries(S)),x=C.next();!x.done;x=C.next())I=a(x.value,2),k=I[0],"mask"===(O=I[1])?w.maskSelector.push(k):"block"===O?w.blockSelector.push(k):"unmask"===O&&w.unmaskSelector.push(k)}catch(e){E={error:e}}finally{try{x&&!x.done&&(A=C.return)&&A.call(C)}finally{if(E)throw E.error}}n.privacyConfig=function(e,t){var r=document.createDocumentFragment(),s=function(e){if(void 0===e&&(e=[]),"string"==typeof e&&(e=[e]),e=e.filter((function(e){try{r.querySelector(e)}catch(r){return t.warn('[session-replay-browser] omitting selector "'.concat(e,'" because it is invalid')),!1}return!0})),0!==e.length)return e};return e.blockSelector=s(e.blockSelector),e.maskSelector=s(e.maskSelector),e.unmaskSelector=s(e.unmaskSelector),e}(w,this.localConfig.loggerProvider)}return this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:mf(n)},null,2)),[2,n]}}))}))},e}(),yf=function(e,t){return n(void 0,void 0,void 0,(function(){var r,s;return o(this,(function(n){switch(n.label){case 0:return r=new Z(e,t),[4,vu({localConfig:r,configKeys:["sessionReplay"]})];case 1:return s=n.sent(),[2,new gf(s,r)]}}))}))},vf="Session replay event batch rejected due to exceeded retry count",wf="Failed to store session replay events in IndexedDB",bf="1.21.1",Sf=function(){function e(e){var t=e.trackServerUrl,r=e.loggerProvider,s=e.payloadBatcher;this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.loggerProvider=r,this.payloadBatcher=s||function(e){return e},this.trackServerUrl=t}return e.prototype.sendEventsList=function(e){this.addToQueue(s(s({},e),{attempts:0,timeout:0}))},e.prototype.addToQueue=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var s=t.filter((function(t){return t.attempts<(t.flushMaxRetries||0)?(t.attempts+=1,!0):(e.completeRequest({context:t,err:vf}),!1)}));s.forEach((function(t){e.queue=e.queue.concat(t),0!==t.timeout?setTimeout((function(){t.timeout=0,e.schedule(0)}),t.timeout):e.schedule(0)}))},e.prototype.schedule=function(e){var t=this;this.scheduled||(this.scheduled=setTimeout((function(){t.flush(!0).then((function(){t.queue.length>0&&t.schedule(e)}))}),e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),n(this,void 0,void 0,(function(){var t,r,s=this;return o(this,(function(n){switch(n.label){case 0:return t=[],r=[],this.queue.forEach((function(e){return 0===e.timeout?t.push(e):r.push(e)})),this.queue=r,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),[4,Promise.all(t.map((function(t){return s.send(t,e)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.send=function(e,t){var r,s;return void 0===t&&(t=!0),n(this,void 0,void 0,(function(){var n,i,a,l,c,u,h,p,f,m,g,y,v;return o(this,(function(o){switch(o.label){case 0:if(!(n=e.apiKey))return[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing api key"})];if(!(i=e.deviceId))return[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing device ID"})];if(w=d(),a=(null==w?void 0:w.location)?w.location.href:"",l=bf,c=e.sampleRate,u=new URLSearchParams({device_id:i,session_id:"".concat(e.sessionId),type:"".concat(e.type)}),h="".concat((null===(r=e.version)||void 0===r?void 0:r.type)||"standalone","/").concat((null===(s=e.version)||void 0===s?void 0:s.version)||l),0===(p=this.payloadBatcher({version:1,events:e.events})).events.length)return this.completeRequest({context:e}),[2];o.label=1;case 1:return o.trys.push([1,3,,4]),f={headers:{"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(n),"X-Client-Version":l,"X-Client-Library":h,"X-Client-Url":a.substring(0,1e3),"X-Client-Sample-Rate":"".concat(c)},body:JSON.stringify(p),method:"POST"},m="".concat(df(e.serverZone,this.trackServerUrl),"?").concat(u.toString()),[4,fetch(m,f)];case 2:if(null===(g=o.sent()))return this.completeRequest({context:e,err:"Unexpected error occurred"}),[2];if(t)this.handleReponse(g.status,e);else{y="";try{y=JSON.stringify(g.body,null,2)}catch(e){}this.completeRequest({context:e,success:"".concat(g.status,": ").concat(y)})}return[3,4];case 3:return v=o.sent(),this.completeRequest({context:e,err:v}),[3,4];case 4:return[2]}var w}))}))},e.prototype.handleReponse=function(e,t){switch((new L).buildStatus(e)){case c.Success:this.handleSuccessResponse(t);break;case c.Failed:this.handleOtherResponse(t);break;default:this.completeRequest({context:t,err:"Network error occurred, event batch rejected"})}},e.prototype.handleSuccessResponse=function(e){var t=Math.round(new Blob(e.events).size/1024);this.completeRequest({context:e,success:"Session replay event batch tracked successfully for session id ".concat(e.sessionId,", size of events: ").concat(t," KB")})},e.prototype.handleOtherResponse=function(e){this.addToQueue(s(s({},e),{timeout:e.attempts*this.retryTimeout}))},e.prototype.completeRequest=function(e){var t=e.context,r=e.err,s=e.success;t.onComplete(),r?this.loggerProvider.warn(r):s&&this.loggerProvider.log(s)},e}();const Cf=(e,t)=>t.some((t=>e instanceof t));let xf,If;const kf=new WeakMap,Of=new WeakMap,Ef=new WeakMap;let Af={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return kf.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Nf(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Rf(e){Af=e(Af)}function Mf(e){return(If||(If=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Tf(this),t),Nf(this.request)}:function(...t){return Nf(e.apply(Tf(this),t))}}function Pf(e){return"function"==typeof e?Mf(e):(e instanceof IDBTransaction&&function(e){if(kf.has(e))return;const t=new Promise(((t,r)=>{const s=()=>{e.removeEventListener("complete",n),e.removeEventListener("error",o),e.removeEventListener("abort",o)},n=()=>{t(),s()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),s()};e.addEventListener("complete",n),e.addEventListener("error",o),e.addEventListener("abort",o)}));kf.set(e,t)}(e),Cf(e,xf||(xf=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Af):e)}function Nf(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,r)=>{const s=()=>{e.removeEventListener("success",n),e.removeEventListener("error",o)},n=()=>{t(Nf(e.result)),s()},o=()=>{r(e.error),s()};e.addEventListener("success",n),e.addEventListener("error",o)}));return Ef.set(t,e),t}(e);if(Of.has(e))return Of.get(e);const t=Pf(e);return t!==e&&(Of.set(e,t),Ef.set(t,e)),t}const Tf=e=>Ef.get(e);function Lf(e,t,{blocked:r,upgrade:s,blocking:n,terminated:o}={}){const i=indexedDB.open(e,t),a=Nf(i);return s&&i.addEventListener("upgradeneeded",(e=>{s(Nf(i.result),e.oldVersion,e.newVersion,Nf(i.transaction),e)})),r&&i.addEventListener("blocked",(e=>r(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),n&&e.addEventListener("versionchange",(e=>n(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}const Df=["get","getKey","getAll","getAllKeys","count"],Ff=["put","add","delete","clear"],_f=new Map;function Bf(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(_f.get(t))return _f.get(t);const r=t.replace(/FromIndex$/,""),s=t!==r,n=Ff.includes(r);if(!(r in(s?IDBIndex:IDBObjectStore).prototype)||!n&&!Df.includes(r))return;const o=async function(e,...t){const o=this.transaction(e,n?"readwrite":"readonly");let i=o.store;return s&&(i=i.index(t.shift())),(await Promise.all([i[r](...t),n&&o.done]))[0]};return _f.set(t,o),o}Rf((e=>({...e,get:(t,r,s)=>Bf(t,r)||e.get(t,r,s),has:(t,r)=>!!Bf(t,r)||e.has(t,r)})));const Uf=["continue","continuePrimaryKey","advance"],jf={},zf=new WeakMap,Wf=new WeakMap,Vf={get(e,t){if(!Uf.includes(t))return e[t];let r=jf[t];return r||(r=jf[t]=function(...e){zf.set(this,Wf.get(this)[t](...e))}),r}};async function*Gf(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const r=new Proxy(t,Vf);for(Wf.set(r,t),Ef.set(r,Tf(t));t;)yield r,t=await(zf.get(r)||t.continue()),zf.delete(r)}function Zf(e,t){return t===Symbol.asyncIterator&&Cf(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&Cf(e,[IDBIndex,IDBObjectStore])}Rf((e=>({...e,get:(t,r,s)=>Zf(t,r)?Gf:e.get(t,r,s),has:(t,r)=>Zf(t,r)||e.has(t,r)})));var Yf,Jf=function(){function e(e){var t,r,s,n=this;this.minInterval=500,this.maxInterval=1e4,this.maxPersistedEventsSize=1e6,this.interval=this.minInterval,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=function(e,t){var r=new Blob([t]).size;return new Blob(e).size+r>=n.maxPersistedEventsSize||!!(Date.now()-n.timeAtLastSplit>n.interval&&e.length)&&(n.interval=Math.min(n.maxInterval,n.interval+n.minInterval),n._timeAtLastSplit=Date.now(),!0)},this.loggerProvider=e.loggerProvider,this.minInterval=null!==(t=e.minInterval)&&void 0!==t?t:this.minInterval,this.maxInterval=null!==(r=e.maxInterval)&&void 0!==r?r:this.maxInterval,this.maxPersistedEventsSize=null!==(s=e.maxPersistedEventsSize)&&void 0!==s?s:this.maxPersistedEventsSize}return Object.defineProperty(e.prototype,"timeAtLastSplit",{get:function(){return this._timeAtLastSplit},enumerable:!1,configurable:!0}),e}();!function(e){e.RECORDING="recording",e.SENT="sent"}(Yf||(Yf={}));var qf,Kf,Xf,Hf="sessionCurrentSequence",$f="sequencesToSend",Qf=function(){var e=d();return new Promise((function(t,r){if(!e)return r(new Error("Global scope not found"));if(!e.indexedDB)return r(new Error("Session Replay: cannot find indexedDB"));try{var s=e.indexedDB.open("keyval-store");s.onupgradeneeded=function(){1===s.result.version&&(s.result.close(),s.transaction&&s.transaction.abort(),e.indexedDB.deleteDatabase("keyval-store"),t())},s.onsuccess=function(){t(s.result)}}catch(e){r(e)}}))},em=function(e){return n(void 0,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return e.length>0?(10,t=e.splice(0,10),[4,Promise.all(t)]):[3,2];case 1:return r.sent(),[3,0];case 2:return[2]}}))}))},tm=function(e){var t,r;return e.objectStoreNames.contains(Hf)||(r=e.createObjectStore(Hf,{keyPath:"sessionId"})),e.objectStoreNames.contains($f)||(t=e.createObjectStore($f,{keyPath:"sequenceId",autoIncrement:!0})).createIndex("sessionId","sessionId"),{sequencesStore:t,currentSequenceStore:r}},rm=function(e){return n(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,Lf(e,1,{upgrade:tm})];case 1:return[2,t.sent()]}}))}))},sm=function(e){function t(t){var r=e.call(this,t)||this;return r.getSequencesToSend=function(){return n(r,void 0,void 0,(function(){var e,t,r,s,n,i;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,5,,6]),e=[],[4,this.db.transaction("sequencesToSend").store.openCursor()];case 1:t=o.sent(),o.label=2;case 2:return t?(r=t.value,s=r.sessionId,n=r.events,e.push({events:n,sequenceId:t.key,sessionId:s}),[4,t.continue()]):[3,4];case 3:return t=o.sent(),[3,2];case 4:return[2,e];case 5:return i=o.sent(),this.loggerProvider.warn("".concat(wf,": ").concat(i)),[3,6];case 6:return[2,void 0]}}))}))},r.storeCurrentSequence=function(e){return n(r,void 0,void 0,(function(){var t,r,n;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,4,,5]),[4,this.db.get(Hf,e)];case 1:return(t=o.sent())?[4,this.db.put($f,{sessionId:e,events:t.events})]:[2,void 0];case 2:return r=o.sent(),[4,this.db.put(Hf,{sessionId:e,events:[]})];case 3:return o.sent(),[2,s(s({},t),{sessionId:e,sequenceId:r})];case 4:return n=o.sent(),this.loggerProvider.warn("".concat(wf,": ").concat(n)),[3,5];case 5:return[2,void 0]}}))}))},r.addEventToCurrentSequence=function(e,t){return n(r,void 0,void 0,(function(){var r,s,n,i,a,l;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,10,,11]),[4,(r=this.db.transaction(Hf,"readwrite")).store.get(e)];case 1:return(s=o.sent())?[3,3]:[4,r.store.put({sessionId:e,events:[t]})];case 2:return o.sent(),[2];case 3:return n=void 0,this.shouldSplitEventsList(s.events,t)?(n=s.events,[4,r.store.put({sessionId:e,events:[t]})]):[3,5];case 4:return o.sent(),[3,7];case 5:return i=s.events.concat(t),[4,r.store.put({sessionId:e,events:i})];case 6:o.sent(),o.label=7;case 7:return[4,r.done];case 8:return o.sent(),n?[4,this.storeSendingEvents(e,n)]:[2,void 0];case 9:return(a=o.sent())?[2,{events:n,sessionId:e,sequenceId:a}]:[2,void 0];case 10:return l=o.sent(),this.loggerProvider.warn("".concat(wf,": ").concat(l)),[3,11];case 11:return[2,void 0]}}))}))},r.storeSendingEvents=function(e,t){return n(r,void 0,void 0,(function(){var r;return o(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.db.put($f,{sessionId:e,events:t})];case 1:return[2,s.sent()];case 2:return r=s.sent(),this.loggerProvider.warn("".concat(wf,": ").concat(r)),[3,3];case 3:return[2,void 0]}}))}))},r.cleanUpSessionEventsStore=function(e,t){return n(r,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:if(!t)return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.db.delete($f,t)];case 2:return r.sent(),[3,4];case 3:return e=r.sent(),this.loggerProvider.warn("".concat(wf,": ").concat(e)),[3,4];case 4:return[2]}}))}))},r.transitionFromKeyValStore=function(e){return n(r,void 0,void 0,(function(){var t,r,s,i,a,l,c,h,p=this;return o(this,(function(f){switch(f.label){case 0:return f.trys.push([0,6,,7]),[4,Qf()];case 1:if(!(t=f.sent()))return[2];r=function(e,t){return n(p,void 0,void 0,(function(){var r,s,i=this;return o(this,(function(a){switch(a.label){case 0:return r=t.sessionSequences,s=[],Object.keys(r).forEach((function(a){var l=parseInt(a,10),c=r[l];if(l===t.currentSequenceId){var u=c.events.map((function(t){return n(i,void 0,void 0,(function(){return o(this,(function(r){return[2,this.addEventToCurrentSequence(e,t)]}))}))}));s.concat(u)}else c.status!==Yf.SENT&&s.push(i.storeSendingEvents(e,c.events))})),[4,em(s)];case 1:return a.sent(),[2]}}))}))},s="".concat(u,"_").concat(this.apiKey.substring(0,10)),f.label=2;case 2:return f.trys.push([2,4,,5]),i=t.transaction("keyval").objectStore("keyval").getAll(s),a=new Promise((function(t){i.onsuccess=function(s){return n(p,void 0,void 0,(function(){var n,i,a,l=this;return o(this,(function(o){switch(o.label){case 0:return n=s&&s.target.result,(i=n&&n[0])?(a=[],Object.keys(i).forEach((function(t){var s=parseInt(t,10),n=i[s];if(e===s)a.push(r(s,n));else{var o=n.sessionSequences;Object.keys(o).forEach((function(e){var t=parseInt(e,10);o[t].status!==Yf.SENT&&a.push(l.storeSendingEvents(s,o[t].events))}))}})),[4,em(a)]):[3,2];case 1:o.sent(),o.label=2;case 2:return t(),[2]}}))}))}})),[4,a];case 3:return f.sent(),(l=d())&&l.indexedDB.deleteDatabase("keyval-store"),[3,5];case 4:return c=f.sent(),this.loggerProvider.warn("Failed to transition session replay events from keyval to new store: ".concat(c)),[3,5];case 5:return[3,7];case 6:return h=f.sent(),this.loggerProvider.warn("Failed to access keyval store: ".concat(h,". For more information, visit: https://www.docs.developers.amplitude.com/session-replay/sdks/standalone/#indexeddb-best-practices")),[3,7];case 7:return[2]}}))}))},r.apiKey=t.apiKey,r.db=t.db,r}return r(t,e),t.new=function(e,r,i){return n(this,void 0,void 0,(function(){var n,a,l,c,u;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),n="replay"===e?"":"_".concat(e),a="".concat(r.apiKey.substring(0,10),"_amp_session_replay_events").concat(n),[4,rm(a)];case 1:return l=o.sent(),[4,(c=new t(s(s({},r),{db:l}))).transitionFromKeyValStore(i)];case 2:return o.sent(),[2,c];case 3:return u=o.sent(),r.loggerProvider.warn("".concat(wf,": ").concat(u)),[3,4];case 4:return[2]}}))}))},t.prototype.getCurrentSequenceEvents=function(e){return n(this,void 0,void 0,(function(){var t,r,s,n,a,l,c;return o(this,(function(o){switch(o.label){case 0:return e?[4,this.db.get("sessionCurrentSequence",e)]:[3,2];case 1:return(n=o.sent())?[2,[n]]:[2,void 0];case 2:t=[],o.label=3;case 3:return o.trys.push([3,8,9,10]),[4,this.db.getAll("sessionCurrentSequence")];case 4:r=i.apply(void 0,[o.sent()]),s=r.next(),o.label=5;case 5:if(s.done)return[3,7];n=s.value,t.push(n),o.label=6;case 6:return s=r.next(),[3,5];case 7:return[3,10];case 8:return a=o.sent(),l={error:a},[3,10];case 9:try{s&&!s.done&&(c=r.return)&&c.call(r)}finally{if(l)throw l.error}return[7];case 10:return[2,t]}}))}))},t}(Jf),nm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.finalizedSequences={},t.sequences={},t.sequenceId=0,t}return r(t,e),t.prototype.resetCurrentSequence=function(e){this.sequences[e]=[]},t.prototype.addSequence=function(e){var t=this.sequenceId++,r=l([],a(this.sequences[e]),!1);return this.finalizedSequences[t]={sessionId:e,events:r},this.resetCurrentSequence(e),{sequenceId:t,events:r,sessionId:e}},t.prototype.getSequencesToSend=function(){return n(this,void 0,void 0,(function(){return o(this,(function(e){return[2,Object.entries(this.finalizedSequences).map((function(e){var t=a(e,2),r=t[0],s=t[1],n=s.sessionId,o=s.events;return{sequenceId:Number(r),sessionId:n,events:o}}))]}))}))},t.prototype.storeCurrentSequence=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){return this.sequences[e]?[2,this.addSequence(e)]:[2,void 0]}))}))},t.prototype.addEventToCurrentSequence=function(e,t){return n(this,void 0,void 0,(function(){var r;return o(this,(function(s){return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(r=this.addSequence(e)),this.sequences[e].push(t),[2,r]}))}))},t.prototype.storeSendingEvents=function(e,t){return n(this,void 0,void 0,(function(){return o(this,(function(r){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},[2,this.sequenceId++]}))}))},t.prototype.cleanUpSessionEventsStore=function(e,t){return n(this,void 0,void 0,(function(){return o(this,(function(e){return void 0!==t&&delete this.finalizedSequences[t],[2]}))}))},t}(Jf),om=function(e){var t=e.config,r=e.sessionId,i=e.minInterval,a=e.maxInterval,l=e.type,c=e.payloadBatcher,u=e.storeType;return n(void 0,void 0,void 0,(function(){function e(e){return void 0===e&&(e=!1),n(this,void 0,void 0,(function(){return o(this,(function(t){return[2,h.flush(e)]}))}))}var h,p,d,f,m,g,y,v,w;return o(this,(function(b){switch(b.label){case 0:return h=new Sf(s(s({},t),{loggerProvider:t.loggerProvider,payloadBatcher:c})),p=function(){return new nm({loggerProvider:t.loggerProvider,maxInterval:a,minInterval:i})},d=function(){return n(void 0,void 0,void 0,(function(){var e;return o(this,(function(s){switch(s.label){case 0:return[4,sm.new(l,{loggerProvider:t.loggerProvider,minInterval:i,maxInterval:a,apiKey:t.apiKey},r)];case 1:return e=s.sent(),t.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),[2,null!=e?e:p()]}}))}))},"idb"!==u?[3,2]:[4,d()];case 1:return m=b.sent(),[3,3];case 2:m=p(),b.label=3;case 3:return f=m,g=function(e){var r=e.events,s=e.sessionId,i=e.deviceId,a=e.sequenceId;t.debugMode&&ff().then((function(e){var r=e.totalStorageSize,s=e.percentOfQuota,n=e.usageDetails;t.loggerProvider.debug("Total storage size: ".concat(r," KB, percentage of quota: ").concat(s,"%, usage details: ").concat(n))})).catch((function(){})),h.sendEventsList({events:r,sessionId:s,flushMaxRetries:t.flushMaxRetries,apiKey:t.apiKey,deviceId:i,sampleRate:t.sampleRate,serverZone:t.serverZone,version:t.version,type:l,onComplete:function(){return n(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,f.cleanUpSessionEventsStore(s,a)];case 1:return e.sent(),[2]}}))}))}})},y=function(e){var r=e.sessionId,s=e.deviceId;f.storeCurrentSequence(r).then((function(e){e&&g({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:s})})).catch((function(e){t.loggerProvider.warn("Failed to get current sequence of session replay events for session:",e)}))},v=function(e){var t=e.deviceId;return n(void 0,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,f.getSequencesToSend()];case 1:return(e=r.sent())&&e.forEach((function(e){g({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:t})})),[2]}}))}))},w=function(e){var r=e.event,s=e.sessionId,n=e.deviceId;f.addEventToCurrentSequence(s,r.data).then((function(e){return e&&g({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:n})})).catch((function(e){t.loggerProvider.warn("Failed to add event to session replay capture:",e)}))},[2,{sendCurrentSequenceEvents:y,addEvent:w,sendStoredEvents:v,flush:e}]}}))}))},im=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=new Map;e.forEach((function(e){r.set(e.name,e.manager)})),this.managers=r}return e.prototype.sendStoredEvents=function(e){return n(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return t=[],this.managers.forEach((function(r){t.push(r.sendStoredEvents(e))})),[4,Promise.all(t)];case 1:return r.sent(),[2]}}))}))},e.prototype.addEvent=function(e){var t,r=e.sessionId,s=e.event,n=e.deviceId;null===(t=this.managers.get(s.type))||void 0===t||t.addEvent({sessionId:r,event:s,deviceId:n})},e.prototype.sendCurrentSequenceEvents=function(e){var t=e.sessionId,r=e.deviceId;this.managers.forEach((function(e){e.sendCurrentSequenceEvents({sessionId:t,deviceId:r})}))},e.prototype.flush=function(e){return n(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return t=[],this.managers.forEach((function(r){t.push(r.flush(e))})),[4,Promise.all(t)];case 1:return r.sent(),[2]}}))}))},e}(),am=(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))(am||{});function lm(e,t){if(Xf=new Date,e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var r={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};qf=s(s({},r),t),Kf=function(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return e;if(e===t.root)return e.ownerDocument;return e}(qf.root,r);var n=cm(e,"all",(function(){return cm(e,"two",(function(){return cm(e,"one",(function(){return cm(e,"none")}))}))}));if(n){var o=wm(bm(n,e));return o.length>0&&(n=o[0]),hm(n)}throw new Error("Selector was not found.")}function cm(e,t,r){for(var s=null,n=[],o=e,c=0,u=function(){var e,u,h=(new Date).getTime()-Xf.getTime();if(void 0!==qf.timeoutMs&&h>qf.timeoutMs)throw new Error("Timeout: Can't find a unique selector after ".concat(h,"ms"));var p=gm(function(e){var t=e.getAttribute("id");if(t&&qf.idName(t))return{name:"#"+CSS.escape(t),penalty:0};return null}(o))||gm.apply(void 0,l([],a(function(e){var t=Array.from(e.attributes).filter((function(e){return qf.attr(e.name,e.value)}));return t.map((function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}}))}(o)),!1))||gm.apply(void 0,l([],a(function(e){var t=Array.from(e.classList).filter(qf.className);return t.map((function(e){return{name:"."+CSS.escape(e),penalty:1}}))}(o)),!1))||gm(function(e){var t=e.tagName.toLowerCase();if(qf.tagName(t))return{name:t,penalty:2};return null}(o))||[{name:"*",penalty:3}],d=function(e){var t=e.parentNode;if(!t)return null;var r=t.firstChild;if(!r)return null;var s=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&s++,r!==e);)r=r.nextSibling;return s}(o);if("all"==t)d&&(p=p.concat(p.filter(mm).map((function(e){return fm(e,d)}))));else if("two"==t)p=p.slice(0,1),d&&(p=p.concat(p.filter(mm).map((function(e){return fm(e,d)}))));else if("one"==t){var f=a(p=p.slice(0,1),1)[0];d&&mm(f)&&(p=[fm(f,d)])}else"none"==t&&(p=[{name:"*",penalty:3}],d&&(p=[fm(p[0],d)]));try{for(var m=(e=void 0,i(p)),g=m.next();!g.done;g=m.next()){(f=g.value).level=c}}catch(t){e={error:t}}finally{try{g&&!g.done&&(u=m.return)&&u.call(m)}finally{if(e)throw e.error}}if(n.push(p),n.length>=qf.seedMinLength&&(s=um(n,r)))return"break";o=o.parentElement,c++};o;){if("break"===u())break}return s||(s=um(n,r)),!s&&r?r():s}function um(e,t){var r,s,n=wm(vm(e));if(n.length>qf.threshold)return t?t():null;try{for(var o=i(n),a=o.next();!a.done;a=o.next()){var l=a.value;if(dm(l))return l}}catch(e){r={error:e}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}return null}function hm(e){for(var t=e[0],r=t.name,s=1;s<e.length;s++){var n=e[s].level||0;r=t.level===n-1?"".concat(e[s].name," > ").concat(r):"".concat(e[s].name," ").concat(r),t=e[s]}return r}function pm(e){return e.map((function(e){return e.penalty})).reduce((function(e,t){return e+t}),0)}function dm(e){var t=hm(e);switch(Kf.querySelectorAll(t).length){case 0:throw new Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}}function fm(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function mm(e){return"html"!==e.name&&!e.name.startsWith("#")}function gm(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.filter(ym);return r.length>0?r:null}function ym(e){return null!=e}function vm(e,t){var r,s,n,a,l,c;return void 0===t&&(t=[]),o(this,(function(o){switch(o.label){case 0:if(!(e.length>0))return[3,9];o.label=1;case 1:o.trys.push([1,6,7,8]),r=i(e[0]),s=r.next(),o.label=2;case 2:return s.done?[3,5]:(n=s.value,[5,i(vm(e.slice(1,e.length),t.concat(n)))]);case 3:o.sent(),o.label=4;case 4:return s=r.next(),[3,2];case 5:return[3,8];case 6:return a=o.sent(),l={error:a},[3,8];case 7:try{s&&!s.done&&(c=r.return)&&c.call(r)}finally{if(l)throw l.error}return[7];case 8:return[3,11];case 9:return[4,t];case 10:o.sent(),o.label=11;case 11:return[2]}}))}function wm(e){return l([],a(e),!1).sort((function(e,t){return pm(e)-pm(t)}))}function bm(e,t,r){var s,n,c;return void 0===r&&(r={counter:0,visited:new Map}),o(this,(function(o){switch(o.label){case 0:if(!(e.length>2&&e.length>qf.optimizedMinLength))return[3,5];s=1,o.label=1;case 1:return s<e.length-1?r.counter>qf.maxNumberOfTries?[2]:(r.counter+=1,(n=l([],a(e),!1)).splice(s,1),c=hm(n),r.visited.has(c)?[2]:dm(n)&&function(e,t){return Kf.querySelector(hm(e))===t}(n,t)?[4,n]:[3,4]):[3,5];case 2:return o.sent(),r.visited.set(c,!0),[5,i(bm(n,t,r))];case 3:o.sent(),o.label=4;case 4:return s++,[3,1];case 5:return[2]}}))}var Sm=function(e){var t=e.version,r=e.events,s=[];return r.forEach((function(e){var t=JSON.parse(e);t.count=1,"click"===t.type&&s.push(t)})),{version:t,events:s}},Cm=function(e){var t=e.version,r=e.events,n=[];r.forEach((function(e){var t=JSON.parse(e);"click"===t.type&&n.push(t)}));var o=n.reduce((function(e,t){var r=t.x,n=t.y,o=t.selector,i=t.timestamp,a=i-i%36e5,l="".concat(r,":").concat(n,":").concat(null!=o?o:"",":").concat(a);return e[l]?e[l].count+=1:e[l]=s(s({},t),{timestamp:a,count:1}),e}),{});return{version:t,events:Object.values(o)}},xm=function(e,t){var r=t.eventsManager,s=t.sessionId,n=t.deviceIdFn;return function(t){if(t.type===am.Click){var o=d();if(o){var i=o.location,a=o.innerHeight,l=o.innerWidth;if(i){var c=t.x,u=t.y;if(void 0!==c&&void 0!==u){var h,p=cu.mirror.getNode(t.id);if(p)try{h=lm(p)}catch(t){e.debug("error resolving selector from finder")}var f=ic.getWindowScroll(o),m={x:c+f.left,y:u+f.top,selector:h,viewportHeight:a,viewportWidth:l,pageUrl:i.href,timestamp:Date.now(),type:"click"},g=n();g&&r.addEvent({sessionId:s,event:{type:"interaction",data:JSON.stringify(m)},deviceId:g})}}}}}},Im=function(){function e(e,t){var r=d();r&&r.navigator&&"function"==typeof r.navigator.sendBeacon?this.sendBeacon=function(e,t){try{if(r.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(e,t){var r=new XMLHttpRequest;return r.open("POST",e,!0),r.setRequestHeader("Accept","*/*"),r.send(JSON.stringify(t)),!0},this.basePageUrl=df(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e}return e.prototype.send=function(e,t){var r=this.context,s=r.sessionId,n=r.type,o=new URLSearchParams({device_id:e,session_id:String(s),type:String(n),api_key:this.apiKey}),i="".concat(this.basePageUrl,"?").concat(o.toString());this.sendBeacon(i,t)||this.sendXhr(i,t)},e}(),km=ic.getWindowHeight,Om=ic.getWindowWidth,Em=function(){function e(e){var t=this;this.timestamp=Date.now(),this.hook=function(e){t.update(e)},this.send=function(e){return function(r){var s=e(),n=d();n&&s&&t.transport.send(s,{version:1,events:[{maxScrollX:t._maxScrollX,maxScrollY:t._maxScrollY,maxScrollWidth:t._maxScrollWidth,maxScrollHeight:t._maxScrollHeight,viewportHeight:km(),viewportWidth:Om(),pageUrl:n.location.href,timestamp:t.timestamp,type:"scroll"}]})}},this._maxScrollX=0,this._maxScrollY=0,this._maxScrollWidth=Om(),this._maxScrollHeight=km(),this.transport=e}return e.default=function(t,r){return new e(new Im(t,r))},Object.defineProperty(e.prototype,"maxScrollX",{get:function(){return this._maxScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollY",{get:function(){return this._maxScrollY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollWidth",{get:function(){return this._maxScrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollHeight",{get:function(){return this._maxScrollHeight},enumerable:!1,configurable:!0}),e.prototype.update=function(e){var t=Date.now();if(e.x>this._maxScrollX){var r=Om();this._maxScrollX=e.x;var s=e.x+r;s>this._maxScrollWidth&&(this._maxScrollWidth=s),this.timestamp=t}if(e.y>this._maxScrollY){var n=km();this._maxScrollY=e.y;var o=e.y+n;o>this._maxScrollHeight&&(this._maxScrollHeight=o),this.timestamp=t}},e}(),Am=function(e){var t=e.sessionId,r=e.deviceId;this.deviceId=r,this.sessionId=t,t&&r&&(this.sessionReplayId=function(e,t){return"".concat(t,"/").concat(e)}(t,r))},Rm=Uint8Array,Mm=Uint16Array,Pm=Uint32Array,Nm=new Rm([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]),Tm=new Rm([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]),Lm=new Rm([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Dm=function(e,t){for(var r=new Mm(31),s=0;s<31;++s)r[s]=t+=1<<e[s-1];var n=new Pm(r[30]);for(s=1;s<30;++s)for(var o=r[s];o<r[s+1];++o)n[o]=o-r[s]<<5|s;return[r,n]},Fm=Dm(Nm,2),_m=Fm[0],Bm=Fm[1];_m[28]=258,Bm[258]=28;for(var Um=Dm(Tm,0)[1],jm=new Mm(32768),zm=0;zm<32768;++zm){var Wm=(43690&zm)>>>1|(21845&zm)<<1;Wm=(61680&(Wm=(52428&Wm)>>>2|(13107&Wm)<<2))>>>4|(3855&Wm)<<4,jm[zm]=((65280&Wm)>>>8|(255&Wm)<<8)>>>1}var Vm=function(e,t,r){for(var s=e.length,n=0,o=new Mm(t);n<s;++n)++o[e[n]-1];var i,a=new Mm(t);for(n=0;n<t;++n)a[n]=a[n-1]+o[n-1]<<1;if(r){i=new Mm(1<<t);var l=15-t;for(n=0;n<s;++n)if(e[n])for(var c=n<<4|e[n],u=t-e[n],h=a[e[n]-1]++<<u,p=h|(1<<u)-1;h<=p;++h)i[jm[h]>>>l]=c}else for(i=new Mm(s),n=0;n<s;++n)i[n]=jm[a[e[n]-1]++]>>>15-e[n];return i},Gm=new Rm(288);for(zm=0;zm<144;++zm)Gm[zm]=8;for(zm=144;zm<256;++zm)Gm[zm]=9;for(zm=256;zm<280;++zm)Gm[zm]=7;for(zm=280;zm<288;++zm)Gm[zm]=8;var Zm=new Rm(32);for(zm=0;zm<32;++zm)Zm[zm]=5;var Ym=Vm(Gm,9,0),Jm=Vm(Zm,5,0),qm=function(e){return(e/8>>0)+(7&e&&1)},Km=function(e,t,r){(null==r||r>e.length)&&(r=e.length);var s=new(e instanceof Mm?Mm:e instanceof Pm?Pm:Rm)(r-t);return s.set(e.subarray(t,r)),s},Xm=function(e,t,r){r<<=7&t;var s=t/8>>0;e[s]|=r,e[s+1]|=r>>>8},Hm=function(e,t,r){r<<=7&t;var s=t/8>>0;e[s]|=r,e[s+1]|=r>>>8,e[s+2]|=r>>>16},$m=function(e,t){for(var r=[],s=0;s<e.length;++s)e[s]&&r.push({s:s,f:e[s]});var n=r.length,o=r.slice();if(!n)return[new Rm(0),0];if(1==n){var i=new Rm(r[0].s+1);return i[r[0].s]=1,[i,1]}r.sort((function(e,t){return e.f-t.f})),r.push({s:-1,f:25001});var a=r[0],l=r[1],c=0,u=1,h=2;for(r[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=n-1;)a=r[r[c].f<r[h].f?c++:h++],l=r[c!=u&&r[c].f<r[h].f?c++:h++],r[u++]={s:-1,f:a.f+l.f,l:a,r:l};var p=o[0].s;for(s=1;s<n;++s)o[s].s>p&&(p=o[s].s);var d=new Mm(p+1),f=Qm(r[u-1],d,0);if(f>t){s=0;var m=0,g=f-t,y=1<<g;for(o.sort((function(e,t){return d[t.s]-d[e.s]||e.f-t.f}));s<n;++s){var v=o[s].s;if(!(d[v]>t))break;m+=y-(1<<f-d[v]),d[v]=t}for(m>>>=g;m>0;){var w=o[s].s;d[w]<t?m-=1<<t-d[w]++-1:++s}for(;s>=0&&m;--s){var b=o[s].s;d[b]==t&&(--d[b],++m)}f=t}return[new Rm(d),f]},Qm=function(e,t,r){return-1==e.s?Math.max(Qm(e.l,t,r+1),Qm(e.r,t,r+1)):t[e.s]=r},eg=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Mm(++t),s=0,n=e[0],o=1,i=function(e){r[s++]=e},a=1;a<=t;++a)if(e[a]==n&&a!=t)++o;else{if(!n&&o>2){for(;o>138;o-=138)i(32754);o>2&&(i(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(i(n),--o;o>6;o-=6)i(8304);o>2&&(i(o-3<<5|8208),o=0)}for(;o--;)i(n);o=1,n=e[a]}return[r.subarray(0,s),t]},tg=function(e,t){for(var r=0,s=0;s<t.length;++s)r+=e[s]*t[s];return r},rg=function(e,t,r){var s=r.length,n=qm(t+2);e[n]=255&s,e[n+1]=s>>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var o=0;o<s;++o)e[n+o+4]=r[o];return 8*(n+4+s)},sg=function(e,t,r,s,n,o,i,a,l,c,u){Xm(t,u++,r),++n[256];for(var h=$m(n,15),p=h[0],d=h[1],f=$m(o,15),m=f[0],g=f[1],y=eg(p),v=y[0],w=y[1],b=eg(m),S=b[0],C=b[1],x=new Mm(19),I=0;I<v.length;++I)x[31&v[I]]++;for(I=0;I<S.length;++I)x[31&S[I]]++;for(var k=$m(x,7),O=k[0],E=k[1],A=19;A>4&&!O[Lm[A-1]];--A);var R,M,P,N,T=c+5<<3,L=tg(n,Gm)+tg(o,Zm)+i,D=tg(n,p)+tg(o,m)+i+14+3*A+tg(x,O)+(2*x[16]+3*x[17]+7*x[18]);if(T<=L&&T<=D)return rg(t,u,e.subarray(l,l+c));if(Xm(t,u,1+(D<L)),u+=2,D<L){R=Vm(p,d,0),M=p,P=Vm(m,g,0),N=m;var F=Vm(O,E,0);Xm(t,u,w-257),Xm(t,u+5,C-1),Xm(t,u+10,A-4),u+=14;for(I=0;I<A;++I)Xm(t,u+3*I,O[Lm[I]]);u+=3*A;for(var _=[v,S],B=0;B<2;++B){var U=_[B];for(I=0;I<U.length;++I){var j=31&U[I];Xm(t,u,F[j]),u+=O[j],j>15&&(Xm(t,u,U[I]>>>5&127),u+=U[I]>>>12)}}}else R=Ym,M=Gm,P=Jm,N=Zm;for(I=0;I<a;++I)if(s[I]>255){j=s[I]>>>18&31;Hm(t,u,R[j+257]),u+=M[j+257],j>7&&(Xm(t,u,s[I]>>>23&31),u+=Nm[j]);var z=31&s[I];Hm(t,u,P[z]),u+=N[z],z>3&&(Hm(t,u,s[I]>>>5&8191),u+=Tm[z])}else Hm(t,u,R[s[I]]),u+=M[s[I]];return Hm(t,u,R[256]),u+M[256]},ng=new Pm([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),og=function(e,t,r,s,n){return function(e,t,r,s,n,o){var i=e.length,a=new Rm(s+i+5*(1+Math.floor(i/7e3))+n),l=a.subarray(s,a.length-n),c=0;if(!t||i<8)for(var u=0;u<=i;u+=65535){var h=u+65535;h<i?c=rg(l,c,e.subarray(u,h)):(l[u]=o,c=rg(l,c,e.subarray(u,i)))}else{for(var p=ng[t-1],d=p>>>13,f=8191&p,m=(1<<r)-1,g=new Mm(32768),y=new Mm(m+1),v=Math.ceil(r/3),w=2*v,b=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<w)&m},S=new Pm(25e3),C=new Mm(288),x=new Mm(32),I=0,k=0,O=(u=0,0),E=0,A=0;u<i;++u){var R=b(u),M=32767&u,P=y[R];if(g[M]=P,y[R]=M,E<=u){var N=i-u;if((I>7e3||O>24576)&&N>423){c=sg(e,l,0,S,C,x,k,O,A,u-A,c),O=I=k=0,A=u;for(var T=0;T<286;++T)C[T]=0;for(T=0;T<30;++T)x[T]=0}var L=2,D=0,F=f,_=M-P&32767;if(N>2&&R==b(u-_))for(var B=Math.min(d,N)-1,U=Math.min(32767,u),j=Math.min(258,N);_<=U&&--F&&M!=P;){if(e[u+L]==e[u+L-_]){for(var z=0;z<j&&e[u+z]==e[u+z-_];++z);if(z>L){if(L=z,D=_,z>B)break;var W=Math.min(_,z-2),V=0;for(T=0;T<W;++T){var G=u-_+T+32768&32767,Z=G-g[G]+32768&32767;Z>V&&(V=Z,P=G)}}}_+=(M=P)-(P=g[M])+32768&32767}if(D){S[O++]=268435456|Bm[L]<<18|Um[D];var Y=31&Bm[L],J=31&Um[D];k+=Nm[Y]+Tm[J],++C[257+Y],++x[J],E=u+L,++I}else S[O++]=e[u],++C[e[u]]}}c=sg(e,l,o,S,C,x,k,O,A,u-A,c)}return Km(a,0,s+qm(c)+n)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,s,!n)};function ig(e,t){void 0===t&&(t={});var r=function(){var e=1,t=0;return{p:function(r){for(var s=e,n=t,o=r.length,i=0;i!=o;){for(var a=Math.min(i+5552,o);i<a;++i)n+=s+=r[i];s%=65521,n%=65521}e=s,t=n},d:function(){return(e>>>8<<16|(255&t)<<8|t>>>8)+2*((255&e)<<23)}}}();r.p(e);var s,n,o,i=og(e,t,2,4);return s=i,n=t.level,o=0==n?0:n<6?1:9==n?3:2,s[0]=120,s[1]=o<<6|(o?32-2*o:1),function(e,t,r){for(;r;++t)e[t]=r,r>>>=8}(i,i.length-4,r.d()),i}const ag=e=>{const t={...e,v:"v1"};return function(e,t){var r="";if(!t&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var s=0;s<e.length;){var n=e[s++];n<128||t?r+=String.fromCharCode(n):n<224?r+=String.fromCharCode((31&n)<<6|63&e[s++]):n<240?r+=String.fromCharCode((15&n)<<12|(63&e[s++])<<6|63&e[s++]):(n=((15&n)<<18|(63&e[s++])<<12|(63&e[s++])<<6|63&e[s++])-65536,r+=String.fromCharCode(55296|n>>10,56320|1023&n))}return r}(ig(function(e,t){var r=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var s=new Rm(e.length+(e.length>>>1)),n=0,o=function(e){s[n++]=e},i=0;i<r;++i){if(n+5>s.length){var a=new Rm(n+8+(r-i<<1));a.set(s),s=a}var l=e.charCodeAt(i);l<128||t?o(l):l<2048?(o(192|l>>>6),o(128|63&l)):l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++i))>>>18),o(128|l>>>12&63),o(128|l>>>6&63),o(128|63&l)):(o(224|l>>>12),o(128|l>>>6&63),o(128|63&l))}return Km(s,0,n)}(JSON.stringify(t))),!0)};var lg,cg=function(){function e(e,t,r,s){var n,o,i,a=this;this.taskQueue=[],this.isProcessing=!1,this.compressEvent=function(e){var t=ag(e);return JSON.stringify(t)},this.addCompressedEventToManager=function(e,t){a.eventsManager&&a.deviceId&&a.eventsManager.addEvent({event:{type:"replay",data:e},sessionId:t,deviceId:a.deviceId})},this.addCompressedEvent=function(e,t){if(a.worker)a.worker.postMessage({event:e,sessionId:t});else{var r=a.compressEvent(e);a.addCompressedEventToManager(r,t)}},this.terminate=function(){var e;null===(e=a.worker)||void 0===e||e.terminate()};var l=d();this.canUseIdleCallback=l&&"requestIdleCallback"in l,this.eventsManager=e,this.config=t,this.deviceId=r,this.timeout=(null===(n=t.performanceConfig)||void 0===n?void 0:n.timeout)||2e3;var c=null!==(o='var WebWorker=function(r){"use strict";var n=Uint8Array,e=Uint16Array,f=Uint32Array,t=new n([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]),a=new n([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]),o=new n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),i=function(r,n){for(var t=new e(31),a=0;a<31;++a)t[a]=n+=1<<r[a-1];var o=new f(t[30]);for(a=1;a<30;++a)for(var i=t[a];i<t[a+1];++i)o[i]=i-t[a]<<5|a;return[t,o]},v=i(t,2),u=v[0],s=v[1];u[28]=258,s[258]=28;for(var l=i(a,0)[1],c=new e(32768),h=0;h<32768;++h){var g=(43690&h)>>>1|(21845&h)<<1;g=(61680&(g=(52428&g)>>>2|(13107&g)<<2))>>>4|(3855&g)<<4,c[h]=((65280&g)>>>8|(255&g)<<8)>>>1}var w=function(r,n,f){for(var t=r.length,a=0,o=new e(n);a<t;++a)++o[r[a]-1];var i,v=new e(n);for(a=0;a<n;++a)v[a]=v[a-1]+o[a-1]<<1;if(f){i=new e(1<<n);var u=15-n;for(a=0;a<t;++a)if(r[a])for(var s=a<<4|r[a],l=n-r[a],h=v[r[a]-1]++<<l,g=h|(1<<l)-1;h<=g;++h)i[c[h]>>>u]=s}else for(i=new e(t),a=0;a<t;++a)i[a]=c[v[r[a]-1]++]>>>15-r[a];return i},d=new n(288);for(h=0;h<144;++h)d[h]=8;for(h=144;h<256;++h)d[h]=9;for(h=256;h<280;++h)d[h]=7;for(h=280;h<288;++h)d[h]=8;var m=new n(32);for(h=0;h<32;++h)m[h]=5;var M=w(d,9,0),y=w(m,5,0),b=function(r){return(r/8>>0)+(7&r&&1)},p=function(r,t,a){(null==a||a>r.length)&&(a=r.length);var o=new(r instanceof e?e:r instanceof f?f:n)(a-t);return o.set(r.subarray(t,a)),o},C=function(r,n,e){e<<=7&n;var f=n/8>>0;r[f]|=e,r[f+1]|=e>>>8},x=function(r,n,e){e<<=7&n;var f=n/8>>0;r[f]|=e,r[f+1]|=e>>>8,r[f+2]|=e>>>16},S=function(r,f){for(var t=[],a=0;a<r.length;++a)r[a]&&t.push({s:a,f:r[a]});var o=t.length,i=t.slice();if(!o)return[new n(0),0];if(1==o){var v=new n(t[0].s+1);return v[t[0].s]=1,[v,1]}t.sort((function(r,n){return r.f-n.f})),t.push({s:-1,f:25001});var u=t[0],s=t[1],l=0,c=1,h=2;for(t[0]={s:-1,f:u.f+s.f,l:u,r:s};c!=o-1;)u=t[t[l].f<t[h].f?l++:h++],s=t[l!=c&&t[l].f<t[h].f?l++:h++],t[c++]={s:-1,f:u.f+s.f,l:u,r:s};var g=i[0].s;for(a=1;a<o;++a)i[a].s>g&&(g=i[a].s);var w=new e(g+1),d=A(t[c-1],w,0);if(d>f){a=0;var m=0,M=d-f,y=1<<M;for(i.sort((function(r,n){return w[n.s]-w[r.s]||r.f-n.f}));a<o;++a){var b=i[a].s;if(!(w[b]>f))break;m+=y-(1<<d-w[b]),w[b]=f}for(m>>>=M;m>0;){var p=i[a].s;w[p]<f?m-=1<<f-w[p]++-1:++a}for(;a>=0&&m;--a){var C=i[a].s;w[C]==f&&(--w[C],++m)}d=f}return[new n(w),d]},A=function(r,n,e){return-1==r.s?Math.max(A(r.l,n,e+1),A(r.r,n,e+1)):n[r.s]=e},O=function(r){for(var n=r.length;n&&!r[--n];);for(var f=new e(++n),t=0,a=r[0],o=1,i=function(r){f[t++]=r},v=1;v<=n;++v)if(r[v]==a&&v!=n)++o;else{if(!a&&o>2){for(;o>138;o-=138)i(32754);o>2&&(i(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(i(a),--o;o>6;o-=6)i(8304);o>2&&(i(o-3<<5|8208),o=0)}for(;o--;)i(a);o=1,a=r[v]}return[f.subarray(0,t),n]},T=function(r,n){for(var e=0,f=0;f<n.length;++f)e+=r[f]*n[f];return e},k=function(r,n,e){var f=e.length,t=b(n+2);r[t]=255&f,r[t+1]=f>>>8,r[t+2]=255^r[t],r[t+3]=255^r[t+1];for(var a=0;a<f;++a)r[t+a+4]=e[a];return 8*(t+4+f)},E=function(r,n,f,i,v,u,s,l,c,h,g){C(n,g++,f),++v[256];for(var b=S(v,15),p=b[0],A=b[1],E=S(u,15),U=E[0],D=E[1],I=O(p),J=I[0],N=I[1],W=O(U),_=W[0],j=W[1],P=new e(19),q=0;q<J.length;++q)P[31&J[q]]++;for(q=0;q<_.length;++q)P[31&_[q]]++;for(var z=S(P,7),B=z[0],F=z[1],G=19;G>4&&!B[o[G-1]];--G);var H,K,L,Q,R=h+5<<3,V=T(v,d)+T(u,m)+s,X=T(v,p)+T(u,U)+s+14+3*G+T(P,B)+(2*P[16]+3*P[17]+7*P[18]);if(R<=V&&R<=X)return k(n,g,r.subarray(c,c+h));if(C(n,g,1+(X<V)),g+=2,X<V){H=w(p,A,0),K=p,L=w(U,D,0),Q=U;var Y=w(B,F,0);C(n,g,N-257),C(n,g+5,j-1),C(n,g+10,G-4),g+=14;for(q=0;q<G;++q)C(n,g+3*q,B[o[q]]);g+=3*G;for(var Z=[J,_],$=0;$<2;++$){var rr=Z[$];for(q=0;q<rr.length;++q){var nr=31&rr[q];C(n,g,Y[nr]),g+=B[nr],nr>15&&(C(n,g,rr[q]>>>5&127),g+=rr[q]>>>12)}}}else H=M,K=d,L=y,Q=m;for(q=0;q<l;++q)if(i[q]>255){nr=i[q]>>>18&31;x(n,g,H[nr+257]),g+=K[nr+257],nr>7&&(C(n,g,i[q]>>>23&31),g+=t[nr]);var er=31&i[q];x(n,g,L[er]),g+=Q[er],er>3&&(x(n,g,i[q]>>>5&8191),g+=a[er])}else x(n,g,H[i[q]]),g+=K[i[q]];return x(n,g,H[256]),g+K[256]},U=new f([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D=function(r,o,i,v,u){return function(r,o,i,v,u,c){var h=r.length,g=new n(v+h+5*(1+Math.floor(h/7e3))+u),w=g.subarray(v,g.length-u),d=0;if(!o||h<8)for(var m=0;m<=h;m+=65535){var M=m+65535;M<h?d=k(w,d,r.subarray(m,M)):(w[m]=c,d=k(w,d,r.subarray(m,h)))}else{for(var y=U[o-1],C=y>>>13,x=8191&y,S=(1<<i)-1,A=new e(32768),O=new e(S+1),T=Math.ceil(i/3),D=2*T,I=function(n){return(r[n]^r[n+1]<<T^r[n+2]<<D)&S},J=new f(25e3),N=new e(288),W=new e(32),_=0,j=0,P=(m=0,0),q=0,z=0;m<h;++m){var B=I(m),F=32767&m,G=O[B];if(A[F]=G,O[B]=F,q<=m){var H=h-m;if((_>7e3||P>24576)&&H>423){d=E(r,w,0,J,N,W,j,P,z,m-z,d),P=_=j=0,z=m;for(var K=0;K<286;++K)N[K]=0;for(K=0;K<30;++K)W[K]=0}var L=2,Q=0,R=x,V=F-G&32767;if(H>2&&B==I(m-V))for(var X=Math.min(C,H)-1,Y=Math.min(32767,m),Z=Math.min(258,H);V<=Y&&--R&&F!=G;){if(r[m+L]==r[m+L-V]){for(var $=0;$<Z&&r[m+$]==r[m+$-V];++$);if($>L){if(L=$,Q=V,$>X)break;var rr=Math.min(V,$-2),nr=0;for(K=0;K<rr;++K){var er=m-V+K+32768&32767,fr=er-A[er]+32768&32767;fr>nr&&(nr=fr,G=er)}}}V+=(F=G)-(G=A[F])+32768&32767}if(Q){J[P++]=268435456|s[L]<<18|l[Q];var tr=31&s[L],ar=31&l[Q];j+=t[tr]+a[ar],++N[257+tr],++W[ar],q=m+L,++_}else J[P++]=r[m],++N[r[m]]}}d=E(r,w,c,J,N,W,j,P,z,m-z,d)}return p(g,0,v+b(d)+u)}(r,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+o.mem,i,v,!u)};function I(r,n){void 0===n&&(n={});var e=function(){var r=1,n=0;return{p:function(e){for(var f=r,t=n,a=e.length,o=0;o!=a;){for(var i=Math.min(o+5552,a);o<i;++o)t+=f+=e[o];f%=65521,t%=65521}r=f,n=t},d:function(){return(r>>>8<<16|(255&n)<<8|n>>>8)+2*((255&r)<<23)}}}();e.p(r);var f,t,a,o=D(r,n,2,4);return f=o,t=n.level,a=0==t?0:t<6?1:9==t?3:2,f[0]=120,f[1]=a<<6|(a?32-2*a:1),function(r,n,e){for(;e;++n)r[n]=e,e>>>=8}(o,o.length-4,e.d()),o}const J=r=>{const e={...r,v:"v1"};return function(r,n){var e="";if(!n&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(r);for(var f=0;f<r.length;){var t=r[f++];t<128||n?e+=String.fromCharCode(t):t<224?e+=String.fromCharCode((31&t)<<6|63&r[f++]):t<240?e+=String.fromCharCode((15&t)<<12|(63&r[f++])<<6|63&r[f++]):(t=((15&t)<<18|(63&r[f++])<<12|(63&r[f++])<<6|63&r[f++])-65536,e+=String.fromCharCode(55296|t>>10,56320|1023&t))}return e}(I(function(r,e){var f=r.length;if(!e&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(r);for(var t=new n(r.length+(r.length>>>1)),a=0,o=function(r){t[a++]=r},i=0;i<f;++i){if(a+5>t.length){var v=new n(a+8+(f-i<<1));v.set(t),t=v}var u=r.charCodeAt(i);u<128||e?o(u):u<2048?(o(192|u>>>6),o(128|63&u)):u>55295&&u<57344?(o(240|(u=65536+(1047552&u)|1023&r.charCodeAt(++i))>>>18),o(128|u>>>12&63),o(128|u>>>6&63),o(128|63&u)):(o(224|u>>>12),o(128|u>>>6&63),o(128|63&u))}return p(t,0,a)}(JSON.stringify(e))),!0)};onmessage=function(r){var n=r.data,e=n.event,f=n.sessionId,t=JSON.stringify(J(e));postMessage({compressedEvent:t,sessionId:f})};var N=onmessage;return r.compressionOnMessage=N,Object.defineProperty(r,"__esModule",{value:!0}),r}({});\n')?o:s;if((null===(i=this.config.experimental)||void 0===i?void 0:i.useWebWorker)&&l&&l.Worker&&c){t.loggerProvider.log("[Experimental] Enabling web worker for compression");var u=new Worker(URL.createObjectURL(new Blob([c],{type:"application/javascript"})));u.onerror=function(e){t.loggerProvider.error(e)},u.onmessage=function(e){var t=e.data,r=t.compressedEvent,s=t.sessionId;a.addCompressedEventToManager(r,s)},this.worker=u}}return e.prototype.scheduleIdleProcessing=function(){var e=this;this.isProcessing||(this.isProcessing=!0,requestIdleCallback((function(t){e.processQueue(t)}),{timeout:this.timeout}))},e.prototype.enqueueEvent=function(e,t){var r;this.canUseIdleCallback&&(null===(r=this.config.performanceConfig)||void 0===r?void 0:r.enabled)?(this.config.loggerProvider.debug("Enqueuing event for processing during idle time."),this.taskQueue.push({event:e,sessionId:t}),this.scheduleIdleProcessing()):(this.config.loggerProvider.debug("Processing event without idle callback."),this.addCompressedEvent(e,t))},e.prototype.processQueue=function(e){for(var t=this;this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){var r=this.taskQueue.shift();if(r){var s=r.event,n=r.sessionId;this.addCompressedEvent(s,n)}}this.taskQueue.length>0?requestIdleCallback((function(e){t.processQueue(e)}),{timeout:this.timeout}):this.isProcessing=!1},e}(),ug=Object.defineProperty,hg=(e,t,r)=>((e,t,r)=>t in e?ug(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),pg=Object.defineProperty,dg=(e,t,r)=>((e,t,r)=>t in e?pg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),fg=Object.defineProperty,mg=(e,t,r)=>((e,t,r)=>t in e?fg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);const gg={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},yg={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vg={};function wg(e){if(vg[e])return vg[e];const t=globalThis[e],r=t.prototype,s=e in gg?gg[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in yg?yg[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return vg[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?vg[e]=o:r}catch{return r}}const bg={};function Sg(e,t,r){var s;const n=`${e}.${String(r)}`;if(bg[n])return bg[n].call(t);const o=wg(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(bg[n]=i,i.call(t)):t[r]}const Cg={};function xg(e,t,r){const s=`${e}.${String(r)}`;if(Cg[s])return Cg[s].bind(t);const n=wg(e)[r];return"function"!=typeof n?t[r]:(Cg[s]=n,n.bind(t))}const Ig={childNodes:function(e){return Sg("Node",e,"childNodes")},parentNode:function(e){return Sg("Node",e,"parentNode")},parentElement:function(e){return Sg("Node",e,"parentElement")},textContent:function(e){return Sg("Node",e,"textContent")},contains:function(e,t){return xg("Node",e,"contains")(t)},getRootNode:function(e){return xg("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Sg("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Sg("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Sg("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Sg("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return wg("MutationObserver").constructor}};class kg{constructor(){mg(this,"idNodeMap",new Map),mg(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Og(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Og(Ig.parentNode(e),t,r);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!r&&Og(Ig.parentNode(e),t,r)}function Eg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ag(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?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(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var Rg={exports:{}},Mg=String,Pg=function(){return{isColorSupported:!1,reset:Mg,bold:Mg,dim:Mg,italic:Mg,underline:Mg,inverse:Mg,hidden:Mg,strikethrough:Mg,black:Mg,red:Mg,green:Mg,yellow:Mg,blue:Mg,magenta:Mg,cyan:Mg,white:Mg,gray:Mg,bgBlack:Mg,bgRed:Mg,bgGreen:Mg,bgYellow:Mg,bgBlue:Mg,bgMagenta:Mg,bgCyan:Mg,bgWhite:Mg}};Rg.exports=Pg(),Rg.exports.createColors=Pg;var Ng=Rg.exports;const Tg=Ag(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Lg=Ng,Dg=Tg,Fg=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Lg.isColorSupported),Dg&&e&&(t=Dg(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=Lg.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var _g=Fg;Fg.default=Fg;var Bg={};Bg.isClean=Symbol("isClean"),Bg.my=Symbol("my");const Ug={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let jg=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Ug[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Ug[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var zg=jg;jg.default=jg;let Wg=zg;function Vg(e,t){new Wg(t).stringify(e)}var Gg=Vg;Vg.default=Vg;let{isClean:Zg,my:Yg}=Bg,Jg=_g,qg=zg,Kg=Gg;function Xg(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>Xg(e,r))):("object"===o&&null!==n&&(n=Xg(n)),r[s]=n)}return r}let Hg=class{constructor(e={}){this.raws={},this[Zg]=!1,this[Yg]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Xg(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Jg(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Zg]){this[Zg]=!1;let e=this;for(;e=e.parent;)e[Zg]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new qg).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Kg){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var $g=Hg;Hg.default=Hg;let Qg=$g,ey=class extends Qg{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var ty=ey;ey.default=ey;var ry={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:sy,SourceMapGenerator:ny}=Tg,{existsSync:oy,readFileSync:iy}=Tg,{dirname:ay,join:ly}=Tg;let cy=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ay(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new sy(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=ay(e),oy(e))return this.mapFile=e,iy(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof sy)return ny.fromSourceMap(t).toString();if(t instanceof ny)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=ly(ay(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var uy=cy;cy.default=cy;let{SourceMapConsumer:hy,SourceMapGenerator:py}=Tg,{fileURLToPath:dy,pathToFileURL:fy}=Tg,{isAbsolute:my,resolve:gy}=Tg,{nanoid:yy}=ry,vy=Tg,wy=_g,by=uy,Sy=Symbol("fromOffsetCache"),Cy=Boolean(hy&&py),xy=Boolean(gy&&my),Iy=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!xy||/^\w+:\/\//.test(t.from)||my(t.from)?this.file=t.from:this.file=gy(t.from)),xy&&Cy){let e=new by(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+yy(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new wy(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new wy(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(fy&&(n.input.url=fy(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Sy])r=this[Sy];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[Sy]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:gy(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=my(a.source)?fy(a.source):new URL(a.source,this.map.consumer().sourceRoot||fy(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!dy)throw new Error("file: protocol is not available in this PostCSS build");l.file=dy(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var ky=Iy;Iy.default=Iy,vy&&vy.registerInput&&vy.registerInput(Iy);let{SourceMapConsumer:Oy,SourceMapGenerator:Ey}=Tg,{dirname:Ay,relative:Ry,resolve:My,sep:Py}=Tg,{pathToFileURL:Ny}=Tg,Ty=ky,Ly=Boolean(Oy&&Ey),Dy=Boolean(Ay&&My&&Ry&&Py);var Fy=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||Ay(e.file);!1===this.mapOpts.sourcesContent?(t=new Oy(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Dy&&Ly&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ey.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ey({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 Ey({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Ay(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Ay(My(r,this.mapOpts.annotation)));let s=Ry(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new Ty(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ny){let t=Ny(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Py&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let _y=$g,By=class extends _y{constructor(e){super(e),this.type="comment"}};var Uy=By;By.default=By;let jy,zy,Wy,Vy,{isClean:Gy,my:Zy}=Bg,Yy=ty,Jy=Uy,qy=$g;function Ky(e){return e.map((e=>(e.nodes&&(e.nodes=Ky(e.nodes)),delete e.source,e)))}function Xy(e){if(e[Gy]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Xy(t)}let Hy=class e extends qy{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=Ky(jy(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Yy(t)]}else if(t.selector)t=[new zy(t)];else if(t.name)t=[new Wy(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Jy(t)]}return t.map((t=>(t[Zy]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Gy]&&Xy(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};Hy.registerParse=e=>{jy=e},Hy.registerRule=e=>{zy=e},Hy.registerAtRule=e=>{Wy=e},Hy.registerRoot=e=>{Vy=e};var $y=Hy;Hy.default=Hy,Hy.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Wy.prototype):"rule"===e.type?Object.setPrototypeOf(e,zy.prototype):"decl"===e.type?Object.setPrototypeOf(e,Yy.prototype):"comment"===e.type?Object.setPrototypeOf(e,Jy.prototype):"root"===e.type&&Object.setPrototypeOf(e,Vy.prototype),e[Zy]=!0,e.nodes&&e.nodes.forEach((e=>{Hy.rebuild(e)}))};let Qy,ev,tv=$y,rv=class extends tv{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Qy(new ev,this,e).stringify()}};rv.registerLazyResult=e=>{Qy=e},rv.registerProcessor=e=>{ev=e};var sv=rv;rv.default=rv;let nv={};var ov=function(e){nv[e]||(nv[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let iv=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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}};var av=iv;iv.default=iv;let lv=av,cv=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new lv(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var uv=cv;cv.default=cv;const hv="'".charCodeAt(0),pv='"'.charCodeAt(0),dv="\\".charCodeAt(0),fv="/".charCodeAt(0),mv="\n".charCodeAt(0),gv=" ".charCodeAt(0),yv="\f".charCodeAt(0),vv="\t".charCodeAt(0),wv="\r".charCodeAt(0),bv="[".charCodeAt(0),Sv="]".charCodeAt(0),Cv="(".charCodeAt(0),xv=")".charCodeAt(0),Iv="{".charCodeAt(0),kv="}".charCodeAt(0),Ov=";".charCodeAt(0),Ev="*".charCodeAt(0),Av=":".charCodeAt(0),Rv="@".charCodeAt(0),Mv=/[\t\n\f\r "#'()/;[\\\]{}]/g,Pv=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Nv=/.[\r\n"'(/\\]/,Tv=/[\da-f]/i;let Lv=$y,Dv=class extends Lv{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Fv=Dv;Dv.default=Dv,Lv.registerAtRule(Dv);let _v,Bv,Uv=$y,jv=class extends Uv{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new _v(new Bv,this,e).stringify()}};jv.registerLazyResult=e=>{_v=e},jv.registerProcessor=e=>{Bv=e};var zv=jv;jv.default=jv,Uv.registerRoot(jv);let Wv={comma:e=>Wv.split(e,[","],!0),space:e=>Wv.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Vv=Wv;Wv.default=Wv;let Gv=$y,Zv=Vv,Yv=class extends Gv{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Zv.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Jv=Yv;Yv.default=Yv,Gv.registerRule(Yv);let qv=ty,Kv=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case mv:case gv:case vv:case wv:case yv:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===gv||r===mv||r===vv||r===wv||r===yv);h=["space",p.slice(m,s)],m=s-1;break;case bv:case Sv:case Iv:case kv:case Av:case Ov:case xv:{let e=String.fromCharCode(r);h=[e,e,m];break}case Cv:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==hv&&u!==pv&&u!==gv&&u!==mv&&u!==vv&&u!==yv&&u!==wv){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}v("bracket")}for(l=s;p.charCodeAt(l-1)===dv;)l-=1,a=!a}while(a);h=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||Nv.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case hv:case pv:n=r===hv?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}v("string")}for(l=s;p.charCodeAt(l-1)===dv;)l-=1,a=!a}while(a);h=["string",p.slice(m,s+1),m,s],m=s;break;case Rv:Mv.lastIndex=m+1,Mv.test(p),s=0===Mv.lastIndex?p.length-1:Mv.lastIndex-2,h=["at-word",p.slice(m,s+1),m,s],m=s;break;case dv:for(s=m,i=!0;p.charCodeAt(s+1)===dv;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==fv&&r!==gv&&r!==mv&&r!==vv&&r!==wv&&r!==yv&&(s+=1,Tv.test(p.charAt(s)))){for(;Tv.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===gv&&(s+=1)}h=["word",p.slice(m,s+1),m,s],m=s;break;default:r===fv&&p.charCodeAt(m+1)===Ev?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:v("comment")),h=["comment",p.slice(m,s+1),m,s],m=s):(Pv.lastIndex=m+1,Pv.test(p),s=0===Pv.lastIndex?p.length-1:Pv.lastIndex-2,h=["word",p.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},Xv=Uy,Hv=Fv,$v=zv,Qv=Jv;const ew={empty:!0,space:!0};var tw=class{constructor(e){this.input=e,this.root=new $v,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new Hv;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new Xv;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Kv(this.input)}decl(e,t){let r=new qv;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Qv;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",ew[a]||ew[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Qv;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let rw=$y,sw=tw,nw=ky;function ow(e,t){let r=new nw(e,t),s=new sw(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var iw=ow;ow.default=ow,rw.registerParse(ow);let{isClean:aw,my:lw}=Bg,cw=Fy,uw=Gg,hw=$y,pw=sv,dw=ov,fw=uv,mw=iw,gw=zv;const yw={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},vw={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},ww={Once:!0,postcssPlugin:!0,prepare:!0};function bw(e){return"object"==typeof e&&"function"==typeof e.then}function Sw(e){let t=!1,r=yw[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Cw(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Sw(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function xw(e){return e[aw]=!1,e.nodes&&e.nodes.forEach((e=>xw(e))),e}let Iw={},kw=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof fw)n=xw(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=mw;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[lw]&&hw.rebuild(n)}else n=xw(r);this.result=new fw(t,n,s),this.helpers={...Iw,postcss:Iw,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!vw[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ww[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(bw(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[aw];){e[aw]=!0;let t=[Cw(e)];for(;t.length>0;){let e=this.visitTick(t);if(bw(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return bw(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=uw;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new cw(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){if(bw(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[aw];)e[aw]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||dw("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(bw(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[aw])return s[aw]=!0,void e.push(Cw(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[aw]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[aw]=!0;let t=Sw(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[aw]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};kw.registerPostcss=e=>{Iw=e};var Ow=kw;kw.default=kw,gw.registerLazyResult(kw),pw.registerLazyResult(kw);let Ew=Fy,Aw=Gg,Rw=ov,Mw=iw;const Pw=uv;let Nw=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Aw;this.result=new Pw(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new Ew(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||Rw("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}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 e,t=Mw;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Tw=Nw;Nw.default=Nw;let Lw=Tw,Dw=Ow,Fw=sv,_w=zv,Bw=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Dw(this,e,t):new Lw(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Uw=Bw;Bw.default=Bw,_w.registerProcessor(Bw),Fw.registerProcessor(Bw);let jw=ty,zw=uy,Ww=Uy,Vw=Fv,Gw=ky,Zw=zv,Yw=Jv;function Jw(e,t){if(Array.isArray(e))return e.map((e=>Jw(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Gw.prototype};r.map&&(r.map={...r.map,__proto__:zw.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Jw(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Zw(s);if("decl"===s.type)return new jw(s);if("rule"===s.type)return new Yw(s);if("comment"===s.type)return new Ww(s);if("atrule"===s.type)return new Vw(s);throw new Error("Unknown node type: "+e.type)}var qw=Jw;Jw.default=Jw;let Kw=_g,Xw=ty,Hw=Ow,$w=$y,Qw=Uw,eb=Gg,tb=qw,rb=sv,sb=av,nb=Uy,ob=Fv,ib=uv,ab=ky,lb=iw,cb=Vv,ub=Jv,hb=zv,pb=$g;function db(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Qw(e)}db.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Qw).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return db([n(r)]).process(e,t)},n},db.stringify=eb,db.parse=lb,db.fromJSON=tb,db.list=cb,db.comment=e=>new nb(e),db.atRule=e=>new ob(e),db.decl=e=>new Xw(e),db.rule=e=>new ub(e),db.root=e=>new hb(e),db.document=e=>new rb(e),db.CssSyntaxError=Kw,db.Declaration=Xw,db.Container=$w,db.Processor=Qw,db.Document=rb,db.Comment=nb,db.Warning=sb,db.AtRule=ob,db.Result=ib,db.Input=ab,db.Rule=ub,db.Root=hb,db.Node=pb,Hw.registerPostcss(db);var fb=db;db.default=db;const mb=Eg(fb);mb.stringify,mb.fromJSON,mb.plugin,mb.parse,mb.list,mb.document,mb.comment,mb.atRule,mb.rule,mb.decl,mb.root,mb.CssSyntaxError,mb.Declaration,mb.Container,mb.Processor,mb.Document,mb.Comment,mb.Warning,mb.AtRule,mb.Result,mb.Input,mb.Rule,mb.Root,mb.Node;var gb=Object.defineProperty,yb=(e,t,r)=>((e,t,r)=>t in e?gb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function vb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wb(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?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(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var bb={exports:{}},Sb=String,Cb=function(){return{isColorSupported:!1,reset:Sb,bold:Sb,dim:Sb,italic:Sb,underline:Sb,inverse:Sb,hidden:Sb,strikethrough:Sb,black:Sb,red:Sb,green:Sb,yellow:Sb,blue:Sb,magenta:Sb,cyan:Sb,white:Sb,gray:Sb,bgBlack:Sb,bgRed:Sb,bgGreen:Sb,bgYellow:Sb,bgBlue:Sb,bgMagenta:Sb,bgCyan:Sb,bgWhite:Sb}};bb.exports=Cb(),bb.exports.createColors=Cb;var xb=bb.exports;const Ib=wb(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let kb=xb,Ob=Ib,Eb=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=kb.isColorSupported),Ob&&e&&(t=Ob(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=String(i).length;if(e){let{bold:e,gray:t,red:n}=kb.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map(((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ab=Eb;Eb.default=Eb;var Rb={};Rb.isClean=Symbol("isClean"),Rb.my=Symbol("my");const Mb={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Pb=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Mb[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk((e=>{if(s=e.raws[t],void 0!==s)return!1}))}var i;return void 0===s&&(s=Mb[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Nb=Pb;Pb.default=Pb;let Tb=Nb;function Lb(e,t){new Tb(t).stringify(e)}var Db=Lb;Lb.default=Lb;let{isClean:Fb,my:_b}=Rb,Bb=Ab,Ub=Nb,jb=Db;function zb(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map((e=>zb(e,r))):("object"===o&&null!==n&&(n=zb(n)),r[s]=n)}return r}let Wb=class{constructor(e={}){this.raws={},this[Fb]=!1,this[_b]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=zb(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Bb(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Fb]){this[Fb]=!1;let e=this;for(;e=e.parent;)e[Fb]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new Ub).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=jb){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Vb=Wb;Wb.default=Wb;let Gb=Vb,Zb=class extends Gb{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Yb=Zb;Zb.default=Zb;var Jb={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:qb,SourceMapGenerator:Kb}=Ib,{existsSync:Xb,readFileSync:Hb}=Ib,{dirname:$b,join:Qb}=Ib;let eS=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=$b(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new qb(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=$b(e),Xb(e))return this.mapFile=e,Hb(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof qb)return Kb.fromSourceMap(t).toString();if(t instanceof Kb)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Qb($b(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var tS=eS;eS.default=eS;let{SourceMapConsumer:rS,SourceMapGenerator:sS}=Ib,{fileURLToPath:nS,pathToFileURL:oS}=Ib,{isAbsolute:iS,resolve:aS}=Ib,{nanoid:lS}=Jb,cS=Ib,uS=Ab,hS=tS,pS=Symbol("fromOffsetCache"),dS=Boolean(rS&&sS),fS=Boolean(aS&&iS),mS=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!fS||/^\w+:\/\//.test(t.from)||iS(t.from)?this.file=t.from:this.file=aS(t.from)),fS&&dS){let e=new hS(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+lS(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new uS(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new uS(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(oS&&(n.input.url=oS(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[pS])r=this[pS];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[pS]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:aS(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=iS(a.source)?oS(a.source):new URL(a.source,this.map.consumer().sourceRoot||oS(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!nS)throw new Error("file: protocol is not available in this PostCSS build");l.file=nS(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var gS=mS;mS.default=mS,cS&&cS.registerInput&&cS.registerInput(mS);let{SourceMapConsumer:yS,SourceMapGenerator:vS}=Ib,{dirname:wS,relative:bS,resolve:SS,sep:CS}=Ib,{pathToFileURL:xS}=Ib,IS=gS,kS=Boolean(yS&&vS),OS=Boolean(wS&&SS&&bS&&CS);var ES=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||wS(e.file);!1===this.mapOpts.sourcesContent?(t=new yS(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),OS&&kS&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=vS.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new vS({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 vS({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?wS(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=wS(SS(r,this.mapOpts.annotation)));let s=bS(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new IS(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(xS){let t=xS(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===CS&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let AS=Vb,RS=class extends AS{constructor(e){super(e),this.type="comment"}};var MS=RS;RS.default=RS;let PS,NS,TS,LS,{isClean:DS,my:FS}=Rb,_S=Yb,BS=MS,US=Vb;function jS(e){return e.map((e=>(e.nodes&&(e.nodes=jS(e.nodes)),delete e.source,e)))}function zS(e){if(e[DS]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)zS(t)}let WS=class e extends US{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",o=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of o)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=jS(PS(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new _S(t)]}else if(t.selector)t=[new NS(t)];else if(t.name)t=[new TS(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new BS(t)]}return t.map((t=>(t[FS]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[DS]&&zS(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}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]}};WS.registerParse=e=>{PS=e},WS.registerRule=e=>{NS=e},WS.registerAtRule=e=>{TS=e},WS.registerRoot=e=>{LS=e};var VS=WS;WS.default=WS,WS.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,TS.prototype):"rule"===e.type?Object.setPrototypeOf(e,NS.prototype):"decl"===e.type?Object.setPrototypeOf(e,_S.prototype):"comment"===e.type?Object.setPrototypeOf(e,BS.prototype):"root"===e.type&&Object.setPrototypeOf(e,LS.prototype),e[FS]=!0,e.nodes&&e.nodes.forEach((e=>{WS.rebuild(e)}))};let GS,ZS,YS=VS,JS=class extends YS{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new GS(new ZS,this,e).stringify()}};JS.registerLazyResult=e=>{GS=e},JS.registerProcessor=e=>{ZS=e};var qS=JS;JS.default=JS;let KS={};var XS=function(e){KS[e]||(KS[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let HS=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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}};var $S=HS;HS.default=HS;let QS=$S,eC=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new QS(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var tC=eC;eC.default=eC;const rC="'".charCodeAt(0),sC='"'.charCodeAt(0),nC="\\".charCodeAt(0),oC="/".charCodeAt(0),iC="\n".charCodeAt(0),aC=" ".charCodeAt(0),lC="\f".charCodeAt(0),cC="\t".charCodeAt(0),uC="\r".charCodeAt(0),hC="[".charCodeAt(0),pC="]".charCodeAt(0),dC="(".charCodeAt(0),fC=")".charCodeAt(0),mC="{".charCodeAt(0),gC="}".charCodeAt(0),yC=";".charCodeAt(0),vC="*".charCodeAt(0),wC=":".charCodeAt(0),bC="@".charCodeAt(0),SC=/[\t\n\f\r "#'()/;[\\\]{}]/g,CC=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,xC=/.[\r\n"'(/\\]/,IC=/[\da-f]/i;let kC=VS,OC=class extends kC{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var EC=OC;OC.default=OC,kC.registerAtRule(OC);let AC,RC,MC=VS,PC=class extends MC{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new AC(new RC,this,e).stringify()}};PC.registerLazyResult=e=>{AC=e},PC.registerProcessor=e=>{RC=e};var NC=PC;PC.default=PC,MC.registerRoot(PC);let TC={comma:e=>TC.split(e,[","],!0),space:e=>TC.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var LC=TC;TC.default=TC;let DC=VS,FC=LC,_C=class extends DC{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return FC.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var BC=_C;_C.default=_C,DC.registerRule(_C);let UC=Yb,jC=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function v(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case iC:case aC:case cC:case uC:case lC:s=m;do{s+=1,r=p.charCodeAt(s)}while(r===aC||r===iC||r===cC||r===uC||r===lC);h=["space",p.slice(m,s)],m=s-1;break;case hC:case pC:case mC:case gC:case wC:case yC:case fC:{let e=String.fromCharCode(r);h=[e,e,m];break}case dC:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==rC&&u!==sC&&u!==aC&&u!==iC&&u!==cC&&u!==lC&&u!==uC){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}v("bracket")}for(l=s;p.charCodeAt(l-1)===nC;)l-=1,a=!a}while(a);h=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),o=p.slice(m,s+1),-1===s||xC.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case rC:case sC:n=r===rC?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}v("string")}for(l=s;p.charCodeAt(l-1)===nC;)l-=1,a=!a}while(a);h=["string",p.slice(m,s+1),m,s],m=s;break;case bC:SC.lastIndex=m+1,SC.test(p),s=0===SC.lastIndex?p.length-1:SC.lastIndex-2,h=["at-word",p.slice(m,s+1),m,s],m=s;break;case nC:for(s=m,i=!0;p.charCodeAt(s+1)===nC;)s+=1,i=!i;if(r=p.charCodeAt(s+1),i&&r!==oC&&r!==aC&&r!==iC&&r!==cC&&r!==uC&&r!==lC&&(s+=1,IC.test(p.charAt(s)))){for(;IC.test(p.charAt(s+1));)s+=1;p.charCodeAt(s+1)===aC&&(s+=1)}h=["word",p.slice(m,s+1),m,s],m=s;break;default:r===oC&&p.charCodeAt(m+1)===vC?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:v("comment")),h=["comment",p.slice(m,s+1),m,s],m=s):(CC.lastIndex=m+1,CC.test(p),s=0===CC.lastIndex?p.length-1:CC.lastIndex-2,h=["word",p.slice(m,s+1),m,s],g.push(h),m=s)}return m++,h},position:function(){return m}}},zC=MS,WC=EC,VC=NC,GC=BC;const ZC={empty:!0,space:!0};var YC=class{constructor(e){this.input=e,this.root=new VC,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new WC;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let o=!1,i=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){i=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),o&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return o}this.doubleColon(t)}s=t}return!1}comment(e){let t=new zC;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=jC(this.input)}decl(e,t){let r=new UC;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,i=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)i.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=i.map((e=>e[1])).join(""),i=[]),this.raw(r,"value",i.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new GC;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),o.push("("===r?")":"]");else if(i&&s&&"{"===r)n||(n=l),o.push("}");else if(0===o.length){if(";"===r){if(s)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,i,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)n=r[e],o=n[0],"space"!==o||e!==l-1||s?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",ZC[a]||ZC[i]||","===c.slice(-1)?u=!1:c+=n[1]):c+=n[1]:u=!1;if(!u){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new GC;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let JC=VS,qC=YC,KC=gS;function XC(e,t){let r=new KC(e,t),s=new qC(r);try{s.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return s.root}var HC=XC;XC.default=XC,JC.registerParse(XC);let{isClean:$C,my:QC}=Rb,ex=ES,tx=Db,rx=VS,sx=qS,nx=XS,ox=tC,ix=HC,ax=NC;const lx={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},cx={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},ux={Once:!0,postcssPlugin:!0,prepare:!0};function hx(e){return"object"==typeof e&&"function"==typeof e.then}function px(e){let t=!1,r=lx[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function dx(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:px(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function fx(e){return e[$C]=!1,e.nodes&&e.nodes.forEach((e=>fx(e))),e}let mx={},gx=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof ox)n=fx(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=ix;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[QC]&&rx.rebuild(n)}else n=fx(r);this.result=new ox(t,n,s),this.helpers={...mx,postcss:mx,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,s=this.result.processor.version,n=t.split("."),o=s.split(".");(n[0]!==o[0]||parseInt(n[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!cx[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ux[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(hx(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[$C];){e[$C]=!0;let t=[dx(e)];for(;t.length>0;){let e=this.visitTick(t);if(hx(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return hx(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=tx;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new ex(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){if(hx(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[$C];)e[$C]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||nx("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(hx(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[$C])return s[$C]=!0,void e.push(dx(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[$C]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[$C]=!0;let t=px(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[$C]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.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"}};gx.registerPostcss=e=>{mx=e};var yx=gx;gx.default=gx,ax.registerLazyResult(gx),sx.registerLazyResult(gx);let vx=ES,wx=Db,bx=XS,Sx=HC;const Cx=tC;let xx=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=wx;this.result=new Cx(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new vx(n,s,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||bx("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}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 e,t=Sx;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Ix=xx;xx.default=xx;let kx=Ix,Ox=yx,Ex=qS,Ax=NC,Rx=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Ox(this,e,t):new kx(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Mx=Rx;Rx.default=Rx,Ax.registerProcessor(Rx),Ex.registerProcessor(Rx);let Px=Yb,Nx=tS,Tx=MS,Lx=EC,Dx=gS,Fx=NC,_x=BC;function Bx(e,t){if(Array.isArray(e))return e.map((e=>Bx(e)));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Dx.prototype};r.map&&(r.map={...r.map,__proto__:Nx.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map((e=>Bx(e,t)))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Fx(s);if("decl"===s.type)return new Px(s);if("rule"===s.type)return new _x(s);if("comment"===s.type)return new Tx(s);if("atrule"===s.type)return new Lx(s);throw new Error("Unknown node type: "+e.type)}var Ux=Bx;Bx.default=Bx;let jx=Ab,zx=Yb,Wx=yx,Vx=VS,Gx=Mx,Zx=Db,Yx=Ux,Jx=qS,qx=$S,Kx=MS,Xx=EC,Hx=tC,$x=gS,Qx=HC,eI=LC,tI=BC,rI=NC,sI=Vb;function nI(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Gx(e)}nI.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Gx).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return nI([n(r)]).process(e,t)},n},nI.stringify=Zx,nI.parse=Qx,nI.fromJSON=Yx,nI.list=eI,nI.comment=e=>new Kx(e),nI.atRule=e=>new Xx(e),nI.decl=e=>new zx(e),nI.rule=e=>new tI(e),nI.root=e=>new rI(e),nI.document=e=>new Jx(e),nI.CssSyntaxError=jx,nI.Declaration=zx,nI.Container=Vx,nI.Processor=Gx,nI.Document=Jx,nI.Comment=Kx,nI.Warning=qx,nI.AtRule=Xx,nI.Result=Hx,nI.Input=$x,nI.Rule=tI,nI.Root=rI,nI.Node=sI,Wx.registerPostcss(nI);var oI=nI;nI.default=nI;const iI=vb(oI);iI.stringify,iI.fromJSON,iI.plugin,iI.parse,iI.list,iI.document,iI.comment,iI.atRule,iI.rule,iI.decl,iI.root,iI.CssSyntaxError,iI.Declaration,iI.Container,iI.Processor,iI.Document,iI.Comment,iI.Warning,iI.AtRule,iI.Result,iI.Input,iI.Rule,iI.Root,iI.Node;class aI{constructor(...e){yb(this,"parentElement",null),yb(this,"parentNode",null),yb(this,"ownerDocument"),yb(this,"firstChild",null),yb(this,"lastChild",null),yb(this,"previousSibling",null),yb(this,"nextSibling",null),yb(this,"ELEMENT_NODE",1),yb(this,"TEXT_NODE",3),yb(this,"nodeType"),yb(this,"nodeName"),yb(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof aI))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const lI={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},cI={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},uI={};function hI(e){if(uI[e])return uI[e];const t=globalThis[e],r=t.prototype,s=e in lI?lI[e]:void 0,n=Boolean(s&&s.every((e=>{var t,s;return Boolean(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))}))),o=e in cI?cI[e]:void 0,i=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&i&&!globalThis.Zone)return uI[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?uI[e]=o:r}catch{return r}}const pI={};function dI(e,t,r){var s;const n=`${e}.${String(r)}`;if(pI[n])return pI[n].call(t);const o=hI(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(pI[n]=i,i.call(t)):t[r]}const fI={};function mI(e,t,r){const s=`${e}.${String(r)}`;if(fI[s])return fI[s].bind(t);const n=hI(e)[r];return"function"!=typeof n?t[r]:(fI[s]=n,n.bind(t))}const gI={childNodes:function(e){return dI("Node",e,"childNodes")},parentNode:function(e){return dI("Node",e,"parentNode")},parentElement:function(e){return dI("Node",e,"parentElement")},textContent:function(e){return dI("Node",e,"textContent")},contains:function(e,t){return mI("Node",e,"contains")(t)},getRootNode:function(e){return mI("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?dI("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?dI("Element",e,"shadowRoot"):null},querySelector:function(e,t){return dI("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return dI("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return hI("MutationObserver").constructor}};const yI="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let vI={map:{},getId:()=>(console.error(yI),-1),getNode:()=>(console.error(yI),null),removeNodeFromMap(){console.error(yI)},has:()=>(console.error(yI),!1),reset(){console.error(yI)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(vI=new Proxy(vI,{get:(e,t,r)=>("map"===t&&console.error(yI),Reflect.get(e,t,r))}));let wI=Date.now;function bI(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:gI.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(wI=()=>(new Date).getTime());function SI(e){var t;let r=null;return"getRootNode"in e&&(null==(t=gI.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&gI.host(gI.getRootNode(e))&&(r=gI.host(gI.getRootNode(e))),r}function CI(e){let t,r=e;for(;t=SI(r);)r=t;return r}function xI(e){const t=e.ownerDocument;if(!t)return!1;const r=CI(e);return gI.contains(t,r)}const II=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){dg(this,"id",1),dg(this,"styleIDMap",new WeakMap),dg(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return vI},closestElementOfNode:bI,getBaseDimension:function e(t,r){var s,n;const o=null==(n=null==(s=t.ownerDocument)?void 0:s.defaultView)?void 0:n.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=e(o,r),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){const s=t[r[0]];return 1===r.length?s:e(s.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:CI,getShadowHost:SI,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,s,n;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=gI.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(s=gI.parentElement(o.body))?void 0:s.scrollTop)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof aI&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(gI.shadowRoot(e)))},hookSetter:function e(t,r,s,n,o=window){const i=o.Object.getOwnPropertyDescriptor(t,r);return o.Object.defineProperty(t,r,n?s:{set(e){setTimeout((()=>{s.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>e(t,r,i||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(gI.contains(t,e)||xI(e))},isAncestorRemoved:function e(t,r){if(function(e){const t=e&&"host"in e&&"mode"in e&&Ig.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Ig.shadowRoot(t)===e)}(t))return!1;const s=r.getId(t);if(!r.has(s))return!0;const n=gI.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||e(n,r))},isBlocked:function(e,t,r,s){if(!e)return!1;const n=bI(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(Og(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(let s=t.children.length-1;s>=0;s--)e(t.children[s],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return wI},on:function(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)},patch:function(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}},polyfill:function(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)},queueToResolveTrees:function(e){const t={},r=(e,r)=>{const s={value:e,parent:r,children:[]};return t[e.node.id]=s,s},s=[];for(const n of e){const{nextId:e,parentId:o}=n;if(e&&e in t){const o=t[e];if(o.parent){const e=o.parent.children.indexOf(o);o.parent.children.splice(e,0,r(n,o.parent))}else{const e=s.indexOf(o);s.splice(e,0,r(n,null))}}else if(o in t){const e=t[o];e.children.push(r(n,e))}else s.push(r(n,null))}return s},shadowHostInDom:xI,throttle:function(e,t,r={}){let s=null,n=0;return function(...o){const i=Date.now();n||!1!==r.leading||(n=i);const a=t-(i-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=i,e.apply(l,o)):s||!1===r.trailing||(s=setTimeout((()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,o)}),a))}},uniqueTextMutations:function(e){const t=new Set,r=[];for(let s=e.length;s--;){const n=e[s];t.has(n.id)||(r.push(n),t.add(n.id))}return r}},Symbol.toStringTag,{value:"Module"}));for(var kI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",OI="undefined"==typeof Uint8Array?[]:new Uint8Array(256),EI=0;EI<kI.length;EI++)OI[kI.charCodeAt(EI)]=EI;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(lg=e.contentWindow)?void 0:lg.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var AI;new kg,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(AI||(AI={}));class RI{constructor(e){hg(this,"fileName"),hg(this,"functionName"),hg(this,"lineNumber"),hg(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const MI=/(^|@)\S+:\d+/,PI=/^\s*at .*(\S+:\d+|\(native\))/m,NI=/^(eval@)?(\[native code])?$/,TI={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(PI)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(PI)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const r=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=r?t.replace(r[0],""):t;const s=t.split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:s.pop()),o=s.join(" ")||void 0,i=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new RI({functionName:o,fileName:i,lineNumber:n[1],columnNumber:n[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(NI)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new RI({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),s=r&&r[1]?r[1]:void 0,n=this.extractLocation(e.replace(t,""));return new RI({functionName:s,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),s=[];for(let e=2,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new RI({fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),s=[];for(let e=0,n=r.length;e<n;e+=2){const n=t.exec(r[e]);n&&s.push(new RI({functionName:n[3]||void 0,fileName:n[2],lineNumber:parseFloat(n[1])}))}return s},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(MI)&&!e.match(/^Error created at/)}),this).map((function(e){const t=e.split("@"),r=this.extractLocation(t.pop()),s=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new RI({functionName:s,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function LI(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();const s=e.parentElement,n=[];if(s.children&&s.children.length>0)for(let e=0;e<s.children.length;e++){const t=s.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===r&&n.push(t)}n.length>1&&(r+=`:eq(${n.indexOf(e)})`),t=r+(t?">"+t:""),e=s}return t}function DI(e){return"[object Object]"===Object.prototype.toString.call(e)}function FI(e,t){if(0===t)return!0;const r=Object.keys(e);for(const s of r)if(DI(e[s])&&FI(e[s],t-1))return!0;return!1}function _I(e,t){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);const s=[],n=[];return JSON.stringify(e,(function(e,t){if(s.length>0){const r=s.indexOf(this);~r?s.splice(r+1):s.push(this),~r?n.splice(r,1/0,e):n.push(e),~s.indexOf(t)&&(t=s[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,s.indexOf(t)).join(".")+"]")}else s.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(DI(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(DI(e)&&FI(e,r.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=`${t.slice(0,r.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const r in t){const s=t[r];Array.isArray(s)?e[r]=LI(s.length?s[0]:null):e[r]=s}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}const BI={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function UI(e,t,r){const s=r?Object.assign({},BI,r):BI,n=s.logger;if(!n)return()=>{};let o;o="string"==typeof n?t[n]:n;let i=0,a=!1;const l=[];if(s.level.includes("error")){const r=t=>{const r=t.message,n=t.error,o=TI.parse(n).map((e=>e.toString())),i=[_I(r,s.stringifyOptions)];e({level:"error",trace:o,payload:i})};t.addEventListener("error",r),l.push((()=>{t.removeEventListener("error",r)}));const n=t=>{let r,n;t.reason instanceof Error?(r=t.reason,n=[_I(`Uncaught (in promise) ${r.name}: ${r.message}`,s.stringifyOptions)]):(r=new Error,n=[_I("Uncaught (in promise)",s.stringifyOptions),_I(t.reason,s.stringifyOptions)]);const o=TI.parse(r).map((e=>e.toString()));e({level:"error",trace:o,payload:n})};t.addEventListener("unhandledrejection",n),l.push((()=>{t.removeEventListener("unhandledrejection",n)}))}for(const e of s.level)l.push(c(o,e));return()=>{l.forEach((e=>e()))};function c(t,r){return t[r]?II.patch(t,r,(t=>(...n)=>{if(t.apply(this,n),!("assert"===r&&n[0]||a)){a=!0;try{const t=TI.parse(new Error).map((e=>e.toString())).splice(1),o=("assert"===r?n.slice(1):n).map((e=>_I(e,s.stringifyOptions)));i++,i<s.lengthThreshold?e({level:r,trace:t,payload:o}):i===s.lengthThreshold&&e({level:"warn",trace:[],payload:[_I("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...n)}finally{a=!1}}})):()=>{}}}var jI=function(){function e(){this.fetchObserver=null}return e.prototype.start=function(e){this.eventCallback=e,this.observeFetch()},e.prototype.stop=function(){var e;null===(e=this.fetchObserver)||void 0===e||e.call(this),this.fetchObserver=null,this.eventCallback=void 0},e.prototype.notifyEvent=function(e){var t;null===(t=this.eventCallback)||void 0===t||t.call(this,e)},e.prototype.observeFetch=function(){var e=this,t=d();if(t){var r=t.fetch;r&&(t.fetch=function(t,s){return n(e,void 0,void 0,(function(){var e,n,i,a,l,c,u;return o(this,(function(o){switch(o.label){case 0:e=Date.now(),n={timestamp:e,type:"fetch",method:(null==s?void 0:s.method)||"GET",url:t.toString(),requestHeaders:null==s?void 0:s.headers},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r(t,s)];case 2:return i=o.sent(),c=Date.now(),n.status=i.status,n.duration=c-e,a={},i.headers.forEach((function(e,t){a[t]=e})),n.responseHeaders=a,this.notifyEvent(n),[2,i];case 3:throw l=o.sent(),c=Date.now(),n.duration=c-e,u=l,n.error={name:u.name||"UnknownError",message:u.message||"An unknown error occurred"},this.notifyEvent(n),l;case 4:return[2]}}))}))},this.fetchObserver=function(){t.fetch=r})}},e}(),zI=function(){function e(){var e=this;this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.pageLeaveFns=[],this.teardownEventListeners=function(t){var r=d();r&&(r.removeEventListener("blur",e.blurListener),r.removeEventListener("focus",e.focusListener),!t&&r.addEventListener("blur",e.blurListener),!t&&r.addEventListener("focus",e.focusListener),r.self&&"onpagehide"in r.self?(r.removeEventListener("pagehide",e.pageLeaveListener),!t&&r.addEventListener("pagehide",e.pageLeaveListener)):(r.removeEventListener("beforeunload",e.pageLeaveListener),!t&&r.addEventListener("beforeunload",e.pageLeaveListener)))},this.blurListener=function(){e.sendEvents()},this.focusListener=function(){e.recordEvents()},this.pageLeaveListener=function(t){e.pageLeaveFns.forEach((function(e){e(t)}))},this.addCustomRRWebEvent=function(t,r,i){return void 0===r&&(r={}),void 0===i&&(i=!0),n(e,void 0,void 0,(function(){var e,n,a,l;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),e=void 0,(n=this.config)?(e={config:mf(n),version:bf},i?[4,ff()]:[3,2]):[3,2];case 1:a=o.sent(),e=s(s({},a),e),o.label=2;case 2:return this.recordCancelCallback?cu.addCustomEvent(t,s(s({},r),e)):this.loggerProvider.debug("Not able to add custom replay capture event ".concat(t," due to no ongoing recording.")),[3,4];case 3:return l=o.sent(),this.loggerProvider.debug("Error while adding custom replay capture event: ",l),[3,4];case 4:return[2]}}))}))},this.stopRecordingEvents=function(){var t;try{e.loggerProvider.log("Session Replay capture stopping."),e.recordCancelCallback&&e.recordCancelCallback(),e.recordCancelCallback=null,null===(t=e.networkObservers)||void 0===t||t.stop()}catch(t){var r=t;e.loggerProvider.warn("Error occurred while stopping replay capture: ".concat(r.toString()))}},this.loggerProvider=new V(new g)}return e.prototype.init=function(e,t){return f(this._init(e,t))},e.prototype._init=function(e,t){var r,s,i,c,u,h;return n(this,void 0,void 0,(function(){var n,p,f,m,y,v,w,b,S,C,x;return o(this,(function(o){switch(o.label){case 0:return this.loggerProvider=new V(t.loggerProvider||new g),Object.prototype.hasOwnProperty.call(t,"logLevel")&&this.loggerProvider.enable(t.logLevel),this.identifiers=new Am({sessionId:t.sessionId,deviceId:t.deviceId}),n=this,[4,yf(e,t)];case 1:return n.joinedConfigGenerator=o.sent(),p=this,[4,this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId)];case 2:p.config=o.sent(),t.sessionId&&(null===(r=this.config.interactionConfig)||void 0===r?void 0:r.enabled)&&(f=Em.default({sessionId:t.sessionId,type:"interaction"},this.config),this.pageLeaveFns=[f.send(this.getDeviceId.bind(this)).bind(f)],this.scrollHook=f.hook.bind(f)),m=[],"idb"!==(y=this.config.storeType)||(null===(s=d())||void 0===s?void 0:s.indexedDB)||(y="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log("Using ".concat(y," for event storage.")),o.label=3;case 3:return o.trys.push([3,5,,6]),[4,om({config:this.config,sessionId:this.identifiers.sessionId,type:"replay",storeType:y})];case 4:return v=o.sent(),m.push({name:"replay",manager:v}),[3,6];case 5:return w=o.sent(),x=w,this.loggerProvider.warn("Error occurred while creating replay events manager: ".concat(x.toString())),[3,6];case 6:if(!(null===(i=this.config.interactionConfig)||void 0===i?void 0:i.enabled))return[3,10];b=this.config.interactionConfig.batch?Cm:Sm,o.label=7;case 7:return o.trys.push([7,9,,10]),[4,om({config:this.config,sessionId:this.identifiers.sessionId,type:"interaction",minInterval:null!==(c=this.config.interactionConfig.trackEveryNms)&&void 0!==c?c:3e4,maxInterval:6e4,payloadBatcher:b,storeType:y})];case 8:return S=o.sent(),m.push({name:"interaction",manager:S}),[3,10];case 9:return C=o.sent(),x=C,this.loggerProvider.warn("Error occurred while creating interaction events manager: ".concat(x.toString())),[3,10];case 10:return this.eventsManager=new(im.bind.apply(im,l([void 0],a(m),!1))),this.eventCompressor&&this.eventCompressor.terminate(),this.eventCompressor=new cg(this.eventsManager,this.config,this.getDeviceId()),(null===(h=null===(u=this.config.loggingConfig)||void 0===u?void 0:u.network)||void 0===h?void 0:h.enabled)&&(this.networkObservers=new jI),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),this.initialize(!0),[2]}}))}))},e.prototype.setSessionId=function(e,t){return f(this.asyncSetSessionId(e,t))},e.prototype.asyncSetSessionId=function(e,t){return n(this,void 0,void 0,(function(){var r,s,n;return o(this,(function(o){switch(o.label){case 0:return(r=this.identifiers&&this.identifiers.sessionId)&&this.sendEvents(r),s=t||this.getDeviceId(),this.identifiers=new Am({sessionId:e,deviceId:s}),this.joinedConfigGenerator&&r?(n=this,[4,this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId)]):[3,2];case 1:n.config=o.sent(),o.label=2;case 2:return this.recordEvents(),[2]}}))}))},e.prototype.getSessionReplayProperties=function(){var e,t=this.config,r=this.identifiers;if(!t||!r)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};var s=this.getShouldRecord(),n={};return s&&((e={})[B]=r.sessionReplayId?r.sessionReplayId:null,n=e,t.debugMode&&(n[j]=JSON.stringify({appHash:pf(t.apiKey).toString()}))),this.addCustomRRWebEvent(F.GET_SR_PROPS,{shouldRecord:s,eventProperties:n},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,n},e.prototype.sendEvents=function(e){var t,r=e||(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId),s=this.getDeviceId();this.eventsManager&&r&&s&&this.eventsManager.sendCurrentSequenceEvents({sessionId:r,deviceId:s})},e.prototype.initialize=function(e){var t;if(void 0===e&&(e=!1),null===(t=this.identifiers)||void 0===t?void 0:t.sessionId){var r=this.getDeviceId();r?(this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:r}),this.recordEvents()):this.loggerProvider.log("Session is not being recorded due to lack of device id.")}else this.loggerProvider.log("Session is not being recorded due to lack of session id.")},e.prototype.shouldOptOut=function(){var e,t,r,s;(null===(e=this.config)||void 0===e?void 0:e.instanceName)&&(r=(s=this.config.instanceName,void 0===s&&(s="$default_instance"),P.getInstance(s)).identityStore.getIdentity().optOut);return void 0!==r?r:null===(t=this.config)||void 0===t?void 0:t.optOut},e.prototype.getShouldRecord=function(){if(!this.identifiers||!this.config||!this.identifiers.sessionId)return this.loggerProvider.warn("Session is not being recorded due to lack of config, please call sessionReplay.init."),!1;if(!this.config.captureEnabled)return this.loggerProvider.log("Session ".concat(this.identifiers.sessionId," not being captured due to capture being disabled for project or because the remote config could not be fetched.")),!1;if(this.shouldOptOut())return this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to optOut config.")),!1;var e,t,r,s=(e=this.identifiers.sessionId,t=this.config.sampleRate,r=pf(e.toString()),31*Math.abs(r)%1e6/1e6<t);return s||this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to sample rate.")),s},e.prototype.getBlockSelectors=function(){var e,t,r,s=null!==(r=null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.blockSelector)&&void 0!==r?r:[];if(0!==s.length)return s},e.prototype.getMaskTextSelectors=function(){var e,t,r,s;if("conservative"===(null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.defaultMaskLevel))return"*";var n=null===(s=null===(r=this.config)||void 0===r?void 0:r.privacyConfig)||void 0===s?void 0:s.maskSelector;return n||void 0},e.prototype.getRecordingPlugins=function(e){var t,r=[];return(null===(t=null==e?void 0:e.console)||void 0===t?void 0:t.enabled)&&r.push({name:"rrweb/console@1",observer:UI,options:{level:e.console.levels}}),r.length>0?r:void 0},e.prototype.recordEvents=function(){var e,t,r=this,s=this.config,n=this.getShouldRecord(),o=null===(e=this.identifiers)||void 0===e?void 0:e.sessionId;if(n&&o&&s){this.stopRecordingEvents(),null===(t=this.networkObservers)||void 0===t||t.start((function(e){r.addCustomRRWebEvent(F.FETCH_REQUEST,e)}));var i=s.privacyConfig,a=s.interactionConfig,l=s.loggingConfig,c=(null==a?void 0:a.enabled)?{mouseInteraction:this.eventsManager&&xm(this.loggerProvider,{eventsManager:this.eventsManager,sessionId:o,deviceIdFn:this.getDeviceId.bind(this)}),scroll:this.scrollHook}:{};this.loggerProvider.log("Session Replay capture beginning for ".concat(o,".")),this.recordCancelCallback=cu({emit:function(e){if(r.shouldOptOut())return r.loggerProvider.log("Opting session ".concat(o," out of recording due to optOut config.")),r.stopRecordingEvents(),void r.sendEvents();r.eventCompressor&&r.eventCompressor.enqueueEvent(e,o)},inlineStylesheet:s.shouldInlineStylesheet,hooks:c,maskAllInputs:!0,maskTextClass:z,blockClass:"amp-block",blockSelector:this.getBlockSelectors(),maskInputFn:hf("input",i),maskTextFn:hf("text",i),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,errorHandler:function(e){var t=e;if(t.message.includes("insertRule")&&t.message.includes("CSSStyleSheet"))throw t;if(t._external_)throw t;return r.loggerProvider.warn("Error while capturing replay: ",t.toString()),!0},plugins:this.getRecordingPlugins(l)}),this.addCustomRRWebEvent(F.DEBUG_INFO)}},e.prototype.getDeviceId=function(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.deviceId},e.prototype.getSessionId=function(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.sessionId},e.prototype.flush=function(e){var t;return void 0===e&&(e=!1),n(this,void 0,void 0,(function(){return o(this,(function(r){return[2,null===(t=this.eventsManager)||void 0===t?void 0:t.flush(e)]}))}))},e.prototype.shutdown=function(){this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},e}(),WI=function(e){return function(){var t=e.config||G();return{logger:t.loggerProvider,logLevel:t.logLevel}}},VI=function(){var e=new zI;return{init:T(e.init.bind(e),"init",WI(e)),setSessionId:T(e.setSessionId.bind(e),"setSessionId",WI(e)),getSessionId:T(e.getSessionId.bind(e),"getSessionId",WI(e)),getSessionReplayProperties:T(e.getSessionReplayProperties.bind(e),"getSessionReplayProperties",WI(e)),flush:T(e.flush.bind(e),"flush",WI(e)),shutdown:T(e.shutdown.bind(e),"shutdown",WI(e))}}(),GI=VI.init,ZI=VI.setSessionId,YI=VI.getSessionId,JI=VI.getSessionReplayProperties,qI=VI.flush,KI=VI.shutdown;return e.SafeLoggerProvider=V,e.flush=qI,e.getSessionId=YI,e.getSessionReplayProperties=JI,e.init=GI,e.setSessionId=ZI,e.shutdown=KI,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
2
- //# sourceMappingURL=amplitude-min.js.map