2024-11-27 11:30:55 +08:00
const _ _vite _ _mapDeps = ( i , m = _ _vite _ _mapDeps , d = ( m . f || ( m . f = [ "assets/dagre-SWNTG5WE-BOs2GEFb.js" , "assets/graph-CrdeYfFz.js" , "assets/_baseUniq-H04t_fXT.js" , "assets/layout-CQdKReqy.js" , "assets/min-Dppjuofo.js" , "assets/c4Diagram-GPMAACGM-DhPS7muf.js" , "assets/chunk-VCFP4HPQ-ZS2BETpu.js" , "assets/flowDiagram-TSWR6T2D-WNnQE_wY.js" , "assets/chunk-EICJXIV7-CH-9hq8e.js" , "assets/channel-CZxjiw6Y.js" , "assets/erDiagram-WO52GFNT-DdEBPJHX.js" , "assets/gitGraphDiagram-5C7YHVU6-Cv4hZNec.js" , "assets/chunk-BAOP5US2-BqSUEhjZ.js" , "assets/chunk-RGXPSUNZ-Bh4Vk9s_.js" , "assets/gitGraph-YCYPL57B-CN6_i2o1.js" , "assets/ganttDiagram-FAOCOTIY-8SyqWci1.js" , "assets/linear-DU8fAjck.js" , "assets/init-Gi6I4Gst.js" , "assets/infoDiagram-P5D6MX3V-CQY8oxwY.js" , "assets/pieDiagram-BLWKPB35-DmTXJbFG.js" , "assets/arc-B4m5V1cp.js" , "assets/ordinal-Cboi1Yqb.js" , "assets/quadrantDiagram-QXWEEFXS-MkX8pDX5.js" , "assets/xychartDiagram-MYLB5AYS-ByULCh4q.js" , "assets/requirementDiagram-XAUNFCZY-CYmZ411V.js" , "assets/sequenceDiagram-D25TJ2OB-faoB6eIU.js" , "assets/classDiagram-FEGYTUDG-B7MrDgbb.js" , "assets/chunk-CXDZ2C6O-2wI-D5o4.js" , "assets/classDiagram-v2-R65JCUOM-B7MrDgbb.js" , "assets/stateDiagram-GNSP7T6Y-EhLsLjO2.js" , "assets/chunk-JZAHL7AJ-Dd8-0ren.js" , "assets/stateDiagram-v2-HP6YRVRG-DIB-lnSB.js" , "assets/journeyDiagram-UIGPPNLY-CNbP7Pey.js" , "assets/timeline-definition-27KQCCZ3-CLfLRRzw.js" , "assets/mindmap-definition-R7LC4OIY-1ZfQFz0p.js" , "assets/cytoscape.esm-DR8w5E8T.js" , "assets/sankeyDiagram-LVV36NHA-D1EX7pxu.js" , "assets/diagram-NZMEDLQF-CZkgMpbK.js" , "assets/blockDiagram-XN6IQ5JY-CA01uo8E.js" , "assets/architectureDiagram-AYX4OTIS-CPFcztZD.js" ] ) ) ) => i . map ( i => d [ i ] ) ;
2024-09-25 14:23:53 +08:00
var dw = Object . defineProperty ; var rS = Ra => { throw TypeError ( Ra ) } ; var pw = ( Ra , qa , td ) => qa in Ra ? dw ( Ra , qa , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : td } ) : Ra [ qa ] = td ; var Qm = ( Ra , qa , td ) => pw ( Ra , typeof qa != "symbol" ? qa + "" : qa , td ) , fw = ( Ra , qa , td ) => qa . has ( Ra ) || rS ( "Cannot " + td ) ; var nS = ( Ra , qa , td ) => qa . has ( Ra ) ? rS ( "Cannot add the same private member more than once" ) : qa instanceof WeakSet ? qa . add ( Ra ) : qa . set ( Ra , td ) ; var wE = ( Ra , qa , td ) => ( fw ( Ra , qa , "access private method" ) , td ) ; ( function ( ) { const qa = document . createElement ( "link" ) . relList ; if ( qa && qa . supports && qa . supports ( "modulepreload" ) ) return ; for ( const nd of document . querySelectorAll ( 'link[rel="modulepreload"]' ) ) rd ( nd ) ; new MutationObserver ( nd => { for ( const ad of nd ) if ( ad . type === "childList" ) for ( const sd of ad . addedNodes ) sd . tagName === "LINK" && sd . rel === "modulepreload" && rd ( sd ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function td ( nd ) { const ad = { } ; return nd . integrity && ( ad . integrity = nd . integrity ) , nd . referrerPolicy && ( ad . referrerPolicy = nd . referrerPolicy ) , nd . crossOrigin === "use-credentials" ? ad . credentials = "include" : nd . crossOrigin === "anonymous" ? ad . credentials = "omit" : ad . credentials = "same-origin" , ad } function rd ( nd ) { if ( nd . ep ) return ; nd . ep = ! 0 ; const ad = td ( nd ) ; fetch ( nd . href , ad ) } } ) ( ) ; const global$1 = globalThis || void 0 || self ; / * *
2024-09-29 10:14:52 +08:00
* @ vue / shared v3 . 5.10
2024-09-18 09:46:23 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-09-25 14:23:53 +08:00
* * //*! #__NO_SIDE_EFFECTS__ */function makeMap(Ra){const qa=Object.create(null);for(const td of Ra.split(","))qa[td]=1;return td=>td in qa}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=Ra=>Ra.charCodeAt(0)===111&&Ra.charCodeAt(1)===110&&(Ra.charCodeAt(2)>122||Ra.charCodeAt(2)<97),isModelListener=Ra=>Ra.startsWith("onUpdate:"),extend$3=Object.assign,remove$2=(Ra,qa)=>{const td=Ra.indexOf(qa);td>-1&&Ra.splice(td,1)},hasOwnProperty$i=Object.prototype.hasOwnProperty,hasOwn$2=(Ra,qa)=>hasOwnProperty$i.call(Ra,qa),isArray$2=Array.isArray,isMap$1=Ra=>toTypeString(Ra)==="[object Map]",isSet$1=Ra=>toTypeString(Ra)==="[object Set]",isDate$1=Ra=>toTypeString(Ra)==="[object Date]",isFunction$4=Ra=>typeof Ra=="function",isString$3=Ra=>typeof Ra=="string",isSymbol$1=Ra=>typeof Ra=="symbol",isObject$5=Ra=>Ra!==null&&typeof Ra=="object",isPromise=Ra=>(isObject$5(Ra)||isFunction$4(Ra))&&isFunction$4(Ra.then)&&isFunction$4(Ra.catch),objectToString$1=Object.prototype.toString,toTypeString=Ra=>objectToString$1.call(Ra),toRawType=Ra=>toTypeString(Ra).slice(8,-1),isPlainObject$3=Ra=>toTypeString(Ra)==="[object Object]",isIntegerKey=Ra=>isString$3(Ra)&&Ra!=="NaN"&&Ra[0]!=="-"&&""+parseInt(Ra,10)===Ra,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=Ra=>{const qa=Object.create(null);return td=>qa[td]||(qa[td]=Ra(td))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(Ra=>Ra.replace(camelizeRE,(qa,td)=>td?td.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(Ra=>Ra.replace(hyphenateRE,"-$1").toLowerCase()),capitalize$1=cacheStringFunction(Ra=>Ra.charAt(0).toUpperCase()+Ra.slice(1)),toHandlerKey=cacheStringFunction(Ra=>Ra?`on${capitalize$1(Ra)}`:""),hasChanged=(Ra,qa)=>!Object.is(Ra,qa),invokeArrayFns=(Ra,...qa)=>{for(let td=0;td<Ra.length;td++)Ra[td](...qa)},def$2=(Ra,qa,td,rd=!1)=>{Object.defineProperty(Ra,qa,{configurable:!0,enumerable:!1,writable:rd,value:td})},looseToNumber=Ra=>{const qa=parseFloat(Ra);return isNaN(qa)?Ra:qa},toNumber$3=Ra=>{const qa=isString$3(Ra)?Number(Ra):NaN;return isNaN(qa)?Ra:qa};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global$1<"u"?global$1:{});function normalizeStyle(Ra){if(isArray$2(Ra)){const qa={};for(let td=0;td<Ra.length;td++){const rd=Ra[td],nd=isString$3(rd)?parseStringStyle(rd):normalizeStyle(rd);if(nd)for(const ad in nd)qa[ad]=nd[ad]}return qa}else if(isString$3(Ra)||isObject$5(Ra))return Ra}const listDelimiterRE=/;(?![^(]*\))/g,propertyDelimiterRE=/:([^]+)/,styleCommentRE=/\/\*[^]*?\*\//g;function parseStringStyle(Ra){const qa={};return Ra.replace(styleCommentRE,"").split(listDelimiterRE).forEach(td=>{if(td){const rd=td.split(propertyDelimiterRE);rd.length>1&&(qa[rd[0].trim()]=rd[1].trim())}}),qa}function normalizeClass(Ra){let qa="";if(isString$3(Ra))qa=Ra;else if(isArray$2(Ra))for(let td=0;td<Ra.length;td++){const rd=normalizeClass(Ra[td]);rd&&(qa+=rd+" ")}else if(isObject$5(Ra))for(const td in Ra)Ra[td]&&(qa+=td+" ");return qa.trim()}function normalizeProps(Ra){if(!Ra)return null;let{class:qa,style:td}=Ra;return qa&&!isString$3(qa)&&(Ra.class=normalizeClass(qa)),td&&(Ra.style=normalizeStyle(td)),Ra}const specialBooleanAttrs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",isSpecialBooleanAttr=makeMap(specialBooleanAttrs);function includeBooleanAttr(Ra){return!!Ra||Ra===""}function looseCompareArrays(Ra,qa){if(Ra.length!==qa.length)return!1;let td=!0;for(let rd=0;td&&rd<Ra.length;rd++)td=looseEqual(Ra[rd],qa[rd]);return td}function looseEqual(Ra,qa){if(Ra===qa)return!0;let td=isDate$1(Ra),rd=isDate$1(qa);if(td||rd)return td&&rd?Ra.getTime()===qa.getTime():!1;if(td=isSymbol$1(Ra),rd=isSymbol$1(qa),td||rd)return Ra===qa;if(td=isArray$2(Ra),rd=isArray$2(qa),td||rd)return td&&rd?looseCompareArrays(Ra,qa):!1;if(td=isObject$5(Ra),rd=isObject$5(qa),td||rd){if(!td||!rd)return!1;const nd=Object.keys(Ra).length,ad=
2024-09-29 10:14:52 +08:00
* @ vue / reactivity v3 . 5.10
2024-09-18 09:46:23 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-11-27 11:30:55 +08:00
* * / l e t a c t i v e E f f e c t S c o p e ; c l a s s E f f e c t S c o p e { c o n s t r u c t o r ( q a = ! 1 ) { t h i s . d e t a c h e d = q a , t h i s . _ a c t i v e = ! 0 , t h i s . e f f e c t s = [ ] , t h i s . c l e a n u p s = [ ] , t h i s . _ i s P a u s e d = ! 1 , t h i s . p a r e n t = a c t i v e E f f e c t S c o p e , ! q a & & a c t i v e E f f e c t S c o p e & & ( t h i s . i n d e x = ( a c t i v e E f f e c t S c o p e . s c o p e s | | ( a c t i v e E f f e c t S c o p e . s c o p e s = [ ] ) ) . p u s h ( t h i s ) - 1 ) } g e t a c t i v e ( ) { r e t u r n t h i s . _ a c t i v e } p a u s e ( ) { i f ( t h i s . _ a c t i v e ) { t h i s . _ i s P a u s e d = ! 0 ; l e t q a , t d ; i f ( t h i s . s c o p e s ) f o r ( q a = 0 , t d = t h i s . s c o p e s . l e n g t h ; q a < t d ; q a + + ) t h i s . s c o p e s [ q a ] . p a u s e ( ) ; f o r ( q a = 0 , t d = t h i s . e f f e c t s . l e n g t h ; q a < t d ; q a + + ) t h i s . e f f e c t s [ q a ] . p a u s e ( ) } } r e s u m e ( ) { i f ( t h i s . _ a c t i v e & & t h i s . _ i s P a u s e d ) { t h i s . _ i s P a u s e d = ! 1 ; l e t q a , t d ; i f ( t h i s . s c o p e s ) f o r ( q a = 0 , t d = t h i s . s c o p e s . l e n g t h ; q a < t d ; q a + + ) t h i s . s c o p e s [ q a ] . r e s u m e ( ) ; f o r ( q a = 0 , t d = t h i s . e f f e c t s . l e n g t h ; q a < t d ; q a + + ) t h i s . e f f e c t s [ q a ] . r e s u m e ( ) } } r u n ( q a ) { i f ( t h i s . _ a c t i v e ) { c o n s t t d = a c t i v e E f f e c t S c o p e ; t r y { r e t u r n a c t i v e E f f e c t S c o p e = t h i s , q a ( ) } f i n a l l y { a c t i v e E f f e c t S c o p e = t d } } } o n ( ) { a c t i v e E f f e c t S c o p e = t h i s } o f f ( ) { a c t i v e E f f e c t S c o p e = t h i s . p a r e n t } s t o p ( q a ) { i f ( t h i s . _ a c t i v e ) { l e t t d , r d ; f o r ( t d = 0 , r d = t h i s . e f f e c t s . l e n g t h ; t d < r d ; t d + + ) t h i s . e f f e c t s [ t d ] . s t o p ( ) ; f o r ( t d = 0 , r d = t h i s . c l e a n u p s . l e n g t h ; t d < r d ; t d + + ) t h i s . c l e a n u p s [ t d ] ( ) ; i f ( t h i s . s c o p e s ) f o r ( t d = 0 , r d = t h i s . s c o p e s . l e n g t h ; t d < r d ; t d + + ) t h i s . s c o p e s [ t d ] . s t o p ( ! 0 ) ; i f ( ! t h i s . d e t a c h e d & & t h i s . p a r e n t & & ! q a ) { c o n s t n d = t h i s . p a r e n t . s c o p e s . p o p ( ) ; n d & & n d ! = = t h i s & & ( t h i s . p a r e n t . s c o p e s [ t h i s . i n d e x ] = n d , n d . i n d e x = t h i s . i n d e x ) } t h i s . p a r e n t = v o i d 0 , t h i s . _ a c t i v e = ! 1 } } } f u n c t i o n e f f e c t S c o p e ( R a ) { r e t u r n n e w E f f e c t S c o p e ( R a ) } f u n c t i o n g e t C u r r e n t S c o p e ( ) { r e t u r n a c t i v e E f f e c t S c o p e } f u n c t i o n o n S c o p e D i s p o s e ( R a , q a = ! 1 ) { a c t i v e E f f e c t S c o p e & & a c t i v e E f f e c t S c o p e . c l e a n u p s . p u s h ( R a ) } l e t a c t i v e S u b ; c o n s t p a u s e d Q u e u e E f f e c t s = n e w W e a k S e t ; c l a s s R e a c t i v e E f f e c t { c o n s t r u c t o r ( q a ) { t h i s . f n = q a , t h i s . d e p s = v o i d 0 , t h i s . d e p s T a i l = v o i d 0 , t h i s . f l a g s = 5 , t h i s . n e x t = v o i d 0 , t h i s . c l e a n u p = v o i d 0 , t h i s . s c h e d u l e r = v o i d 0 , a c t i v e E f f e c t S c o p e & & a c t i v e E f f e c t S c o p e . a c t i v e & & a c t i v e E f f e c t S c o p e . e f f e c t s . p u s h ( t h i s ) } p a u s e ( ) { t h i s . f l a g s | = 6 4 } r e s u m e ( ) { t h i s . f l a g s & 6 4 & & ( t h i s . f l a g s & = - 6 5 , p a u s e d Q u e u e E f f e c t s . h a s ( t h i s ) & & ( p a u s e d Q u e u e E f f e c t s . d e l e t e ( t h i s ) , t h i s . t r i g g e r ( ) ) ) } n o t i f y ( ) { t h i s . f l a g s & 2 & & ! ( t h i s . f l a g s & 3 2 ) | | t h i s . f l a g s & 8 | | b a t c h ( t h i s ) } r u n ( ) { i f ( ! ( t h i s . f l a g s & 1 ) ) r e t u r n t h i s . f n ( ) ; t h i s . f l a g s | = 2 , c l e a n u p E f f e c t ( t h i s ) , p r e p a r e D e p s ( t h i s ) ; c o n s t q a = a c t i v e S u b , t d = s h o u l d T r a c k ; a c t i v e S u b = t h i s , s h o u l d T r a c k = ! 0 ; t r y { r e t u r n t h i s . f n ( ) } f i n a l l y { c l e a n u p D e p s ( t h i s ) , a c t i v e S u b = q a , s h o u l d T r a c k = t d , t h i s . f l a g s & = - 3 } } s t o p ( ) { i f ( t h i s . f l a g s & 1 ) { f o r ( l e t q a = t h i s . d e p s ; q a ; q a = q a . n e x t D e p ) r e m o v e S u b ( q a ) ; t h i s . d e p s = t h i s . d e p s T a i l = v o i d 0 , c l e a n u p E f f e c t ( t h i s ) , t h i s . o n S t o p & & t h i s . o n S t o p ( ) , t h i s . f l a g s & = - 2 } } t r i g g e r ( ) { t h i s . f l a g s & 6 4 ? p a u s e d Q u e u e E f f e c t s . a d d ( t h i s ) : t h i s . s c h e d u l e r ? t h i s . s c h e d u l e r ( ) : t h i s . r u n I f D i r t y ( ) } r u n I f D i r t y ( ) { i s D i r t y ( t h i s ) & & t h i s . r u n ( ) } g e t d i r t y ( ) { r e t u r n i s D i r t y ( t h i s ) } } l e t b a t c h D e p t h = 0 , b a t c h e d S u b ; f u n c t i o n b a t c h ( R a ) { R a . f l a g s | = 8 , R a . n e x t = b a t c h e d S u b , b a t c h e d S u b = R a } f u n c t i o n s t a r t B a t c h ( ) { b a t c h D e p t h + + } f u n c t i o n e n d B a t c h ( ) { i f ( - - b a t c h D e p t h > 0 ) r e t u r n ; l e t R a ; f o r ( ; b a t c h e d S u b ; ) { l e t q a = b a t c h e d S u b , t d ; f o r ( ; q a ; ) q a . f l a g s & 1 | | ( q a . f l a g s & = - 9 ) , q a = q a . n e x t ; f o r ( q a = b a t c h e d S u b , b a t c h e d S u b = v o i d 0 ; q a ; ) { i f ( t d = q a . n e x t , q a . n e x t = v o i d 0 , q a . f l a g s & = - 9 , q a . f l a g s & 1 ) t r y { q a . t r i g g e r ( ) } c a t c h ( r d ) { R a | | ( R a = r d ) } q a = t d } } i f ( R a ) t h r o w R a } f u n c t i o n p r e p a r e D e p s ( R a ) { f o r ( l e t q a = R a . d e p s ; q a ; q a = q a . n e x t D e p ) q a . v e r s i o n = - 1 , q a . p r e v A c t i v e L i n k = q a . d e p . a c t i v e L i n k , q a . d e p . a c t i v e L i n k = q a } f u n c t i o n c l e a n u p D e p s ( R a ) { l e t q a , t d = R a . d e p s T a i l , r d = t d ; f o r ( ; r d ; ) { c o n s t n d = r d . p r e v D e p ; r d . v e r s i o n = = = - 1 ? ( r d = = = t d & & ( t d = n d ) , r e m o v e S u b ( r d ) , r e m o v e D e p ( r d ) ) : q a = r d , r d . d e p . a c t i v e L i n k = r d . p r e v A c t i v e L i n k , r d . p r e v A c t i v e L i n k = v o i d 0 , r d = n d } R a . d e p s = q a , R a . d e p s T a i l = t d } f u n c t i o n i s D i r t y ( R a ) { f o r ( l e t q a = R a . d e p s ; q a ; q a = q a . n e x t D e p ) i f ( q a . d e p . v e r s i o n ! = = q a . v e r s i o n | | q a . d e p . c o m p u t e d & & ( r e f r e s h C o m p u t e d ( q a . d e p . c o m p u t e d ) | | q a . d e p . v e r s i o n ! = = q a . v e r s i o n ) ) r e t u r n ! 0 ; r e t u r n ! ! R a . _ d i r t y } f u n c t i o n r e f r e s h C o m p u t e d ( R a ) { i f ( R a . f l a g s & 4 & & ! ( R a . f l a g s & 1 6 ) | | ( R a . f l a g s & = - 1 7 , R a . g l o b a l V e r s i o n = = = g l o b a l V e r s i o n ) ) r e t u r n ; R a . g l o b a l V e r s i o n = g l o b a l V e r s i o n ; c o n s t q a = R a . d e p ; i f ( R a . f l a g s | = 2 , q a . v e r s i o n > 0 & & ! R a . i s S S R & & R a . d e p s & & ! i s D i r t y ( R a ) ) { R a . f l a g s & = - 3 ; r e t u r n } c o n s t t d = a c t i v e S u b , r d = s h o u l d T r a c k ; a c t i v e S u b = R a , s h o u l d T r a c k = ! 0 ; t r y { p r e p a r e D e p s ( R a ) ; c o n s t n d = R a . f n ( R a . _ v a l u e ) ; ( q a . v e r s i o n = = = 0 | | h a s C h a n g e d ( n d , R a . _ v a l u e ) ) & & ( R a . _ v a l u e = n d , q a . v e r s i o n + + ) } c a t c h ( n d ) { t h r o w q a . v e r s i o n + + ,
2024-09-29 10:14:52 +08:00
* @ vue / runtime - core v3 . 5.10
2024-09-18 09:46:23 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-09-25 14:23:53 +08:00
* * / c o n s t s t a c k = [ ] ; l e t i s W a r n i n g = ! 1 ; f u n c t i o n w a r n $ 1 ( R a , . . . q a ) { i f ( i s W a r n i n g ) r e t u r n ; i s W a r n i n g = ! 0 , p a u s e T r a c k i n g ( ) ; c o n s t t d = s t a c k . l e n g t h ? s t a c k [ s t a c k . l e n g t h - 1 ] . c o m p o n e n t : n u l l , r d = t d & & t d . a p p C o n t e x t . c o n f i g . w a r n H a n d l e r , n d = g e t C o m p o n e n t T r a c e ( ) ; i f ( r d ) c a l l W i t h E r r o r H a n d l i n g ( r d , t d , 1 1 , [ R a + q a . m a p ( a d = > { v a r s d , u d ; r e t u r n ( u d = ( s d = a d . t o S t r i n g ) = = n u l l ? v o i d 0 : s d . c a l l ( a d ) ) ! = n u l l ? u d : J S O N . s t r i n g i f y ( a d ) } ) . j o i n ( " " ) , t d & & t d . p r o x y , n d . m a p ( ( { v n o d e : a d } ) = > ` a t < $ { f o r m a t C o m p o n e n t N a m e ( t d , a d . t y p e ) } > ` ) . j o i n ( `
` ),nd]);else{const ad=[ ` [ Vue warn ] : $ { Ra } ` ,...qa];nd.length&&ad.push( `
` ,...formatTrace(nd)),console.warn(...ad)}resetTracking(),isWarning=!1}function getComponentTrace(){let Ra=stack[stack.length-1];if(!Ra)return[];const qa=[];for(;Ra;){const td=qa[0];td&&td.vnode===Ra?td.recurseCount++:qa.push({vnode:Ra,recurseCount:0});const rd=Ra.component&&Ra.component.parent;Ra=rd&&rd.vnode}return qa}function formatTrace(Ra){const qa=[];return Ra.forEach((td,rd)=>{qa.push(...rd===0?[]:[ `
2024-11-27 11:30:55 +08:00
` ],...formatTraceEntry(td))}),qa}function formatTraceEntry({vnode:Ra,recurseCount:qa}){const td=qa>0? ` ... ( $ { qa } recursive calls ) ` :"",rd=Ra.component?Ra.component.parent==null:!1,nd= ` at < $ { formatComponentName ( Ra . component , Ra . type , rd ) } ` ,ad=">"+td;return Ra.props?[nd,...formatProps(Ra.props),ad]:[nd+ad]}function formatProps(Ra){const qa=[],td=Object.keys(Ra);return td.slice(0,3).forEach(rd=>{qa.push(...formatProp(rd,Ra[rd]))}),td.length>3&&qa.push(" ..."),qa}function formatProp(Ra,qa,td){return isString $ 3(qa)?(qa=JSON.stringify(qa),td?qa:[ ` $ { Ra } = $ { qa } ` ]):typeof qa=="number"||typeof qa=="boolean"||qa==null?td?qa:[ ` $ { Ra } = $ { qa } ` ]:isRef(qa)?(qa=formatProp(Ra,toRaw(qa.value),!0),td?qa:[ ` $ { Ra } = Ref < ` ,qa,">"]):isFunction $ 4(qa)?[ ` $ { Ra } = fn$ { qa . name ? ` < ${ qa . name } > ` : "" } ` ]:(qa=toRaw(qa),td?qa:[ ` $ { Ra } = ` ,qa])}function callWithErrorHandling(Ra,qa,td,rd){try{return rd?Ra(...rd):Ra()}catch(nd){handleError $ 1(nd,qa,td)}}function callWithAsyncErrorHandling(Ra,qa,td,rd){if(isFunction $ 4(Ra)){const nd=callWithErrorHandling(Ra,qa,td,rd);return nd&&isPromise(nd)&&nd.catch(ad=>{handleError $ 1(ad,qa,td)}),nd}if(isArray $ 2(Ra)){const nd=[];for(let ad=0;ad<Ra.length;ad++)nd.push(callWithAsyncErrorHandling(Ra[ad],qa,td,rd));return nd}}function handleError $ 1(Ra,qa,td,rd=!0){const nd=qa?qa.vnode:null,{errorHandler:ad,throwUnhandledErrorInProduction:sd}=qa&&qa.appContext.config||EMPTY_OBJ;if(qa){let ud=qa.parent;const cd=qa.proxy,dd= ` https : //vuejs.org/error-reference/#runtime-${td}`;for(;ud;){const pd=ud.ec;if(pd){for(let fd=0;fd<pd.length;fd++)if(pd[fd](Ra,cd,dd)===!1)return}ud=ud.parent}if(ad){pauseTracking(),callWithErrorHandling(ad,null,10,[Ra,cd,dd]),resetTracking();return}}logError(Ra,td,nd,rd,sd)}function logError(Ra,qa,td,rd=!0,nd=!1){if(nd)throw Ra;console.error(Ra)}let isFlushing=!1,isFlushPending=!1;const queue$2=[];let flushIndex=0;const pendingPostFlushCbs=[];let activePostFlushCbs=null,postFlushIndex=0;const resolvedPromise=Promise.resolve();let currentFlushPromise=null;function nextTick$1(Ra){const qa=currentFlushPromise||resolvedPromise;return Ra?qa.then(this?Ra.bind(this):Ra):qa}function findInsertionIndex(Ra){let qa=isFlushing?flushIndex+1:0,td=queue$2.length;for(;qa<td;){const rd=qa+td>>>1,nd=queue$2[rd],ad=getId(nd);ad<Ra||ad===Ra&&nd.flags&2?qa=rd+1:td=rd}return qa}function queueJob(Ra){if(!(Ra.flags&1)){const qa=getId(Ra),td=queue$2[queue$2.length-1];!td||!(Ra.flags&2)&&qa>=getId(td)?queue$2.push(Ra):queue$2.splice(findInsertionIndex(qa),0,Ra),Ra.flags|=1,queueFlush()}}function queueFlush(){!isFlushing&&!isFlushPending&&(isFlushPending=!0,currentFlushPromise=resolvedPromise.then(flushJobs))}function queuePostFlushCb(Ra){isArray$2(Ra)?pendingPostFlushCbs.push(...Ra):activePostFlushCbs&&Ra.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,Ra):Ra.flags&1||(pendingPostFlushCbs.push(Ra),Ra.flags|=1),queueFlush()}function flushPreFlushCbs(Ra,qa,td=isFlushing?flushIndex+1:0){for(;td<queue$2.length;td++){const rd=queue$2[td];if(rd&&rd.flags&2){if(Ra&&rd.id!==Ra.uid)continue;queue$2.splice(td,1),td--,rd.flags&4&&(rd.flags&=-2),rd(),rd.flags&4||(rd.flags&=-2)}}}function flushPostFlushCbs(Ra){if(pendingPostFlushCbs.length){const qa=[...new Set(pendingPostFlushCbs)].sort((td,rd)=>getId(td)-getId(rd));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...qa);return}for(activePostFlushCbs=qa,postFlushIndex=0;postFlushIndex<activePostFlushCbs.length;postFlushIndex++){const td=activePostFlushCbs[postFlushIndex];td.flags&4&&(td.flags&=-2),td.flags&8||td(),td.flags&=-2}activePostFlushCbs=null,postFlushIndex=0}}const getId=Ra=>Ra.id==null?Ra.flags&2?-1:1/0:Ra.id;function flushJobs(Ra){isFlushPending=!1,isFlushing=!0;try{for(flushIndex=0;flushIndex<queue$2.length;flushIndex++){const qa=queue$2[flushIndex];qa&&!(qa.flags&8)&&(qa.flags&4&&(qa.flags&=-2),callWithErrorHandling(qa,qa.i,qa.i?15:14),qa.flags&4||(qa.flags&=-2))}}finally{for(;flushIndex<queue$2.length;flushIndex++){const qa=queue$2[flushIndex];qa&&(qa.flags&=-2)}flushIndex=0,queue$2.length=0,flushPostFlushCbs(),isFlushing=!1,currentFlushPromise=null,(queue$2.length||pen
2024-09-29 10:14:52 +08:00
* @ vue / runtime - dom v3 . 5.10
2024-09-18 09:46:23 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-11-27 11:30:55 +08:00
* * /let policy;const tt$5=typeof window<"u"&&window.trustedTypes;if(tt$5)try{policy=tt$5.createPolicy("vue",{createHTML:Ra=>Ra})}catch{}const unsafeToTrustedHTML=policy?Ra=>policy.createHTML(Ra):Ra=>Ra,svgNS="http:/ / www . w3 . org / 2000 / svg ",mathmlNS=" http : //www.w3.org/1998/Math/MathML",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(Ra,qa,td)=>{qa.insertBefore(Ra,td||null)},remove:Ra=>{const qa=Ra.parentNode;qa&&qa.removeChild(Ra)},createElement:(Ra,qa,td,rd)=>{const nd=qa==="svg"?doc.createElementNS(svgNS,Ra):qa==="mathml"?doc.createElementNS(mathmlNS,Ra):td?doc.createElement(Ra,{is:td}):doc.createElement(Ra);return Ra==="select"&&rd&&rd.multiple!=null&&nd.setAttribute("multiple",rd.multiple),nd},createText:Ra=>doc.createTextNode(Ra),createComment:Ra=>doc.createComment(Ra),setText:(Ra,qa)=>{Ra.nodeValue=qa},setElementText:(Ra,qa)=>{Ra.textContent=qa},parentNode:Ra=>Ra.parentNode,nextSibling:Ra=>Ra.nextSibling,querySelector:Ra=>doc.querySelector(Ra),setScopeId(Ra,qa){Ra.setAttribute(qa,"")},insertStaticContent(Ra,qa,td,rd,nd,ad){const sd=td?td.previousSibling:qa.lastChild;if(nd&&(nd===ad||nd.nextSibling))for(;qa.insertBefore(nd.cloneNode(!0),td),!(nd===ad||!(nd=nd.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(rd==="svg"?`<svg>${Ra}</svg>`:rd==="mathml"?`<math>${Ra}</math>`:Ra);const ud=templateContainer.content;if(rd==="svg"||rd==="mathml"){const cd=ud.firstChild;for(;cd.firstChild;)ud.appendChild(cd.firstChild);ud.removeChild(cd)}qa.insertBefore(ud,td)}return[sd?sd.nextSibling:qa.firstChild,td?td.previousSibling:qa.lastChild]}},TRANSITION="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=extend$3({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),decorate$1=Ra=>(Ra.displayName="Transition",Ra.props=TransitionPropsValidators,Ra),Transition$1=decorate$1((Ra,{slots:qa})=>h$1(BaseTransition,resolveTransitionProps(Ra),qa)),callHook=(Ra,qa=[])=>{isArray$2(Ra)?Ra.forEach(td=>td(...qa)):Ra&&Ra(...qa)},hasExplicitCallback=Ra=>Ra?isArray$2(Ra)?Ra.some(qa=>qa.length>1):Ra.length>1:!1;function resolveTransitionProps(Ra){const qa={};for(const hf in Ra)hf in DOMTransitionPropsValidators||(qa[hf]=Ra[hf]);if(Ra.css===!1)return qa;const{name:td="v",type:rd,duration:nd,enterFromClass:ad=`${td}-enter-from`,enterActiveClass:sd=`${td}-enter-active`,enterToClass:ud=`${td}-enter-to`,appearFromClass:cd=ad,appearActiveClass:dd=sd,appearToClass:pd=ud,leaveFromClass:fd=`${td}-leave-from`,leaveActiveClass:Td=`${td}-leave-active`,leaveToClass:Sd=`${td}-leave-to`}=Ra,Ad=normalizeDuration(nd),Nd=Ad&&Ad[0],Ld=Ad&&Ad[1],{onBeforeEnter:Rd,onEnter:Od,onEnterCancelled:kd,onLeave:Fd,onLeaveCancelled:Ud,onBeforeAppear:Hd=Rd,onAppear:Vd=Od,onAppearCancelled:Zd=kd}=qa,zd=(hf,bf,yf)=>{removeTransitionClass(hf,bf?pd:ud),removeTransitionClass(hf,bf?dd:sd),yf&&yf()},Xd=(hf,bf)=>{hf._isLeaving=!1,removeTransitionClass(hf,fd),removeTransitionClass(hf,Sd),removeTransitionClass(hf,Td),bf&&bf()},Qd=hf=>(bf,yf)=>{const _f=hf?Vd:Od,gf=()=>zd(bf,hf,yf);callHook(_f,[bf,gf]),nextFrame(()=>{removeTransitionClass(bf,hf?cd:ad),addTransitionClass(bf,hf?pd:ud),hasExplicitCallback(_f)||whenTransitionEnds(bf,rd,Nd,gf)})};return extend$3(qa,{onBeforeEnter(hf){callHook(Rd,[hf]),addTransitionClass(hf,ad),addTransitionClass(hf,sd)},onBeforeAppear(hf){callHook(Hd,[hf]),addTransitionClass(hf,cd),addTransitionClass(hf,dd)},onEnter:Qd(!1),onAppear:Qd(!0),onLeave(hf,bf){hf._isLeaving=!0;const yf=()=>Xd(hf,bf);addTransitionClass(hf,fd),addTransitionClass(hf,Td),forceReflow(),nextFrame(()=>{hf._isLeaving&&(removeTransitionClass(hf,fd),addTransitionClass(hf,Sd),hasExplicitCallback(Fd)||whenTransitionEnds(hf,rd,Ld,yf))}),callHook(Fd,[hf,yf])},onEnterCancelled
2024-09-18 09:46:23 +08:00
( ? :
2024-09-25 14:23:53 +08:00
( ? : ` +rd+":){7}(?:"+rd+ ` | : ) | // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
( ? : ` +rd+":){6}(?:"+td+"|:"+rd+ ` | : ) | // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
( ? : ` +rd+":){5}(?::"+td+"|(?::"+rd+ ` ) { 1 , 2 } | : ) | // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
( ? : ` +rd+":){4}(?:(?::"+rd+"){0,1}:"+td+"|(?::"+rd+ ` ) { 1 , 3 } | : ) | // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
( ? : ` +rd+":){3}(?:(?::"+rd+"){0,2}:"+td+"|(?::"+rd+ ` ) { 1 , 4 } | : ) | // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
( ? : ` +rd+":){2}(?:(?::"+rd+"){0,3}:"+td+"|(?::"+rd+ ` ) { 1 , 5 } | : ) | // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
( ? : ` +rd+":){1}(?:(?::"+rd+"){0,4}:"+td+"|(?::"+rd+ ` ) { 1 , 6 } | : ) | // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
( ? : : ( ? : ( ? : : ` +rd+"){0,5}:"+td+"|(?::"+rd+ ` ) { 1 , 7 } | : ) ) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
2024-09-18 09:46:23 +08:00
) ( ? : % [ 0 - 9 a - zA - Z ] { 1 , } ) ? // %eth0 %1
2024-11-27 11:30:55 +08:00
` ).replace(/ \s * \/ \/ .* $ /gm,"").replace(/ \n /g,"").trim(),ad=new RegExp("(?:^"+td+" $ )|(?:^"+nd+" $ )"),sd=new RegExp("^"+td+" $ "),ud=new RegExp("^"+nd+" $ "),cd=function(Fd){return Fd&&Fd.exact?ad:new RegExp("(?:"+qa(Fd)+td+qa(Fd)+")|(?:"+qa(Fd)+nd+qa(Fd)+")","g")};cd.v4=function(kd){return kd&&kd.exact?sd:new RegExp(""+qa(kd)+td+qa(kd),"g")},cd.v6=function(kd){return kd&&kd.exact?ud:new RegExp(""+qa(kd)+nd+qa(kd),"g")};var dd="(?:(?:[a-z]+:)?//)",pd="(?: \\ S+(?:: \\ S*)?@)?",fd=cd.v4().source,Td=cd.v6().source,Sd="(?:(?:[a-z \\ u00a1- \\ uffff0-9][-_]*)*[a-z \\ u00a1- \\ uffff0-9]+)",Ad="(?: \\ .(?:[a-z \\ u00a1- \\ uffff0-9]-*)*[a-z \\ u00a1- \\ uffff0-9]+)*",Nd="(?: \\ .(?:[a-z \\ u00a1- \\ uffff]{2,}))",Ld="(?:: \\ d{2,5})?",Rd='(?:[/?#][^ \\ s"]*)?',Od="(?:"+dd+"|www \\ .)"+pd+"(?:localhost|"+fd+"|"+Td+"|"+Sd+Ad+Nd+")"+Ld+Rd;return urlReg=new RegExp("(?:^"+Od+" $ )","i"),urlReg},pattern $ 2={email:/^(([^<>() \[ \] \\ .,;: \s @"]+( \. [^<>() \[ \] \\ .,;: \s @"]+)*)|(".+"))@(( \[ [0-9]{1,3} \. [0-9]{1,3} \. [0-9]{1,3} \. [0-9]{1,3}])|(([a-zA-Z \- 0-9 \u 00A0- \u D7FF \u F900- \u FDCF \u FDF0- \u FFEF]+ \. )+[a-zA-Z \u 00A0- \u D7FF \u F900- \u FDCF \u FDF0- \u FFEF]{2,})) $ /,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3}) $ /i},types $ 1={integer:function(qa){return types $ 1.number(qa)&&parseInt(qa,10)===qa},float:function(qa){return types $ 1.number(qa)&&!types $ 1.integer(qa)},array:function(qa){return Array.isArray(qa)},regexp:function(qa){if(qa instanceof RegExp)return!0;try{return!!new RegExp(qa)}catch{return!1}},date:function(qa){return typeof qa.getTime=="function"&&typeof qa.getMonth=="function"&&typeof qa.getYear=="function"&&!isNaN(qa.getTime())},number:function(qa){return isNaN(qa)?!1:typeof qa=="number"},object:function(qa){return typeof qa=="object"&&!types $ 1.array(qa)},method:function(qa){return typeof qa=="function"},email:function(qa){return typeof qa=="string"&&qa.length<=320&&!!qa.match(pattern $ 2.email)},url:function(qa){return typeof qa=="string"&&qa.length<=2048&&!!qa.match(getUrlRegex())},hex:function(qa){return typeof qa=="string"&&!!qa.match(pattern $ 2.hex)}},type $ 1 $ 1=function(qa,td,rd,nd,ad){if(qa.required&&td===void 0){required $ 1(qa,td,rd,nd,ad);return}var sd=["integer","float","array","regexp","object","method","email","number","date","url","hex"],ud=qa.type;sd.indexOf(ud)>-1?types $ 1[ud](td)||nd.push(format $ 2(ad.messages.types[ud],qa.fullField,qa.type)):ud&&typeof td!==qa.type&&nd.push(format $ 2(ad.messages.types[ud],qa.fullField,qa.type))},range $ 2=function(qa,td,rd,nd,ad){var sd=typeof qa.len=="number",ud=typeof qa.min=="number",cd=typeof qa.max=="number",dd=/[ \u D800- \u DBFF][ \u DC00- \u DFFF]/g,pd=td,fd=null,Td=typeof td=="number",Sd=typeof td=="string",Ad=Array.isArray(td);if(Td?fd="number":Sd?fd="string":Ad&&(fd="array"),!fd)return!1;Ad&&(pd=td.length),Sd&&(pd=td.replace(dd,"_").length),sd?pd!==qa.len&&nd.push(format $ 2(ad.messages[fd].len,qa.fullField,qa.len)):ud&&!cd&&pd<qa.min?nd.push(format $ 2(ad.messages[fd].min,qa.fullField,qa.min)):cd&&!ud&&pd>qa.max?nd.push(format $ 2(ad.messages[fd].max,qa.fullField,qa.max)):ud&&cd&&(pd<qa.min||pd>qa.max)&&nd.push(format $ 2(ad.messages[fd].range,qa.fullField,qa.min,qa.max))},ENUM $ 1="enum",enumerable $ 1=function(qa,td,rd,nd,ad){qa[ENUM $ 1]=Array.isArray(qa[ENUM $ 1])?qa[ENUM $ 1]:[],qa[ENUM $ 1].indexOf(td)===-1&&nd.push(format $ 2(ad.messages[ENUM $ 1],qa.fullField,qa[ENUM $ 1].join(", ")))},pattern $ 1=function(qa,td,rd,nd,ad){if(qa.pattern){if(qa.pattern instanceof RegExp)qa.pattern.lastIndex=0,qa.pattern.test(td)||nd.push(format $ 2(ad.messages.pattern.mismatch,qa.fullField,td,qa.pattern));else if(typeof qa.pattern=="string"){var sd=new RegExp(qa.pattern);sd.test(td)||nd.push(format $ 2(ad.messages.pattern.mismatch,qa.fullField,td,qa.pattern))}}},rules={required:required $ 1,whitespace:whitespace $ 2,type:type $ 1 $ 1,range:range $ 2,enum:enumerable $ 1,pattern:pattern $ 1},string=function(qa,td,rd,nd,ad){var sd=[],ud=qa.required||!qa.required&&nd.hasOwnProperty(qa.field);if(ud){if(isEmptyValue(td,"string")&&!qa.required)return rd();rules.required(qa,td,nd,sd,ad,"string"),isEmptyValue(td,"string")||(rules.type(qa,td,nd,sd,ad),rules.range(qa,td,nd,sd,ad),rules.pattern(qa,td,nd,sd,ad),qa.whitespace===!0&
2024-09-18 09:46:23 +08:00
height : 0 ! important ;
visibility : hidden ! important ;
$ { isFirefox ( ) ? "" : "overflow:hidden !important;" }
position : absolute ! important ;
z - index : - 1000 ! important ;
top : 0 ! important ;
right : 0 ! important ;
2024-11-27 11:30:55 +08:00
` ,CONTEXT_STYLE=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function calculateNodeStyling(Ra){const qa=window.getComputedStyle(Ra),td=qa.getPropertyValue("box-sizing"),rd=Number.parseFloat(qa.getPropertyValue("padding-bottom"))+Number.parseFloat(qa.getPropertyValue("padding-top")),nd=Number.parseFloat(qa.getPropertyValue("border-bottom-width"))+Number.parseFloat(qa.getPropertyValue("border-top-width"));return{contextStyle:CONTEXT_STYLE.map(sd=> ` $ { sd } : $ { qa . getPropertyValue ( sd ) } ` ).join(";"),paddingSize:rd,borderSize:nd,boxSizing:td}}function calcTextareaHeight(Ra,qa=1,td){var rd;hiddenTextarea||(hiddenTextarea=document.createElement("textarea"),document.body.appendChild(hiddenTextarea));const{paddingSize:nd,borderSize:ad,boxSizing:sd,contextStyle:ud}=calculateNodeStyling(Ra);hiddenTextarea.setAttribute("style", ` $ { ud } ; $ { HIDDEN _STYLE } ` ),hiddenTextarea.value=Ra.value||Ra.placeholder||"";let cd=hiddenTextarea.scrollHeight;const dd={};sd==="border-box"?cd=cd+ad:sd==="content-box"&&(cd=cd-nd),hiddenTextarea.value="";const pd=hiddenTextarea.scrollHeight-nd;if(isNumber $ 4(qa)){let fd=pd*qa;sd==="border-box"&&(fd=fd+nd+ad),cd=Math.max(fd,cd),dd.minHeight= ` $ { fd } px ` }if(isNumber $ 4(td)){let fd=pd*td;sd==="border-box"&&(fd=fd+nd+ad),cd=Math.min(fd,cd)}return dd.height= ` $ { cd } px ` ,(rd=hiddenTextarea.parentNode)==null||rd.removeChild(hiddenTextarea),hiddenTextarea=void 0,dd}const inputProps=buildProps({id:{type:String,default:void 0},size:useSizeProp,disabled:Boolean,modelValue:{type:definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:definePropType([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:iconPropType},prefixIcon:{type:iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:definePropType([Object,Array,String]),default:()=>mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...useAriaProps(["ariaLabel"])}),inputEmits={[UPDATE_MODEL_EVENT]:Ra=>isString $ 3(Ra),input:Ra=>isString $ 3(Ra),change:Ra=>isString $ 3(Ra),focus:Ra=>Ra instanceof FocusEvent,blur:Ra=>Ra instanceof FocusEvent,clear:()=>!0,mouseleave:Ra=>Ra instanceof MouseEvent,mouseenter:Ra=>Ra instanceof MouseEvent,keydown:Ra=>Ra instanceof Event,compositionstart:Ra=>Ra instanceof CompositionEvent,compositionupdate:Ra=>Ra instanceof CompositionEvent,compositionend:Ra=>Ra instanceof CompositionEvent},__default__ $ s=defineComponent({name:"ElInput",inheritAttrs:!1}),_sfc_main $ 1q=defineComponent({...__default__ $ s,props:inputProps,emits:inputEmits,setup(Ra,{expose:qa,emit:td}){const rd=Ra,nd=useAttrs $ 1(),ad=useSlots(),sd=computed(()=>{const Th={};return rd.containerRole==="combobox"&&(Th["aria-haspopup"]=nd["aria-haspopup"],Th["aria-owns"]=nd["aria-owns"],Th["aria-expanded"]=nd["aria-expanded"]),Th}),ud=computed(()=>[rd.type==="textarea"?Ld.b():Nd.b(),Nd.m(Sd.value),Nd.is("disabled",Ad.value),Nd.is("exceed",Df.value),{[Nd.b("group")]:ad.prepend||ad.append,[Nd.m("prefix")]:ad.prefix||rd.prefixIcon,[Nd.m("suffix")]:ad.suffix||rd.suffixIcon||rd.clearable||rd.showPassword,[Nd.bm("suffix","password-clear")]:Yf.value&&Qf.value,[Nd.b("hidden")]:rd.type==="hidden"},nd.class]),cd=computed(()=>[Nd.e("wrapper"),Nd.is("focus",zd.value)]),dd=useAttrs({excludeKeys:computed(()=>Object.keys(sd.value))}),{form:pd,formItem:fd}=useFormItem(),{inputId:Td}=useFormItemInputId(rd,{formItemContext:fd}),Sd=useFormSize(),Ad=useFormDisabled(),Nd=useNamespace("input"),Ld=useNamespace("textarea"),Rd=shallowRef(),Od=shallowRef(),kd=ref $ 1(!1),Fd=ref $ 1(!1
2024-09-18 09:46:23 +08:00
M 50 50
2024-11-27 11:30:55 +08:00
m 0 $ { Fd ? "" : "-" } $ { kd }
a $ { kd } $ { kd } 0 1 1 0 $ { Fd ? "-" : "" } $ { kd * 2 }
a $ { kd } $ { kd } 0 1 1 0 $ { Fd ? "" : "-" } $ { kd * 2 }
` }),cd=computed(()=>2*Math.PI*sd.value),dd=computed(()=>qa.type==="dashboard"?.75:1),pd=computed(()=> ` $ { - 1 * cd . value * ( 1 - dd . value ) / 2 } px ` ),fd=computed(()=>({strokeDasharray: ` $ { cd . value * dd . value } px , $ { cd . value } px ` ,strokeDashoffset:pd.value})),Td=computed(()=>({strokeDasharray: ` $ { cd . value * dd . value * ( qa . percentage / 100 ) } px , $ { cd . value } px ` ,strokeDashoffset:pd.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),Sd=computed(()=>{let kd;return qa.color?kd=Od(qa.percentage):kd=td[qa.status]||td.default,kd}),Ad=computed(()=>qa.status==="warning"?warning_filled_default:qa.type==="line"?qa.status==="success"?circle_check_default:circle_close_default:qa.status==="success"?check_default:close_default),Nd=computed(()=>qa.type==="line"?12+qa.strokeWidth*.4:qa.width*.111111+2),Ld=computed(()=>qa.format(qa.percentage));function Rd(kd){const Fd=100/kd.length;return kd.map((Hd,Vd)=>isString $ 3(Hd)?{color:Hd,percentage:(Vd+1)*Fd}:Hd).sort((Hd,Vd)=>Hd.percentage-Vd.percentage)}const Od=kd=>{var Fd;const{color:Ud}=qa;if(isFunction $ 4(Ud))return Ud(kd);if(isString $ 3(Ud))return Ud;{const Hd=Rd(Ud);for(const Vd of Hd)if(Vd.percentage>kd)return Vd.color;return(Fd=Hd[Hd.length-1])==null?void 0:Fd.color}};return(kd,Fd)=>(openBlock(),createElementBlock("div",{class:normalizeClass([unref(rd).b(),unref(rd).m(kd.type),unref(rd).is(kd.status),{[unref(rd).m("without-text")]:!kd.showText,[unref(rd).m("text-inside")]:kd.textInside}]),role:"progressbar","aria-valuenow":kd.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[kd.type==="line"?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(unref(rd).b("bar"))},[createBaseVNode("div",{class:normalizeClass(unref(rd).be("bar","outer")),style:normalizeStyle({height: ` $ { kd . strokeWidth } px ` })},[createBaseVNode("div",{class:normalizeClass([unref(rd).be("bar","inner"),{[unref(rd).bem("bar","inner","indeterminate")]:kd.indeterminate},{[unref(rd).bem("bar","inner","striped")]:kd.striped},{[unref(rd).bem("bar","inner","striped-flow")]:kd.stripedFlow}]),style:normalizeStyle(unref(nd))},[(kd.showText||kd. $ slots.default)&&kd.textInside?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(unref(rd).be("bar","innerText"))},[renderSlot(kd. $ slots,"default",{percentage:kd.percentage},()=>[createBaseVNode("span",null,toDisplayString(unref(Ld)),1)])],2)):createCommentVNode("v-if",!0)],6)],6)],2)):(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(unref(rd).b("circle")),style:normalizeStyle({height: ` $ { kd . width } px ` ,width: ` $ { kd . width } px ` })},[(openBlock(),createElementBlock("svg",{viewBox:"0 0 100 100"},[createBaseVNode("path",{class:normalizeClass(unref(rd).be("circle","track")),d:unref(ud),stroke: ` var ( $ { unref ( rd ) . cssVarName ( "fill-color-light" ) } , # e5e9f2 ) ` ,"stroke-linecap":kd.strokeLinecap,"stroke-width":unref(ad),fill:"none",style:normalizeStyle(unref(fd))},null,14,["d","stroke","stroke-linecap","stroke-width"]),createBaseVNode("path",{class:normalizeClass(unref(rd).be("circle","path")),d:unref(ud),stroke:unref(Sd),fill:"none",opacity:kd.percentage?1:0,"stroke-linecap":kd.strokeLinecap,"stroke-width":unref(ad),style:normalizeStyle(unref(Td))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(kd.showText||kd. $ slots.default)&&!kd.textInside?(openBlock(),createElementBlock("div",{key:2,class:normalizeClass(unref(rd).e("text")),style:normalizeStyle({fontSize: ` $ { unref ( Nd ) } px ` })},[renderSlot(kd. $ slots,"default",{percentage:kd.percentage},()=>[kd.status?(openBlock(),createBlock(unref(ElIcon),{key:1},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(Ad))))]),_:1})):(openBlock(),createElementBlock("span",{key:0},toDisplayString(unref(Ld)),1))])],6)):createCommentVNode("v-if",!0)],10,["aria-valuenow"]))}});var Progress=_export_sfc $ 1(_sfc_main $ Y,[["__file","progress.vue"]]);const ElProgress=withInstall(Progress),switchProps=buildProps({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:isValidComponentSize},width:{type:[String,Number],default:"
2024-09-18 09:46:23 +08:00
欢迎来到 Markdown 的奇妙世界 ! 无论你是写作爱好者 、 开发者 、 博主 , 还是想要简单记录点什么的人 , Markdown 都能成为你新的好伙伴 。 它不仅让写作变得简单明了 , 还能轻松地将内容转化为漂亮的网页格式 。 今天 , 我们将全面探讨 Markdown 的基础和进阶语法 , 让你在这个过程中充分享受写作的乐趣 !
Markdown 是一种轻量级标记语言 , 用于格式化纯文本 。 它以简单 、 直观的语法而著称 , 可以快速地生成 HTML 。 Markdown 是写作与代码的完美结合 , 既简单又强大 。
# # Markdown 基础语法
# # # 1. 标题 : 让你的内容层次分明
2024-09-29 10:14:52 +08:00
用 \ ` # \` 号来创建标题。标题从 \` # \` 开始, \` # \` 的数量表示标题的级别。
2024-09-18 09:46:23 +08:00
\ ` \` \` markdown
# 一级标题
# # 二级标题
# # # 三级标题
# # # # 四级标题
\ ` \` \`
以上代码将渲染出一组层次分明的标题 , 使你的文章井井有条 。
# # # 2. 段落与换行 : 自然流畅
Markdown 中的段落就是一行接一行的文本 。 要创建新段落 , 只需在两行文本之间空一行 。
# # # 3. 字体样式 : 强调你的文字
- * * 粗体 * * : 用两个星号或下划线包裹文字 , 如 \ ` **粗体** \` 或 \` __粗体__ \` 。
- _斜体 _ : 用一个星号或下划线包裹文字 , 如 \ ` *斜体* \` 或 \` _斜体_ \` 。
- ~ ~ 删除线 ~ ~ : 用两个波浪线包裹文字 , 如 \ ` ~~删除线~~ \` 。
这些简单的标记可以让你的内容更有层次感和重点突出 。
# # # 4. 列表 : 整洁有序
- * * 无序列表 * * : 用 \ ` - \` 、 \` * \` 或 \` + \` 加空格开始一行。
- * * 有序列表 * * : 使用数字加点号 ( \ ` 1. \` 、 \` 2. \` )开始一行。
在列表中嵌套其他内容 ? 只需缩进即可实现嵌套效果 。
- 无序列表项 1
1. 嵌套有序列表项 1
2. 嵌套有序列表项 2
- 无序列表项 2
1. 有序列表项 1
2. 有序列表项 2
# # # 5. 链接与图片 : 丰富内容
- * * 链接 * * : 用方括号和圆括号创建链接 \ ` [显示文本](链接地址) \` 。
- * * 图片 * * : 和链接类似 , 只需在前面加上 \ ` ! \` ,如 \` ![描述文本](图片链接) \` 。
[ 访问 Doocs ] ( https : //github.com/doocs)
! [ doocs ] ( https : //cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/logo-2.png)
轻松实现富媒体内容展示 !
> 因微信公众号平台不支持除公众号文章以外的链接 , 故其他平台的链接 , 会呈现链接色泽但不能点击 。
> 对于这些链接请注意明文书写 , 或点击左上角 「 格式 - > 微信外链接转底部引用 」 开启引用 , 这样就可以在底部观察到链接指向 。
# # # 6. 引用 : 引用名言或引人深思的句子
使用 \ ` > \` 来创建引用,只需在文本前面加上它。多层引用?在前一层 \` > \` 后再加一个就行。
> 这是一个引用
>
> > 这是一个嵌套引用
这让你的引用更加富有层次感 。
# # # 7. 代码块 : 展示你的代码
- * * 行内代码 * * : 用反引号包裹 , 如 \ ` code \` 。
- * * 代码块 * * : 用三个反引号包裹 , 并指定语言 , 如 :
\ ` \` \` js
console . log ( "Hello, Doocs!" ) ;
\ ` \` \`
语法高亮让你的代码更易读 。
# # # 8. 分割线 : 分割内容
用三个或更多的 \ ` - \` 、 \` * \` 或 \` _ \` 来创建分割线。
-- -
为你的内容添加视觉分隔 。
# # # 9. 表格 : 清晰展示数据
Markdown 支持简单的表格 , 用 \ ` | \` 和 \` - \` 分隔单元格和表头。
| 项目人员 | 邮箱 | 微信号 |
| -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | -- -- -- -- -- -- -- -- -- -- -- | -- -- -- -- -- -- |
| [ yanglbme ] ( https : //github.com/yanglbme) | contact@yanglibin.info | YLB0109 |
| [ YangFong ] ( https : //github.com/YangFong) | yangfong2022@gmail.com | yq2419731931 |
| [ thinkasany ] ( https : //github.com/thinkasany) | thinkasany@gmail.com | thinkasany |
这样的表格让数据展示更为清爽 !
> 手动编写标记太麻烦 ? 我们提供了便捷方式 。 左上方点击 「 编辑 - > 插入表格 」 , 即可快速实现表格渲染 。
# # Markdown 进阶技巧
# # # 1. LaTeX 公式 : 完美展示数学表达式
Markdown 允许嵌入 LaTeX 语法展示数学公式 :
- * * 行内公式 * * : 用 \ ` $ \` 包裹公式,如 $ E = mc^2 $ 。
- * * 块级公式 * * : 用 \ ` $ $ \` 包裹公式,如:
$$
\ \ begin { aligned }
d _ { i , j } & \ \ leftarrow d _ { i , j } + 1 \ \ \ \
d _ { i , y + 1 } & \ \ leftarrow d _ { i , y + 1 } - 1 \ \ \ \
d _ { x + 1 , j } & \ \ leftarrow d _ { x + 1 , j } - 1 \ \ \ \
d _ { x + 1 , y + 1 } & \ \ leftarrow d _ { x + 1 , y + 1 } + 1
\ \ end { aligned }
$$
这是展示复杂数学表达的利器 !
# # # 2. Mermaid 流程图 : 可视化流程
Mermaid 是强大的可视化工具 , 可以在 Markdown 中创建流程图 、 时序图等 。
\ ` \` \` mermaid
graph TD ;
A -- > B ;
A -- > C ;
B -- > D ;
C -- > D ;
\ ` \` \`
\ ` \` \` mermaid
pie
title Key elements in Product X
"Calcium" : 42.96
"Potassium" : 50.05
"Magnesium" : 10.01
"Iron" : 5
\ ` \` \`
\ ` \` \` mermaid
pie
title 为什么总是宅在家里 ?
"喜欢宅" : 45
"天气太热" : 70
"穷" : 500
"没人约" : 95
\ ` \` \`
这种方式不仅能直观展示流程 , 还能提升文档的专业性 。
> 更多用法 , 参见 : [ Mermaid User Guide ] ( https : //mermaid.js.org/intro/getting-started.html)。
# # 结语
Markdown 是一种简单 、 强大且易于掌握的标记语言 , 通过学习基础和进阶语法 , 你可以快速创作内容并有效传达信息 。 无论是技术文档 、 个人博客还是项目说明 , Markdown 都是你的得力助手 。 希望这篇文章能够带你全面了解 Markdown 的潜力 , 让你的写作更加丰富多彩 !
现在 , 拿起 Markdown 编辑器 , 开始创作吧 ! 探索 Markdown 的世界 , 你会发现它远比想象中更精彩 !
# # # # 推荐阅读
- [ 阿里又一个 20 k + stars 开源项目诞生 , 恭喜 fastjson ! ] ( https : //mp.weixin.qq.com/s/RNKDCK2KoyeuMeEs6GUrow)
- [ 刷掉 90 % 候选人的互联网大厂海量数据面试题 ( 附题解 + 方法总结 ) ] ( https : //mp.weixin.qq.com/s/rjGqxUvrEqJNlo09GrT1Dw)
- [ 好用 ! 期待已久的文本块功能究竟如何在 Java 13 中发挥作用 ? ] ( https : //mp.weixin.qq.com/s/kalGv5T8AZGxTnLHr2wDsA)
- [ 2019 GitHub 开源贡献排行榜新鲜出炉 ! 微软谷歌领头 , 阿里跻身前 12 ! ] ( https : //mp.weixin.qq.com/s/_q812aGD1b9QvZ2WFI0Qgw)
-- -
< center >
< img src = "https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png" style = "width: 100px;" >
< / c e n t e r >
` ,DEFAULT_CSS_CONTENT= ` / * *
* 按 Alt / Option + Shift + F 可格式化
* 如需使用主题色 , 请使用 var ( -- md - primary - color ) 代替颜色值
* 如 : color : var ( -- md - primary - color ) ;
*
* 召集令 : 如果你有好看的主题样式 , 欢迎分享 , 让更多人能够使用到你的主题 。
2024-09-25 14:23:53 +08:00
* 提交区 : https : //github.com/doocs/md/discussions/426
2024-09-18 09:46:23 +08:00
* /
/* 一级标题样式 */
h1 {
}
/* 二级标题样式 */
h2 {
}
/* 三级标题样式 */
h3 {
}
/* 四级标题样式 */
h4 {
}
2024-09-29 10:14:52 +08:00
/* 五级标题样式 */
h5 {
}
/* 六级标题样式 */
h6 {
}
2024-09-18 09:46:23 +08:00
/* 图片样式 */
image {
}
/* 引用样式 */
blockquote {
}
/* 引用段落样式 */
blockquote _p {
}
2024-11-22 15:41:57 +08:00
/* GFM note 样式 */
blockquote _note {
}
/* GFM tip 样式 */
blockquote _tip {
}
/* GFM important 样式 */
blockquote _important {
}
/* GFM warning 样式 */
blockquote _warning {
}
/* GFM caution 样式 */
blockquote _caution {
}
/* GFM 通用标题 */
blockquote _title {
}
/* GFM note 标题 */
blockquote _title _note {
}
/* GFM tip 标题 */
blockquote _title _tip {
}
/* GFM important 标题 */
blockquote _title _important {
}
/* GFM warning 标题 */
blockquote _title _warning {
}
/* GFM caution 标题 */
blockquote _title _caution {
}
/* GFM note 段落样式 */
blockquote _p _note {
}
/* GFM tip 段落样式 */
blockquote _p _tip {
}
/* GFM important 段落样式 */
blockquote _p _important {
}
/* GFM warning 段落样式 */
blockquote _p _warning {
}
/* GFM caution 段落样式 */
blockquote _p _caution {
}
2024-09-18 09:46:23 +08:00
/* 段落样式 */
p {
}
/* 分割线样式 */
hr {
}
/* 行内代码样式 */
codespan {
}
/* 粗体样式 */
strong {
}
/* 链接样式 */
link {
}
/* 微信链接样式 */
wx _link {
}
/* 有序列表样式 */
ol {
}
/* 无序列表样式 */
ul {
}
/* 列表项样式 */
li {
}
/* 代码块样式 */
code {
}
/* 代码块外层样式 */
code _pre {
}
2024-11-27 11:30:55 +08:00
` ,githubConfig={username:"bucketio",repoList:Array.from({length:20},(Ra,qa)=> ` img$ { qa } ` ),branch:"main",accessTokenList:["ghp_sqQg5y7XC7Fy8XdoocsmdVEYRiRiTZPvbwzTL4MRjQc","ghp_jB5JXzBjpGbgzdoocsmdogWfSHhfCKGVstozw1cAsPv","ghp_zvy8wkHo259g7doocsmdJnUKOQd1WO1SPzZ9G0O9cJD","ghp_DnCJc2Ms0RVZ1doocsmdiWOAN78FurfSeD1Pv2Y28pO","ghp_EsMYDv9WVjXWP5doocsmd1nnDml2DEP95rOiz44bSo0","ghp_L4isHf01nllOOdoocsmdHBGoDG6jscCA09WV44QDvlg","ghp_qWciwYXHPakAUGdoocsmdBOBZdRcV08JThKey3mBZNJ","ghp_rxkvIO08wVL2DMdoocsmd2jDEhcatp2rfVyhd3A7RiS","ghp_1RvkWKboSxr0yVdoocsmd7OtBCpecYwoV6deh3utifJ","ghp_cduanDnAug60ngdoocsmdF1uDstXUi6S9RMhY1qdada","ghp_q6mxuJIkqAcsCXdoocsmdkkjWvzGlMVRuy5zI0IWNDx","ghp_Pv4npPeJpChKFMTdoocsmdCQneopUcqJrqrjl3vrt9A","ghp_gKMCFqMaQiLTqhjdoocsmd7BJE8RyK6AdRw4b42CutS","ghp_2oShgb33qFlqBmadoocsmdludmuLYxBFY5bao1XrsVo","ghp_eYyd3kxWTZmsV8doocsmdDFbAa7AEGQTJgmOd0GUmtY"]},giteeConfig={username:"filesss",repoList:Array.from({length:20},(Ra,qa)=> ` img$ { qa } ` ),branch:"main",accessTokenList:["ed5fc9866bd6c2fdoocsmddd433f806fd2f399c","5448ffebbbf1151doocsmdc4e337cf814fc8a62","25b05efd2557ca2doocsmd75b5c0835e3395911","11628c7a5aef015doocsmd2eeff9fb9566f0458","cb2f5145ed938dedoocsmdbd063b4ed244eecf8","d8c0b57500672c1doocsmd55f48b866b5ebcd98","78c56eadb88e453doocsmd43ddd95753351771a","03e1a688003948fdoocsmda16fcf41e6f03f1f0","c49121cf4d191fbdoocsmdd6a7877ed537e474a","adfeb2fadcdc4aadoocsmdfe1ee869ac9c968ff","116c94549ca4a0ddoocsmd192653af5c0694616","ecf30ed7f2eb184doocsmd51ea4ec8300371d9e","5837cf2bd5afd93doocsmd73904bed31934949e","b5b7e1c7d57e01fdoocsmd5266f552574297d78","684d55564ffbd0bdoocsmd7d747e5cc23aed6d6","3fc04a9d272ab71doocsmd010c56cb57d88d2ba"]},fontFamilyOptions=[{label:"无衬线",value:"-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif",desc:"字体123Abc"},{label:"衬线",value:"Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif",desc:"字体123Abc"},{label:"等宽",value:"Menlo, Monaco, 'Courier New', monospace",desc:"字体123Abc"}],fontSizeOptions=[{label:"12px",value:"12px",desc:"更小"},{label:"13px",value:"13px",desc:"稍小"},{label:"14px",value:"14px",desc:"推荐"},{label:"15px",value:"15px",desc:"稍大"},{label:"16px",value:"16px",desc:"更大"}],colorOptions=[{label:"经典蓝",value:"#0F4C81",desc:"稳重冷静"},{label:"翡翠绿",value:"#009874",desc:"自然平衡"},{label:"活力橘",value:"#FA5151",desc:"热情活力"},{label:"柠檬黄",value:"#FECE00",desc:"明亮温暖"},{label:"薰衣紫",value:"#92617E",desc:"优雅神秘"},{label:"天空蓝",value:"#55C9EA",desc:"清爽自由"},{label:"玫瑰金",value:"#B76E79",desc:"奢华现代"},{label:"橄榄绿",value:"#556B2F",desc:"沉稳自然"},{label:"石墨黑",value:"#333333",desc:"内敛极简"},{label:"雾烟灰",value:"#A9A9A9",desc:"柔和低调"},{label:"樱花粉",value:"#FFB7C5",desc:"浪漫甜美"}],codeBlockUrlPrefix="https://cdn.bootcdn.net/ajax/libs/highlight.js/11.10.0/styles/",codeBlockThemeList=["1c-light.min.css","a11y-dark.min.css","a11y-light.min.css","agate.min.css","an-old-hope.min.css","androidstudio.min.css","arduino-light.min.css","arta.min.css","ascetic.min.css","atom-one-dark-reasonable.min.css","atom-one-dark.min.css","atom-one-light.min.css","brown-paper.min.css","codepen-embed.min.css","color-brewer.min.css","dark.min.css","default.min.css","devibeans.min.css","docco.min.css","far.min.css","felipec.min.css","foundation.min.css","github-dark-dimmed.min.css","github-dark.min.css","github.min.css","gml.min.css","googlecode.min.css","gradient-dark.min.css","gradient-light.min.css","grayscale.min.css","hybrid.min.css","idea.min.css","intellij-light.min.css","ir-black.min.css","isbl-editor-dark.min.css","isbl-editor-light.min.css","kimbie-dark.min.css","kimbie-light.min.css","lightfair.min.css","lioshi.min.css","magula.min.css","mono-blue.min.css","monokai-sublime.min.css","monokai.min.css","night-owl.min.css","nnfx-dark.min.css","nnfx-light.min.css","nord.min.css","
2024-09-18 09:46:23 +08:00
* The buffer module from node . js , for the browser .
*
* @ author Feross Aboukhadijeh < https : //feross.org>
* @ license MIT
2024-11-27 11:30:55 +08:00
* / ( f u n c t i o n ( R a ) { c o n s t q a = b a s e 6 4 J s $ 1 , t d = i e e e 7 5 4 $ 1 , r d = t y p e o f S y m b o l = = " f u n c t i o n " & & t y p e o f S y m b o l . f o r = = " f u n c t i o n " ? S y m b o l . f o r ( " n o d e j s . u t i l . i n s p e c t . c u s t o m " ) : n u l l ; R a . B u f f e r = p d , R a . S l o w B u f f e r = U d , R a . I N S P E C T _ M A X _ B Y T E S = 5 0 ; c o n s t n d = 2 1 4 7 4 8 3 6 4 7 ; R a . k M a x L e n g t h = n d ; c o n s t { U i n t 8 A r r a y : a d , A r r a y B u f f e r : s d , S h a r e d A r r a y B u f f e r : u d } = g l o b a l T h i s ; p d . T Y P E D _ A R R A Y _ S U P P O R T = c d ( ) , ! p d . T Y P E D _ A R R A Y _ S U P P O R T & & t y p e o f c o n s o l e < " u " & & t y p e o f c o n s o l e . e r r o r = = " f u n c t i o n " & & c o n s o l e . e r r o r ( " T h i s b r o w s e r l a c k s t y p e d a r r a y ( U i n t 8 A r r a y ) s u p p o r t w h i c h i s r e q u i r e d b y ` b u f f e r ` v 5 . x . U s e ` b u f f e r ` v 4 . x i f y o u r e q u i r e o l d b r o w s e r s u p p o r t . " ) ; f u n c t i o n c d ( ) { t r y { c o n s t r h = n e w a d ( 1 ) , I f = { f o o : f u n c t i o n ( ) { r e t u r n 4 2 } } ; r e t u r n O b j e c t . s e t P r o t o t y p e O f ( I f , a d . p r o t o t y p e ) , O b j e c t . s e t P r o t o t y p e O f ( r h , I f ) , r h . f o o ( ) = = = 4 2 } c a t c h { r e t u r n ! 1 } } O b j e c t . d e f i n e P r o p e r t y ( p d . p r o t o t y p e , " p a r e n t " , { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { i f ( p d . i s B u f f e r ( t h i s ) ) r e t u r n t h i s . b u f f e r } } ) , O b j e c t . d e f i n e P r o p e r t y ( p d . p r o t o t y p e , " o f f s e t " , { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { i f ( p d . i s B u f f e r ( t h i s ) ) r e t u r n t h i s . b y t e O f f s e t } } ) ; f u n c t i o n d d ( r h ) { i f ( r h > n d ) t h r o w n e w R a n g e E r r o r ( ' T h e v a l u e " ' + r h + ' " i s i n v a l i d f o r o p t i o n " s i z e " ' ) ; c o n s t I f = n e w a d ( r h ) ; r e t u r n O b j e c t . s e t P r o t o t y p e O f ( I f , p d . p r o t o t y p e ) , I f } f u n c t i o n p d ( r h , I f , N f ) { i f ( t y p e o f r h = = " n u m b e r " ) { i f ( t y p e o f I f = = " s t r i n g " ) t h r o w n e w T y p e E r r o r ( ' T h e " s t r i n g " a r g u m e n t m u s t b e o f t y p e s t r i n g . R e c e i v e d t y p e n u m b e r ' ) ; r e t u r n A d ( r h ) } r e t u r n f d ( r h , I f , N f ) } p d . p o o l S i z e = 8 1 9 2 ; f u n c t i o n f d ( r h , I f , N f ) { i f ( t y p e o f r h = = " s t r i n g " ) r e t u r n N d ( r h , I f ) ; i f ( s d . i s V i e w ( r h ) ) r e t u r n R d ( r h ) ; i f ( r h = = n u l l ) t h r o w n e w T y p e E r r o r ( " T h e f i r s t a r g u m e n t m u s t b e o n e o f t y p e s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r A r r a y - l i k e O b j e c t . R e c e i v e d t y p e " + t y p e o f r h ) ; i f ( T h ( r h , s d ) | | r h & & T h ( r h . b u f f e r , s d ) | | t y p e o f u d < " u " & & ( T h ( r h , u d ) | | r h & & T h ( r h . b u f f e r , u d ) ) ) r e t u r n O d ( r h , I f , N f ) ; i f ( t y p e o f r h = = " n u m b e r " ) t h r o w n e w T y p e E r r o r ( ' T h e " v a l u e " a r g u m e n t m u s t n o t b e o f t y p e n u m b e r . R e c e i v e d t y p e n u m b e r ' ) ; c o n s t J f = r h . v a l u e O f & & r h . v a l u e O f ( ) ; i f ( J f ! = n u l l & & J f ! = = r h ) r e t u r n p d . f r o m ( J f , I f , N f ) ; c o n s t o h = k d ( r h ) ; i f ( o h ) r e t u r n o h ; i f ( t y p e o f S y m b o l < " u " & & S y m b o l . t o P r i m i t i v e ! = n u l l & & t y p e o f r h [ S y m b o l . t o P r i m i t i v e ] = = " f u n c t i o n " ) r e t u r n p d . f r o m ( r h [ S y m b o l . t o P r i m i t i v e ] ( " s t r i n g " ) , I f , N f ) ; t h r o w n e w T y p e E r r o r ( " T h e f i r s t a r g u m e n t m u s t b e o n e o f t y p e s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r A r r a y - l i k e O b j e c t . R e c e i v e d t y p e " + t y p e o f r h ) } p d . f r o m = f u n c t i o n ( r h , I f , N f ) { r e t u r n f d ( r h , I f , N f ) } , O b j e c t . s e t P r o t o t y p e O f ( p d . p r o t o t y p e , a d . p r o t o t y p e ) , O b j e c t . s e t P r o t o t y p e O f ( p d , a d ) ; f u n c t i o n T d ( r h ) { i f ( t y p e o f r h ! = " n u m b e r " ) t h r o w n e w T y p e E r r o r ( ' " s i z e " a r g u m e n t m u s t b e o f t y p e n u m b e r ' ) ; i f ( r h < 0 ) t h r o w n e w R a n g e E r r o r ( ' T h e v a l u e " ' + r h + ' " i s i n v a l i d f o r o p t i o n " s i z e " ' ) } f u n c t i o n S d ( r h , I f , N f ) { r e t u r n T d ( r h ) , r h < = 0 ? d d ( r h ) : I f ! = = v o i d 0 ? t y p e o f N f = = " s t r i n g " ? d d ( r h ) . f i l l ( I f , N f ) : d d ( r h ) . f i l l ( I f ) : d d ( r h ) } p d . a l l o c = f u n c t i o n ( r h , I f , N f ) { r e t u r n S d ( r h , I f , N f ) } ; f u n c t i o n A d ( r h ) { r e t u r n T d ( r h ) , d d ( r h < 0 ? 0 : F d ( r h ) | 0 ) } p d . a l l o c U n s a f e = f u n c t i o n ( r h ) { r e t u r n A d ( r h ) } , p d . a l l o c U n s a f e S l o w = f u n c t i o n ( r h ) { r e t u r n A d ( r h ) } ; f u n c t i o n N d ( r h , I f ) { i f ( ( t y p e o f I f ! = " s t r i n g " | | I f = = = " " ) & & ( I f = " u t f 8 " ) , ! p d . i s E n c o d i n g ( I f ) ) t h r o w n e w T y p e E r r o r ( " U n k n o w n e n c o d i n g : " + I f ) ; c o n s t N f = H d ( r h , I f ) | 0 ; l e t J f = d d ( N f ) ; c o n s t o h = J f . w r i t e ( r h , I f ) ; r e t u r n o h ! = = N f & & ( J f = J f . s l i c e ( 0 , o h ) ) , J f } f u n c t i o n L d ( r h ) { c o n s t I f = r h . l e n g t h < 0 ? 0 : F d ( r h . l e n g t h ) | 0 , N f = d d ( I f ) ; f o r ( l e t J f = 0 ; J f < I f ; J f + = 1 ) N f [ J f ] = r h [ J f ] & 2 5 5 ; r e t u r n N f } f u n c t i o n R d ( r h ) { i f ( T h ( r h , a d ) ) { c o n s t I f = n e w a d ( r h ) ; r e t u r n O d ( I f . b u f f e r , I f . b y t e O f f s e t , I f . b y t e L e n g t h ) } r e t u r n L d ( r h ) } f u n c t i o n O d ( r h , I f , N f ) { i f ( I f < 0 | | r h . b y t e L e n g t h < I f ) t h r o w n e w R a n g e E r r o r ( ' " o f f s e t " i s o u t s i d e o f b u f f e r b o u n d s ' ) ; i f ( r h . b y t e L e n g t h < I f + ( N f | | 0 ) ) t h r o w n e w R a n g e E r r o r ( ' " l e n g t h " i s o u t s i d e o f b u f f e r b o u n d s ' ) ; l e t J f ; r e t u r n I f = = = v o i d 0 & & N f = = = v o i d 0 ? J f = n e w a d ( r h ) : N f = = = v o i d 0 ? J f = n e w a d ( r h , I f ) : J f = n e w a d ( r h , I f , N f ) , O b j e c t . s e t P r o t o t y p e O f ( J f , p d . p r o t o t y p e ) , J f } f u n c t i o n k d ( r h ) { i f ( p d . i s B u f f e r ( r h ) ) { c o n s t I f = F d ( r h . l e n g t h ) | 0 , N f = d d ( I f ) ; r e t u r n N f . l e n g t h = = = 0 | | r h . c o p y ( N f , 0 , 0 , I f ) , N f } i f ( r h . l e n g t h ! = = v o i d 0 ) r e t u r n t y p e o f r h . l e n g t h ! = " n u m b e r " | | V h ( r h . l e n g t h ) ? d d ( 0 ) : L d ( r h ) ; i f ( r h . t y p e = = = " B u f f e r " & & A r r a y . i s A r r a y ( r h . d a t a ) ) r e t u r n L d ( r h . d a t a ) } f u n c t i o n F d ( r h ) { i f ( r h > = n d ) t h r o w n e w R a n g e E r r o r ( " A t t e m p t t o a l l o c a t e B u f f e r l a r g e r t h a n m a x i m u m s i z e : 0 x " + n d . t o S t r i n g ( 1 6 ) + " b y t e s " ) ; r e t u r n r h | 0 } f u n c t i o n U d ( r h ) { r e t u r n + r h !
` :getText(Ra.children):isCDATA(Ra)?getText(Ra.children):isText(Ra)?Ra.data:""}function textContent(Ra){return Array.isArray(Ra)?Ra.map(textContent).join(""):hasChildren(Ra)&&!isComment $ 1(Ra)?textContent(Ra.children):isText(Ra)?Ra.data:""}function innerText(Ra){return Array.isArray(Ra)?Ra.map(innerText).join(""):hasChildren(Ra)&&(Ra.type===ElementType.Tag||isCDATA(Ra))?innerText(Ra.children):isText(Ra)?Ra.data:""}function getChildren(Ra){return hasChildren(Ra)?Ra.children:[]}function getParent(Ra){return Ra.parent||null}function getSiblings(Ra){const qa=getParent(Ra);if(qa!=null)return getChildren(qa);const td=[Ra];let{prev:rd,next:nd}=Ra;for(;rd!=null;)td.unshift(rd),{prev:rd}=rd;for(;nd!=null;)td.push(nd),{next:nd}=nd;return td}function getAttributeValue(Ra,qa){var td;return(td=Ra.attribs)===null||td===void 0?void 0:td[qa]}function hasAttrib(Ra,qa){return Ra.attribs!=null&&Object.prototype.hasOwnProperty.call(Ra.attribs,qa)&&Ra.attribs[qa]!=null}function getName(Ra){return Ra.name}function nextElementSibling(Ra){let{next:qa}=Ra;for(;qa!==null&&!isTag(qa);)({next:qa}=qa);return qa}function prevElementSibling(Ra){let{prev:qa}=Ra;for(;qa!==null&&!isTag(qa);)({prev:qa}=qa);return qa}function removeElement(Ra){if(Ra.prev&&(Ra.prev.next=Ra.next),Ra.next&&(Ra.next.prev=Ra.prev),Ra.parent){const qa=Ra.parent.children,td=qa.lastIndexOf(Ra);td>=0&&qa.splice(td,1)}Ra.next=null,Ra.prev=null,Ra.parent=null}function replaceElement(Ra,qa){const td=qa.prev=Ra.prev;td&&(td.next=qa);const rd=qa.next=Ra.next;rd&&(rd.prev=qa);const nd=qa.parent=Ra.parent;if(nd){const ad=nd.children;ad[ad.lastIndexOf(Ra)]=qa,Ra.parent=null}}function appendChild(Ra,qa){if(removeElement(qa),qa.next=null,qa.parent=Ra,Ra.children.push(qa)>1){const td=Ra.children[Ra.children.length-2];td.next=qa,qa.prev=td}else qa.prev=null}function append $ 3(Ra,qa){removeElement(qa);const{parent:td}=Ra,rd=Ra.next;if(qa.next=rd,qa.prev=Ra,Ra.next=qa,qa.parent=td,rd){if(rd.prev=qa,td){const nd=td.children;nd.splice(nd.lastIndexOf(rd),0,qa)}}else td&&td.children.push(qa)}function prependChild(Ra,qa){if(removeElement(qa),qa.parent=Ra,qa.prev=null,Ra.children.unshift(qa)!==1){const td=Ra.children[1];td.prev=qa,qa.next=td}else qa.next=null}function prepend $ 1(Ra,qa){removeElement(qa);const{parent:td}=Ra;if(td){const rd=td.children;rd.splice(rd.indexOf(Ra),0,qa)}Ra.prev&&(Ra.prev.next=qa),qa.parent=td,qa.prev=Ra.prev,qa.next=Ra,Ra.prev=qa}function filter $ 5(Ra,qa,td=!0,rd=1/0){return find $ 3(Ra,Array.isArray(qa)?qa:[qa],td,rd)}function find $ 3(Ra,qa,td,rd){const nd=[],ad=[qa],sd=[0];for(;;){if(sd[0]>=ad[0].length){if(sd.length===1)return nd;ad.shift(),sd.shift();continue}const ud=ad[0][sd[0]++];if(Ra(ud)&&(nd.push(ud),--rd<=0))return nd;td&&hasChildren(ud)&&ud.children.length>0&&(sd.unshift(0),ad.unshift(ud.children))}}function findOneChild(Ra,qa){return qa.find(Ra)}function findOne(Ra,qa,td=!0){let rd=null;for(let nd=0;nd<qa.length&&!rd;nd++){const ad=qa[nd];if(isTag(ad))Ra(ad)?rd=ad:td&&ad.children.length>0&&(rd=findOne(Ra,ad.children,!0));else continue}return rd}function existsOne(Ra,qa){return qa.some(td=>isTag(td)&&(Ra(td)||existsOne(Ra,td.children)))}function findAll(Ra,qa){const td=[],rd=[qa],nd=[0];for(;;){if(nd[0]>=rd[0].length){if(rd.length===1)return td;rd.shift(),nd.shift();continue}const ad=rd[0][nd[0]++];isTag(ad)&&(Ra(ad)&&td.push(ad),ad.children.length>0&&(nd.unshift(0),rd.unshift(ad.children)))}}const Checks={tag_name(Ra){return typeof Ra=="function"?qa=>isTag(qa)&&Ra(qa.name):Ra==="*"?isTag:qa=>isTag(qa)&&qa.name===Ra},tag_type(Ra){return typeof Ra=="function"?qa=>Ra(qa.type):qa=>qa.type===Ra},tag_contains(Ra){return typeof Ra=="function"?qa=>isText(qa)&&Ra(qa.data):qa=>isText(qa)&&qa.data===Ra}};function getAttribCheck(Ra,qa){return typeof qa=="function"?td=>isTag(td)&&qa(td.attribs[Ra]):td=>isTag(td)&&td.attribs[Ra]===qa}function combineFuncs(Ra,qa){return td=>Ra(td)||qa(td)}function compileTest(Ra){const qa=Object.keys(Ra).map(td=>{const rd=Ra[td];return Object.prototype.hasOwnProperty.call(Checks,td)?Checks[td](rd):getAttribCheck(td,rd)});return qa.length===0?null:qa
2024-09-18 09:46:23 +08:00
: is ( button , input , select , textarea , optgroup , option ) [ disabled ] ,
optgroup [ disabled ] > option ,
fieldset [ disabled ] : not ( fieldset [ disabled ] legend : first - of - type * )
2024-11-27 11:30:55 +08:00
) ` ,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},PLACEHOLDER_ELEMENT={};function ensureIsTag(Ra,qa){return Ra===boolbase $ 1.falseFunc?boolbase $ 1.falseFunc:td=>qa.isTag(td)&&Ra(td)}function getNextSiblings(Ra,qa){const td=qa.getSiblings(Ra);if(td.length<=1)return[];const rd=td.indexOf(Ra);return rd<0||rd===td.length-1?[]:td.slice(rd+1).filter(qa.isTag)}function copyOptions(Ra){return{xmlMode:!!Ra.xmlMode,lowerCaseAttributeNames:!!Ra.lowerCaseAttributeNames,lowerCaseTags:!!Ra.lowerCaseTags,quirksMode:!!Ra.quirksMode,cacheResults:!!Ra.cacheResults,pseudos:Ra.pseudos,adapter:Ra.adapter,equals:Ra.equals}}const is $ 3=(Ra,qa,td,rd,nd)=>{const ad=nd(qa,copyOptions(td),rd);return ad===boolbase $ 1.trueFunc?Ra:ad===boolbase $ 1.falseFunc?boolbase $ 1.falseFunc:sd=>ad(sd)&&Ra(sd)},subselects={is:is $ 3,matches:is $ 3,where:is $ 3,not(Ra,qa,td,rd,nd){const ad=nd(qa,copyOptions(td),rd);return ad===boolbase $ 1.falseFunc?Ra:ad===boolbase $ 1.trueFunc?boolbase $ 1.falseFunc:sd=>!ad(sd)&&Ra(sd)},has(Ra,qa,td,rd,nd){const{adapter:ad}=td,sd=copyOptions(td);sd.relativeSelector=!0;const ud=qa.some(pd=>pd.some(isTraversal))?[PLACEHOLDER_ELEMENT]:void 0,cd=nd(qa,sd,ud);if(cd===boolbase $ 1.falseFunc)return boolbase $ 1.falseFunc;const dd=ensureIsTag(cd,ad);if(ud&&cd!==boolbase $ 1.trueFunc){const{shouldTestNextSiblings:pd=!1}=cd;return fd=>{if(!Ra(fd))return!1;ud[0]=fd;const Td=ad.getChildren(fd),Sd=pd?[...Td,...getNextSiblings(fd,ad)]:Td;return ad.existsOne(dd,Sd)}}return pd=>Ra(pd)&&ad.existsOne(dd,ad.getChildren(pd))}};function compilePseudoSelector(Ra,qa,td,rd,nd){var ad;const{name:sd,data:ud}=qa;if(Array.isArray(ud)){if(!(sd in subselects))throw new Error( ` Unknown pseudo - class : $ { sd } ( $ { ud } ) ` );return subselects[sd](Ra,ud,td,rd,nd)}const cd=(ad=td.pseudos)===null||ad===void 0?void 0:ad[sd],dd=typeof cd=="string"?cd:aliases[sd];if(typeof dd=="string"){if(ud!=null)throw new Error( ` Pseudo $ { sd } doesn ' t have any arguments ` );const pd=parse $ 7(dd);return subselects.is(Ra,pd,td,rd,nd)}if(typeof cd=="function")return verifyPseudoArgs(cd,sd,ud,1),pd=>cd(pd,ud)&&Ra(pd);if(sd in filters)return filters[sd](Ra,ud,td,rd);if(sd in pseudos){const pd=pseudos[sd];return verifyPseudoArgs(pd,sd,ud,2),fd=>pd(fd,td,ud)&&Ra(fd)}throw new Error( ` Unknown pseudo - class : $ { sd } ` )}function getElementParent(Ra,qa){const td=qa.getParent(Ra);return td&&qa.isTag(td)?td:null}function compileGeneralSelector(Ra,qa,td,rd,nd){const{adapter:ad,equals:sd}=td;switch(qa.type){case SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case SelectorType.Attribute:{if(qa.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!td.xmlMode||td.lowerCaseAttributeNames)&&(qa.name=qa.name.toLowerCase()),attributeRules[qa.action](Ra,qa,td)}case SelectorType.Pseudo:return compilePseudoSelector(Ra,qa,td,rd,nd);case SelectorType.Tag:{if(qa.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:ud}=qa;return(!td.xmlMode||td.lowerCaseTags)&&(ud=ud.toLowerCase()),function(dd){return ad.getName(dd)===ud&&Ra(dd)}}case SelectorType.Descendant:{if(td.cacheResults===!1||typeof WeakSet>"u")return function(dd){let pd=dd;for(;pd=getElementParent(pd,ad);)if(Ra(pd))return!0;return!1};const ud=new WeakSet;return function(dd){let pd=dd;for(;pd=getElementParent(pd,ad);)if(!ud.has(
2024-09-25 14:23:53 +08:00
` )})):{name:nd,value:ad.replace(rCRLF, ` \ r
2024-11-27 11:30:55 +08:00
` )}}).toArray()}const Forms=Object.freeze(Object.defineProperty({__proto__:null,serialize:serialize $ 1,serializeArray},Symbol.toStringTag,{value:"Module"}));function getExtractDescr(Ra){var qa;return typeof Ra=="string"?{selector:Ra,value:"textContent"}:{selector:Ra.selector,value:(qa=Ra.value)!==null&&qa!==void 0?qa:"textContent"}}function extract(Ra){const qa={};for(const td in Ra){const rd=Ra[td],nd=Array.isArray(rd),{selector:ad,value:sd}=getExtractDescr(nd?rd[0]:rd),ud=typeof sd=="function"?sd:typeof sd=="string"?cd=>this._make(cd).prop(sd):cd=>this._make(cd).extract(sd);if(nd)qa[td]=this._findBySelector(ad,Number.POSITIVE_INFINITY).map((cd,dd)=>ud(dd,td,qa)).get();else{const cd=this._findBySelector(ad,1);qa[td]=cd.length>0?ud(cd[0],td,qa):void 0}}return qa}const Extract=Object.freeze(Object.defineProperty({__proto__:null,extract},Symbol.toStringTag,{value:"Module"}));class Cheerio{constructor(qa,td,rd){if(this.length=0,this.options=rd,this._root=td,qa){for(let nd=0;nd<qa.length;nd++)this[nd]=qa[nd];this.length=qa.length}}}Cheerio.prototype.cheerio="[cheerio object]";Cheerio.prototype.splice=Array.prototype.splice;Cheerio.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(Cheerio.prototype,Attributes,Traversing,Manipulation,Css,Forms,Extract);function getLoad(Ra,qa){return function td(rd,nd,ad=!0){if(rd==null)throw new Error("cheerio.load() expects a string");const sd=flattenOptions(nd),ud=Ra(rd,sd,ad,null);class cd extends Cheerio{_make(fd,Td){const Sd=dd(fd,Td);return Sd.prevObject=this,Sd}_parse(fd,Td,Sd,Ad){return Ra(fd,Td,Sd,Ad)}_render(fd){return qa(fd,this.options)}}function dd(pd,fd,Td=ud,Sd){if(pd&&isCheerio(pd))return pd;const Ad=flattenOptions(Sd,sd),Nd=typeof Td=="string"?[Ra(Td,Ad,!1,null)]:"length"in Td?Td:[Td],Ld=isCheerio(Nd)?Nd:new cd(Nd,null,Ad);if(Ld._root=Ld,!pd)return new cd(void 0,Ld,Ad);const Rd=typeof pd=="string"&&isHtml(pd)?Ra(pd,Ad,!1,null).children:isNode $ 1(pd)?[pd]:Array.isArray(pd)?pd:void 0,Od=new cd(Rd,Ld,Ad);if(Rd)return Od;if(typeof pd!="string")throw new TypeError("Unexpected type of selector");let kd=pd;const Fd=fd?typeof fd=="string"?isHtml(fd)?new cd([Ra(fd,Ad,!1,null)],Ld,Ad):(kd= ` $ { fd } $ { kd } ` ,Ld):isCheerio(fd)?fd:new cd(Array.isArray(fd)?fd:[fd],Ld,Ad):Ld;return Fd?Fd.find(kd):Od}return Object.assign(dd,staticMethods,{load:td,_root:ud,_options:sd,fn:cd.prototype,prototype:cd.prototype}),dd}}function isNode $ 1(Ra){return!!Ra.name||Ra.type==="root"||Ra.type==="text"||Ra.type==="comment"}const UNDEFINED_CODE_POINTS=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),REPLACEMENT_CHARACTER="<22> ";var CODE_POINTS;(function(Ra){Ra[Ra.EOF=-1]="EOF",Ra[Ra.NULL=0]="NULL",Ra[Ra.TABULATION=9]="TABULATION",Ra[Ra.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",Ra[Ra.LINE_FEED=10]="LINE_FEED",Ra[Ra.FORM_FEED=12]="FORM_FEED",Ra[Ra.SPACE=32]="SPACE",Ra[Ra.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",Ra[Ra.QUOTATION_MARK=34]="QUOTATION_MARK",Ra[Ra.NUMBER_SIGN=35]="NUMBER_SIGN",Ra[Ra.AMPERSAND=38]="AMPERSAND",Ra[Ra.APOSTROPHE=39]="APOSTROPHE",Ra[Ra.HYPHEN_MINUS=45]="HYPHEN_MINUS",Ra[Ra.SOLIDUS=47]="SOLIDUS",Ra[Ra.DIGIT_0=48]="DIGIT_0",Ra[Ra.DIGIT_9=57]="DIGIT_9",Ra[Ra.SEMICOLON=59]="SEMICOLON",Ra[Ra.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",Ra[Ra.EQUALS_SIGN=61]="EQUALS_SIGN",Ra[Ra.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",Ra[Ra.QUESTION_MARK=63]="QUESTION_MARK",Ra[Ra.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",Ra[Ra.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",Ra[Ra.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",Ra[Ra.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",Ra[Ra.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",Ra[Ra.GRAVE_ACCENT=96]="GRAVE_ACCENT",Ra[Ra.LATIN_SMALL_A=97]="LATIN_SMALL_A",Ra[Ra.LATIN_SMALL_F=102]="LATIN_SMALL_F",Ra[Ra.LATIN_SMALL_X=120]="LATIN_SMALL_X",Ra[Ra.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",Ra[Ra.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"})(CODE_POINTS=CODE_POINTS||(CODE_POINTS={}));const SEQUENC
` )}})(debug);var debugExports=debug.exports;(function(Ra,qa){debugExports("lex"),Ra.exports=td;function td(rd){var nd="",ad,sd=0,ud=-1,cd=0,dd=1,pd="before-selector",fd=[pd],Td={},Sd=[],Ad=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function Nd(){return Zd(),rd[ud]}function Ld(xf){return xf?fd[fd.length-1-xf]:pd}function Rd(xf){var Mf=ud+1;return xf===rd.slice(Mf,Mf+xf.length)}function Od(xf){var Mf=rd.slice(ud).indexOf(xf);return Mf>0?Mf:!1}function kd(xf){return xf===Fd(1)}function Fd(xf){return rd[ud+(xf||1)]}function Ud(){var xf=fd.pop();return pd=fd[fd.length-1],xf}function Hd(xf){return pd=xf,fd.push(pd),fd.length}function Vd(xf){var Mf=pd;return fd[fd.length-1]=pd=xf,Mf}function Zd(xf){if((xf||1)==1)rd[ud]== `
` ?(dd++,sd=1):sd++,ud++;else{var Mf=rd.slice(ud,ud+xf).split( `
` );Mf.length>1&&(dd+=Mf.length-1,sd=1),sd+=Mf[Mf.length-1].length,ud=ud+xf}}function zd(){Td.end={line:dd,col:sd},Sd.push(Td),nd="",Td={}}function Xd(xf){Td={type:xf,start:{line:dd,col:sd}}}for(;ad=Nd();)switch(ad){case" ":switch(Ld()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":nd+=ad;break}break;case `
2024-09-25 14:23:53 +08:00
` :case" ":case" \r ":case" \f ":switch(Ld()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":nd+=ad;break;case"at-value":ad=== `
2024-11-27 11:30:55 +08:00
` &&(Td.value=nd.trim(),zd(),Ud());break}break;case":":switch(Ld()){case"name":Td.name=nd.trim(),nd="",Vd("before-value");break;case"before-selector":nd+=ad,Xd("selector"),Hd("selector");break;case"before-value":Vd("value"),nd+=ad;break;default:nd+=ad;break}break;case";":switch(Ld()){case"name":case"before-value":case"value":nd.trim().length>0&&(Td.value=nd.trim(),zd()),Vd("before-name");break;case"value-paren":nd+=ad;break;case"at-value":Td.value=nd.trim(),zd(),Ud();break;case"before-name":break;default:nd+=ad;break}break;case"{":switch(Ld()){case"selector":if(Fd(-1)===" \\ "){nd+=ad;break}Td.text=nd.trim(),zd(),Vd("before-name"),cd=cd+1;break;case"at-group":switch(Td.name=nd.trim(),Td.type){case"font-face":case"viewport":case"page":Hd("before-name");break;default:Hd("before-selector")}zd(),cd=cd+1;break;case"name":case"at-rule":Td.name=nd.trim(),zd(),Hd("before-name"),cd=cd+1;break;case"comment":case"double-string":case"single-string":nd+=ad;break;case"before-value":Vd("value"),nd+=ad;break}break;case"}":switch(Ld()){case"before-name":case"name":case"before-value":case"value":nd&&(Td.value=nd.trim()),Td.name&&Td.value&&zd(),Xd("end"),zd(),Ud(),Ld()==="at-group"&&(Xd("at-group-end"),zd(),Ud()),cd>0&&(cd=cd-1);break;case"at-group":case"before-selector":case"selector":if(Fd(-1)===" \\ "){nd+=ad;break}cd>0&&Ld(1)==="at-group"&&(Xd("at-group-end"),zd()),cd>1&&Ud(),cd>0&&(cd=cd-1);break;case"double-string":case"single-string":case"comment":nd+=ad;break}break;case'"':case"'":switch(Ld()){case"double-string":ad==='"'&&Fd(-1)!==" \\ "&&Ud();break;case"single-string":ad==="'"&&Fd(-1)!==" \\ "&&Ud();break;case"before-at-value":Vd("at-value"),Hd(ad==='"'?"double-string":"single-string");break;case"before-value":Vd("value"),Hd(ad==='"'?"double-string":"single-string");break;case"comment":break;default:Fd(-1)!==" \\ "&&Hd(ad==='"'?"double-string":"single-string")}nd+=ad;break;case"/":switch(Ld()){case"comment":case"double-string":case"single-string":nd+=ad;break;case"before-value":case"selector":case"name":case"value":if(kd("*")){var Qd=Od("*/");Qd&&Zd(Qd+1)}else Ld()=="before-value"&&Vd("value"),nd+=ad;break;default:kd("*")?(Xd("comment"),Hd("comment"),Zd()):nd+=ad;break}break;case"*":switch(Ld()){case"comment":kd("/")?(Td.text=nd,Zd(),zd(),Ud()):nd+=ad;break;case"before-selector":nd+=ad,Xd("selector"),Hd("selector");break;case"before-value":Vd("value"),nd+=ad;break;default:nd+=ad}break;case"@":switch(Ld()){case"comment":case"double-string":case"single-string":nd+=ad;break;case"before-value":Vd("value"),nd+=ad;break;default:for(var hf=!1,bf,yf,_f=0,gf=Ad.length;!hf&&_f<gf;++_f)yf=Ad[_f],bf=yf.name||yf,Rd(bf)&&(hf=!0,Xd(bf),Hd(yf.state||"at-group"),Zd(bf.length),yf.prefix&&(Td.prefix=yf.prefix),yf.type&&(Td.type=yf.type));hf||(nd+=ad);break}break;case"(":switch(Ld()){case"value":Hd("value-paren");break;case"before-value":Vd("value");break}nd+=ad;break;case")":switch(Ld()){case"value-paren":Ud();break;case"before-value":Vd("value");break}nd+=ad;break;default:switch(Ld()){case"before-selector":Xd("selector"),Hd("selector");break;case"before-name":Xd("property"),Vd("name");break;case"before-value":Vd("value");break;case"before-at-value":Vd("at-value");break}nd+=ad;break}return Sd}})(lexer);var lexerExports=lexer.exports,parser $ 2={exports:{}};(function(Ra,qa){debugExports("parse");var td=lexerExports;Ra.exports=ud;var rd,nd,ad,sd;function ud(Ud,Hd){Hd||(Hd={}),rd=!!Hd.comments,ad=!!Hd.position,nd=0,sd=Array.isArray(Ud)?Ud.slice():td(Ud);for(var Vd,Zd=[],zd;zd=dd();)Vd=Rd(zd),Vd&&Zd.push(Vd);return{type:"stylesheet",stylesheet:{rules:Zd}}}function cd(Ud,Hd){Hd||(Hd={});for(var Vd,Zd=["type","name","value"],zd={},Xd=0;Xd<Zd.length;++Xd)Vd=Zd[Xd],Ud[Vd]&&(zd[Vd]=Hd[Vd]||Ud[Vd]);for(Zd=Object.keys(Hd),Xd=0;Xd<Zd.length;++Xd)Vd=Zd[Xd],zd[Vd]||(zd[Vd]=Hd[Vd]);return ad&&(zd.position={start:Ud.start,end:Ud.end}),zd}function dd(){var Ud=sd.shift();return Ud}function pd(Ud){nd=nd+1;var Hd={};switch(Ud.type){case"font-face":case"viewport":Hd.declarations=kd();break;case"page":Hd.prefix=Ud.prefix,Hd.declarations=kd();break;default:Hd.prefix=Ud.prefix,Hd.rul
` ,ud=" ");var Hd=Ad(Fd.stylesheet.rules,Od).join( `
` ).trim();return Hd}function dd(Fd){if(Fd){ad+=Fd;return}return rd?"":Array(ad).join(nd||"")}function pd(Fd){return"@"+Fd.type+" "+Fd.value+";"+sd}function fd(Fd){var Ud="",Hd=Fd.prefix||"";Fd.name&&(Ud=" "+Fd.name);var Vd=Fd.type!=="page";return"@"+Hd+Fd.type+Ud+ud+Nd(Fd,Vd)+sd}function Td(Fd){return td?"/*"+(Fd.text||"")+"*/"+sd:""}function Sd(Fd){var Ud;return Fd.selectors?Ud=Fd.selectors.join(","+sd):(Ud="@"+Fd.type,Ud+=Fd.name?" "+Fd.name:""),dd()+Ud+ud+Nd(Fd)+sd}function Ad(Fd,Ud){return Fd.reduce(function(Hd,Vd){var Zd=Vd.type==="comment"?Td(Vd):Ud(Vd);return Zd&&Hd.push(Zd),Hd},[])}function Nd(Fd,Ud){var Hd=Fd.declarations,Vd=Rd;return Fd.rules&&(Hd=Fd.rules,Vd=Sd),Hd=Ld(Hd,Vd),Hd&&(Hd=sd+Hd+(Ud?"":sd)),"{"+Hd+dd()+"}"}function Ld(Fd,Ud){if(!Fd)return"";dd(1);var Hd=Ad(Fd,Ud);return dd(-1),Hd.length?Hd.join(sd):""}function Rd(Fd){if(Fd.type==="property")return kd(Fd)}function Od(Fd){switch(Fd.type){case"rule":return Sd(Fd);case"media":case"keyframes":return fd(Fd);case"comment":return Td(Fd);case"import":case"charset":case"namespace":return pd(Fd);case"font-face":case"supports":case"viewport":case"document":case"page":return fd(Fd)}}function kd(Fd){var Ud=Fd.name?Fd.name+":"+ud:"";return dd()+Ud+Fd.value+";"}})(stringify $ 2);var stringifyExports=stringify $ 2.exports,mensch={lex:lexerExports,parse:parserExports,stringify:stringifyExports},selector $ 1={exports:{}},escapeRe=/([-.*+?^ ${ } ()|[ \] \/ \\ ])/g,unescapeRe=/ \\ /g,escape $ 5=function(Ra){return(Ra+"").replace(escapeRe," \\ $ 1")},unescape $ 2=function(Ra){return(Ra+"").replace(unescapeRe,"")},slickRe=RegExp( ` ^ ( ? : \ \ s * ( , ) \ \ s * | \ \ s * ( < combinator > + ) \ \ s * | ( \ \ s + ) | ( < unicode > + | \ \ * ) | \ \ # ( < unicode > + ) | \ \ . ( < unicode > + ) | \ \ [ \ \ s * ( < unicode1 > + ) ( ? : \ \ s * ( [ * ^ $ ! ~ | ] ? = ) ( ? : \ \ s * ( ? : ( [ "']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:([" '])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)`.replace(/<combinator>/,"["+escape$5(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),Part=function(qa){this.combinator=qa||" ",this.tag="*"};Part.prototype.toString=function(){if(!this.raw){var Ra="",qa,td;if(Ra+=this.tag||"*",this.id&&(Ra+="#"+this.id),this.classes&&(Ra+="."+this.classList.join(".")),this.attributes)for(qa=0;td=this.attributes[qa++];)Ra+="["+td.name+(td.operator?td.operator+' "'+td.value+'" ' : "" ) + "]" ; if ( this . pseudos ) for ( qa = 0 ; td = this . pseudos [ qa ++ ] ; ) Ra += ":" + td . name , td . value && ( Ra += "(" + td . value + ")" ) ; this . raw = Ra } return this . raw } ; var Expression = function ( ) { this . length = 0 } ; Expression . prototype . toString = function ( ) { if ( ! this . raw ) { for ( var Ra = "" , qa = 0 , td ; td = this [ qa ++ ] ; ) qa !== 1 && ( Ra += " " ) , td . combinator !== " " && ( Ra += td . combinator + " " ) , Ra += td ; this . raw = Ra } return this . raw } ; var replacer = function ( Ra , qa , td , rd , nd , ad , sd , ud , cd , dd , pd , fd , Td , Sd , Ad , Nd ) { var Ld , Rd ; if ( ( qa || ! this . length ) && ( Ld = this [ this . length ++ ] = new Expression , qa ) ) return "" ; if ( Ld || ( Ld = this [ this . length - 1 ] ) , ( td || rd || ! Ld . length ) && ( Rd = Ld [ Ld . length ++ ] = new Part ( td ) ) , Rd || ( Rd = Ld [ Ld . length - 1 ] ) , nd ) Rd . tag = unescape$2 ( nd ) ; else if ( ad ) Rd . id = unescape$2 ( ad ) ; else if ( sd ) { var Od = unescape$2 ( sd ) , kd = Rd . classes || ( Rd . classes = { } ) ; if ( ! kd [ Od ] ) { kd [ Od ] = escape$5 ( sd ) ; var Fd = Rd . classList || ( Rd . classList = [ ] ) ; Fd . push ( Od ) , Fd . sort ( ) } } else Td ? ( Nd = Nd || Ad , ( Rd . pseudos || ( Rd . pseudos = [ ] ) ) . push ( { type : fd . length == 1 ? "class" : "element" , name : unescape$2 ( Td ) , escapedName : escape$5 ( Td ) , value : Nd ? unescape$2 ( Nd ) : null , escapedValue : Nd ? escape$5 ( Nd ) : null } ) ) : ud && ( pd = pd ? escape$5 ( pd ) : null , ( Rd . attributes || ( Rd . attributes = [ ] ) ) . push ( { operator : cd , name : unescape$2 ( ud ) , escapedName : escape$5 ( ud ) , value : pd ? unescape$2 ( pd ) : null , escapedValue : pd ? escape$5 ( pd ) : null } ) ) ; return "" } , Expressions = function ( qa ) { this . length = 0 ; for ( var td = this , rd = qa , nd ; qa ; ) { if ( nd = qa . replace ( slickRe , function ( ) { return replacer . apply ( td , arguments ) } ) , nd === qa ) throw new Error ( rd + " is an invalid expression" ) ; qa = nd } } ; Expressions . prototype . toString = function ( ) { if ( ! this . raw ) { for ( var Ra = [ ] , qa = 0 , td ; td = this [ qa ++ ] ; ) Ra . push ( td ) ; this . raw = Ra . join ( ", " ) } return this . raw } ; var cache$1 = { } , parse$2 = function ( Ra ) { return Ra == null ? null : ( Ra = ( "" + Ra ) . replace ( /^\s+|\s+$/g , "" ) , cache$1 [ Ra ] || ( cache
2024-09-18 09:46:23 +08:00
* Returns an array of the selectors .
*
* @ license Sizzle CSS Selector Engine - MIT
* @ param { String } selectorText from mensch
* @ api public
2024-09-25 14:23:53 +08:00
* / R a . e x t r a c t = f u n c t i o n ( a d ) { f o r ( v a r s d = 0 , u d = [ ] , c d = " " , d d = 0 , p d = a d . l e n g t h ; d d < p d ; d d + + ) { v a r f d = a d . c h a r A t ( d d ) ; s d ? ( ( f d = = = " ] " | | f d = = = " ) " ) & & s d - - , c d + = f d ) : f d = = = " , " ? ( u d . p u s h ( c d ) , c d = " " ) : ( ( f d = = = " [ " | | f d = = = " ( " ) & & s d + + , ( c d . l e n g t h | | f d ! = = " , " & & f d ! = = `
2024-11-27 11:30:55 +08:00
` &&fd!==" ")&&(cd+=fd))}return cd.length&&ud.push(cd),ud},Ra.parseCSS=function(nd){for(var ad=qa.parse(nd,{position:!0,comments:!0}),sd=typeof ad.stylesheet<"u"&&ad.stylesheet.rules?ad.stylesheet.rules:[],ud=[],cd=0,dd=sd.length;cd<dd;cd++)if(sd[cd].type=="rule")for(var pd=sd[cd],fd=pd.selectors,Td=0,Sd=fd.length;Td<Sd;Td++)ud.push([fd[Td],pd.declarations]);return ud},Ra.getPreservedText=function(nd,ad,sd){for(var ud=qa.parse(nd,{position:!0,comments:!0}),cd=typeof ud.stylesheet<"u"&&ud.stylesheet.rules?ud.stylesheet.rules:[],dd=[],pd=cd.length-1;pd>=0;pd--)(ad.fontFaces&&cd[pd].type==="font-face"||ad.mediaQueries&&cd[pd].type==="media"||ad.keyFrames&&cd[pd].type==="keyframes"||ad.pseudos&&cd[pd].selectors&&this.matchesPseudo(cd[pd].selectors[0],sd))&&dd.unshift(qa.stringify({stylesheet:{rules:[cd[pd]]}},{comments:!1,indentation:" "})),cd[pd].position.start;return dd.length===0?!1: `
2024-09-25 14:23:53 +08:00
` +dd.join( `
2024-09-18 09:46:23 +08:00
` )+ `
2024-09-25 14:23:53 +08:00
` },Ra.normalizeLineEndings=function(nd){return nd.replace(/ \r \n /g, `
2024-09-18 09:46:23 +08:00
` ).replace(/ \n /g, ` \ r
2024-11-27 11:30:55 +08:00
` )},Ra.matchesPseudo=function(nd,ad){return ad.find(function(sd){return nd.indexOf(sd)>-1})},Ra.compareFunc=function(nd,ad){for(var sd=Math.min(nd.length,ad.length),ud=0;ud<sd;ud++)if(nd[ud]!==ad[ud])return nd[ud]>ad[ud]?1:-1;return nd.length-ad.length},Ra.compare=function(nd,ad){return Ra.compareFunc(nd,ad)==1?nd:ad},Ra.getDefaultOptions=function(nd){var ad=Object.assign({extraCss:"",insertPreservedExtraCss:!0,applyStyleTags:!0,removeStyleTags:!0,preserveMediaQueries:!0,preserveFontFaces:!0,preserveKeyFrames:!0,preservePseudos:!0,applyWidthAttributes:!0,applyHeightAttributes:!0,applyAttributesTableElements:!0,resolveCSSVariables:!0,url:""},nd);return ad.webResources=ad.webResources||{},ad}}(utils $ 4)),utils $ 4}(function(Ra){var qa=require $ $ 0 $ 2;requireUtils $ 1();var td=function(nd,ad,sd){const{xmlMode:ud,...cd}=ad;return ad=Object.assign({xml:{decodeEntities:!1,xmlMode:ud}},cd),nd=sd(nd),qa.load(nd,ad)},rd=function(){var nd=[],ad=function(ud){var cd=Ra.exports.codeBlocks;return Object.keys(cd).forEach(function(dd){var pd=new RegExp(cd[dd].start+"([ \\ S \\ s]*?)"+cd[dd].end,"g");ud=ud.replace(pd,function(fd,Td){return nd.push(fd),"JUICE_CODE_BLOCK_"+(nd.length-1)+"_"})}),ud},sd=function(ud){for(var cd=0;cd<nd.length;cd++){var dd=new RegExp("JUICE_CODE_BLOCK_"+cd+'_(="")?',"gi");ud=ud.replace(dd,function(){return nd[cd]})}return ud};return{encodeEntities:ad,decodeEntities:sd}};Ra.exports=function(nd,ad,sd,ud){var cd=rd(),dd=td(nd,ad,cd.encodeEntities),pd=[dd];pd.push.apply(pd,ud);var fd=sd.apply(void 0,pd)||dd;return ad&&ad.xmlMode?cd.decodeEntities(fd.xml()):cd.decodeEntities(fd.html())},Ra.exports.codeBlocks={EJS:{start:"<%",end:"%>"},HBS:{start:"{{",end:"}}"}}})(cheerio $ 1);var cheerioExports=cheerio $ 1.exports,numbers $ 1={};numbers $ 1.romanize=function(Ra){if(isNaN(Ra))return NaN;for(var qa=String(+Ra).split(""),td=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],rd="",nd=3;nd--;)rd=(td[+qa.pop()+nd*10]||"")+rd;return Array(+qa.join("")+1).join("M")+rd};numbers $ 1.alphanumeric=function(Ra){for(var qa="",td;Ra>0;)td=(Ra-1)%26,qa=String.fromCharCode(65+td)+qa,Ra=(Ra-td)/26|0;return qa||void 0};const uniqueString=Ra=>{let qa="";do qa=(Math.random()+1).toString(36).substring(2);while(Ra.indexOf(qa)!==-1);return qa},replaceVariables=(Ra,qa)=>{let td=/([a-z \- ]+) \s * \( \s *([^ \( \) ]*?) \s *(?:, \s *([^ \( \) ]*?) \s *)? \s * \) /i,rd=[],nd,ad=uniqueString(qa);for(;(nd=td.exec(qa))!==null;){let ud= ` $ { rd . length } ` ;if(nd[1].toLowerCase()=="var"){const dd=findVariableValue(Ra,nd[2]);if(dd){qa=qa.replace(nd[0],dd);continue}if(nd[3]){qa=qa.replace(nd[0],nd[3]);continue}}let cd= ` $ { ad } $ { ud . padStart ( 5 , "-" ) } ` ;qa=qa.replace(nd[0],cd),rd.push({placeholder:cd,replace:nd[0]})}for(var sd=rd.length-1;sd>=0;sd--){const ud=rd[sd];qa=qa.replace(ud.placeholder,ud.replace)}return qa},findVariableValue=(Ra,qa)=>{for(;Ra;){if(Ra.styleProps&&qa in Ra.styleProps)return Ra.styleProps[qa].value;var Ra=Ra.pseudoElementParent||Ra.parent}};var variables $ 1={replaceVariables,findVariableValue},utils $ 3=requireUtils $ 1(),numbers=numbers $ 1,variables=variables $ 1,inline $ 2=function(qa){qa.ignoredPseudos=["hover","active","focus","visited","link"],qa.widthElements=["TABLE","TD","TH","IMG"],qa.heightElements=["TABLE","TD","TH","IMG"],qa.tableElements=["TABLE","TH","TR","TD","CAPTION","COLGROUP","COL","THEAD","TBODY","TFOOT"],qa.nonVisualElements=["HEAD","TITLE","BASE","LINK","STYLE","META","SCRIPT","NOSCRIPT"],qa.styleToAttribute={"background-color":"bgcolor","background-image":"background","text-align":"align","vertical-align":"valign"},qa.excludedProperties=[],qa.juiceDocument=dd,qa.inlineDocument=td;function td(Td,Sd,Ad){Ad=Ad||{};var Nd=utils $ 3.parseCSS(Sd),Ld=[],Rd="style",Od={};if(Ad.styleAttributeName&&(Rd=Ad.styleAttributeName),Nd.forEach(Ud),Ld.forEach(Hd),Ad.inlinePseudoElements&&Ld.forEach(Vd),Ad.applyWidthAttributes&&Ld.forEach(function(Qd){Zd(Qd,"width")}),Ad.applyHeightAttributes&&Ld.forEach(function(Qd){Zd(Qd,"height")}),Ad.applyAttributesTableElements&&Ld.forEach(Xd),Ad.insert
` +Sd.extraCss,td(Td,Ad,Sd),Td}function pd(Td,Sd){var Ad=[],Nd=Td("style"),Ld,Rd,Od;return Nd.each(function(){if(Od=this,Ld=Od.childNodes,Ld.length!==1){Sd.removeStyleTags&&Td(Od).remove();return}if(Rd=Ld[0].data,Sd.applyStyleTags&&Td(Od).attr("data-embed")===void 0&&Ad.push(Rd),Sd.removeStyleTags&&Td(Od).attr("data-embed")===void 0){var kd=Od.childNodes[0].nodeValue,Fd=utils $ 3.getPreservedText(kd,{mediaQueries:Sd.preserveMediaQueries,fontFaces:Sd.preserveFontFaces,keyFrames:Sd.preserveKeyFrames,pseudos:Sd.preservePseudos},qa.ignoredPseudos);Fd?Od.childNodes[0].nodeValue=Fd:Td(Od).remove()}Td(Od).removeAttr("data-embed")}),Ad}function fd(Td,Sd){var Ad=pd(Td,Sd),Nd=Ad.join( `
` );return Nd}return qa},cheerio=cheerioExports,makeJuiceClient=inline $ 2,juiceClient=makeJuiceClient(function(Ra,qa){return cheerio(Ra,{xmlMode:qa&&qa.xmlMode},juiceDocument,[qa])}),juiceDocument=function(Ra,qa){return juiceClient.juiceDocument(Ra,qa)};juiceClient.inlineContent=function(Ra,qa,td){return cheerio(Ra,{xmlMode:td&&td.xmlMode},juiceClient.inlineDocument,[qa,td])};juiceClient.codeBlocks=cheerio.codeBlocks;var client=juiceClient;const juice=getDefaultExportFromCjs(client);var $ s $ 2=Object.create,je $ 4=Object.defineProperty,Vs $ 1=Object.getOwnPropertyDescriptor,qs $ 2=Object.getOwnPropertyNames,zs $ 1=Object.getPrototypeOf,Ks $ 2=Object.prototype.hasOwnProperty,Hs $ 2=(Ra,qa)=>()=>(qa||Ra((qa={exports:{}}).exports,qa),qa.exports),Ws $ 1=(Ra,qa)=>{for(var td in qa)je $ 4(Ra,td,{get:qa[td],enumerable:!0})},Js $ 1=(Ra,qa,td,rd)=>{if(qa&&typeof qa=="object"||typeof qa=="function")for(let nd of qs $ 2(qa))!Ks $ 2.call(Ra,nd)&&nd!==td&&je $ 4(Ra,nd,{get:()=>qa[nd],enumerable:!(rd=Vs $ 1(qa,nd))||rd.enumerable});return Ra},vt $ 3=(Ra,qa,td)=>(td=Ra!=null? $ s $ 2(zs $ 1(Ra)):{},Js $ 1(je $ 4(td,"default",{value:Ra,enumerable:!0}),Ra)),At $ 5=Hs $ 2(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0});function qa(qd,Md){if(qd==null)return{};var Wd={},pf=Object.keys(qd),Af,zf;for(zf=0;zf<pf.length;zf++)Af=pf[zf],!(Md.indexOf(Af)>=0)&&(Wd[Af]=qd[Af]);return Wd}var td=class{constructor(qd,Md,Wd){this.line=void 0,this.column=void 0,this.index=void 0,this.line=qd,this.column=Md,this.index=Wd}},rd=class{constructor(qd,Md){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=qd,this.end=Md}};function nd(qd,Md){let{line:Wd,column:pf,index:Af}=qd;return new td(Wd,pf+Md,Af+Md)}var ad="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",sd={ImportMetaOutsideModule:{message: ` import . meta may appear only with 'sourceType: "module"' ` ,code:ad},ImportOutsideModule:{message: ` 'import' and 'export' may appear only with 'sourceType: "module"' ` ,code:ad}},ud={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},cd=qd=>qd.type==="UpdateExpression"?ud.UpdateExpression[ ` $ { qd . prefix } ` ]:ud[qd.type],dd={AccessorIsGenerator:({kind:qd})=> ` A $ { qd } ter cannot be a generator . ` ,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'."
- Did you mean \ ` export { ' ${ qd } ' as ' ${ Md } ' } from 'some-module' \` ? ` , ExportDefaultFromAsIdentifier : "'from' is not allowed as an identifier after 'export default'." , ForInOfLoopInitializer : ( { type : qd } ) => ` ' ${ qd === "ForInStatement" ? "for-in" : "for-of" } ' loop variable declaration may not have an initializer. ` , ForInUsing : "For-in loop may not start with 'using' declaration." , ForOfAsync : "The left-hand side of a for-of loop may not be 'async'." , ForOfLet : "The left-hand side of a for-of loop may not start with 'let'." , GeneratorInSingleStatementContext : "Generators can only be declared at the top level or inside a block." , IllegalBreakContinue : ( { type : qd } ) => ` Unsyntactic ${ qd === "BreakStatement" ? "break" : "continue" } . ` , IllegalLanguageModeDirective : "Illegal 'use strict' directive in function with non-simple parameter list." , IllegalReturn : "'return' outside of function." , ImportAttributesUseAssert : "The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error." , ImportBindingIsString : ( { importName : qd } ) => ` A string literal cannot be used as an imported binding.
- Did you mean \ ` import { " ${ qd } " as foo } \` ? ` , ImportCallArgumentTrailingComma : "Trailing comma is disallowed inside import(...) arguments." , ImportCallArity : ( { maxArgumentCount : qd } ) => ` \` import() \` requires exactly ${ qd === 1 ? "one argument" : "one or two arguments" } . ` , ImportCallNotNewExpression : "Cannot use new with import(...)." , ImportCallSpreadArgument : "`...` is not allowed in `import()`." , ImportJSONBindingNotDefault : "A JSON module can only be imported with `default`." , ImportReflectionHasAssertion : "`import module x` cannot have assertions." , ImportReflectionNotBinding : 'Only `import module x from "./module"` is valid.' , IncompatibleRegExpUVFlags : "The 'u' and 'v' regular expression flags cannot be enabled at the same time." , InvalidBigIntLiteral : "Invalid BigIntLiteral." , InvalidCodePoint : "Code point out of bounds." , InvalidCoverInitializedName : "Invalid shorthand property initializer." , InvalidDecimal : "Invalid decimal." , InvalidDigit : ( { radix : qd } ) => ` Expected number in radix ${ qd } . ` , InvalidEscapeSequence : "Bad character escape sequence." , InvalidEscapeSequenceTemplate : "Invalid escape sequence in template." , InvalidEscapedReservedWord : ( { reservedWord : qd } ) => ` Escape sequence in keyword ${ qd } . ` , InvalidIdentifier : ( { identifierName : qd } ) => ` Invalid identifier ${ qd } . ` , InvalidLhs : ( { ancestor : qd } ) => ` Invalid left-hand side in ${ cd ( qd ) } . ` , InvalidLhsBinding : ( { ancestor : qd } ) => ` Binding invalid left-hand side in ${ cd ( qd ) } . ` , InvalidLhsOptionalChaining : ( { ancestor : qd } ) => ` Invalid optional chaining in the left-hand side of ${ cd ( qd ) } . ` , InvalidNumber : "Invalid number." , InvalidOrMissingExponent : "Floating-point numbers require a valid exponent after the 'e'." , InvalidOrUnexpectedToken : ( { unexpected : qd } ) => ` Unexpected character ' ${ qd } '. ` , InvalidParenthesizedAssignment : "Invalid parenthesized assignment pattern." , InvalidPrivateFieldResolution : ( { identifierName : qd } ) => ` Private name # ${ qd } is not defined. ` , InvalidPropertyBindingPattern : "Binding member expression." , InvalidRecordProperty : "Only properties and spread elements are allowed in record definitions." , InvalidRestAssignmentPattern : "Invalid rest operator's argument." , LabelRedeclaration : ( { labelName : qd } ) => ` Label ' ${ qd } ' is already declared. ` , LetInLexicalBinding : "'let' is disallowed as a lexically bound name." , LineTerminatorBeforeArrow : "No line break is allowed before '=>'." , MalformedRegExpFlags : "Invalid regular expression flag." , MissingClassName : "A class name is required." , MissingEqInAssignment : "Only '=' operator can be used for specifying default value." , MissingSemicolon : "Missing semicolon." , MissingPlugin : ( { missingPlugin : qd } ) => ` This experimental syntax requires enabling the parser plugin: ${ qd . map ( Md => JSON . stringify ( Md ) ) . join ( ", " ) } . ` , MissingOneOfPlugins : ( { missingPlugin : qd } ) => ` This experimental syntax requires enabling one of the following parser plugin(s): ${ qd . map ( Md => JSON . stringify ( Md ) ) . join ( ", " ) } . ` , MissingUnicodeEscape : "Expecting Unicode escape sequence \\uXXXX." , MixingCoalesceWithLogical : "Nullish coalescing operator(??) requires parens when mixing with logical operators." , ModuleAttributeDifferentFromType : "The only accepted module attribute is `type`." , ModuleAttributeInvalidValue : "Only string literals are allowed as module attribute values." , ModuleAttributesWithDuplicateKeys : ( { key : qd } ) => ` Duplicate key " ${ qd } " is not allowed in module attributes. ` , ModuleExportNameHasLoneSurrogate : ( { surrogateCharCode : qd } ) => ` An export name cannot include a lone surrogate, found ' \\ u ${ qd . toString ( 16 ) } '. ` , ModuleExportUndefined : ( { localName : qd } ) => ` Export ' ${ qd } ' is not defined. ` , MultipleDefaultsInSwitch : "Multiple default clauses." , NewlineAfterThrow : "Illegal newline after throw." , NoCatchOrFinally : "Missing catch or finally clause." , NumberIdentifier : "Identifier directly after number." , NumericSeparatorInEscapeSequence : "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences." , ObsoleteAwaitStar : "'await*' has been removed from the async functions proposal. Use Promise.all() instead." , OptionalChainingNoNew : "Constructors in/after an Optional Chain are not allowed." , OptionalChainingNoTemplate : " Tagged Template Literals ar
` ,++Wd,Xm===13&&Md.charCodeAt(Wd)===10&&++Wd,++Af,Lm=pf=Wd):zf.unterminated(sh,gh,Ih):++Wd}return{pos:Wd,str:Ch,firstInvalidLoc:hm,lineStart:pf,curLine:Af,containsInvalid:!!hm}}function S_(qd,Md,Wd,pf){return qd==="template"?Md===96||Md===36&&Wd.charCodeAt(pf+1)===123:Md===(qd==="double"?34:39)}function w_(qd,Md,Wd,pf,Af,zf){let sh=!Af;Md++;let gh=Ch=>({pos:Md,ch:Ch,lineStart:Wd,curLine:pf}),Ih=qd.charCodeAt(Md++);switch(Ih){case 110:return gh( `
` );case 114:return gh(" \r ");case 120:{let Ch;return{code:Ch,pos:Md}=p_(qd,Md,Wd,pf,2,!1,sh,zf),gh(Ch===null?null:String.fromCharCode(Ch))}case 117:{let Ch;return{code:Ch,pos:Md}=z_(qd,Md,Wd,pf,sh,zf),gh(Ch===null?null:String.fromCodePoint(Ch))}case 116:return gh(" ");case 98:return gh(" \b ");case 118:return gh(" \v ");case 102:return gh(" \f ");case 13:qd.charCodeAt(Md)===10&&++Md;case 10:Wd=Md,++pf;case 8232:case 8233:return gh("");case 56:case 57:if(Af)return gh(null);zf.strictNumericEscape(Md-1,Wd,pf);default:if(Ih>=48&&Ih<=55){let Ch=Md-1,hm=/^[0-7]+/.exec(qd.slice(Ch,Md+2))[0],Lm=parseInt(hm,8);Lm>255&&(hm=hm.slice(0,-1),Lm=parseInt(hm,8)),Md+=hm.length-1;let zm=qd.charCodeAt(Md);if(hm!=="0"||zm===56||zm===57){if(Af)return gh(null);zf.strictNumericEscape(Ch,Wd,pf)}return gh(String.fromCharCode(Lm))}return gh(String.fromCharCode(Ih))}}function p_(qd,Md,Wd,pf,Af,zf,sh,gh){let Ih=Md,Ch;return{n:Ch,pos:Md}=Om(qd,Md,Wd,pf,16,Af,zf,!1,gh,!sh),Ch===null&&(sh?gh.invalidEscapeSequence(Ih,Wd,pf):Md=Ih-1),{code:Ch,pos:Md}}function Om(qd,Md,Wd,pf,Af,zf,sh,gh,Ih,Ch){let hm=Md,Lm=Af===16?Gm.hex:Gm.decBinOct,zm=Af===16?Nm.hex:Af===10?Nm.dec:Af===8?Nm.oct:Nm.bin,Xm=!1,f_=0;for(let eg=0,T_=zf??1/0;eg<T_;++eg){let R_=qd.charCodeAt(Md),vg;if(R_===95&&gh!=="bail"){let kb=qd.charCodeAt(Md-1),lv=qd.charCodeAt(Md+1);if(gh){if(Number.isNaN(lv)||!zm(lv)||Lm.has(kb)||Lm.has(lv)){if(Ch)return{n:null,pos:Md};Ih.unexpectedNumericSeparator(Md,Wd,pf)}}else{if(Ch)return{n:null,pos:Md};Ih.numericSeparatorInEscapeSequence(Md,Wd,pf)}++Md;continue}if(R_>=97?vg=R_-97+10:R_>=65?vg=R_-65+10:fm(R_)?vg=R_-48:vg=1/0,vg>=Af){if(vg<=9&&Ch)return{n:null,pos:Md};if(vg<=9&&Ih.invalidDigit(Md,Wd,pf,Af))vg=0;else if(sh)vg=0,Xm=!0;else break}++Md,f_=f_*Af+vg}return Md===hm||zf!=null&&Md-hm!==zf||Xm?{n:null,pos:Md}:{n:f_,pos:Md}}function z_(qd,Md,Wd,pf,Af,zf){let sh=qd.charCodeAt(Md),gh;if(sh===123){if(++Md,{code:gh,pos:Md}=p_(qd,Md,Wd,pf,qd.indexOf("}",Md)-Md,!0,Af,zf),++Md,gh!==null&&gh>1114111)if(Af)zf.invalidCodePoint(Md,Wd,pf);else return{code:null,pos:Md}}else({code:gh,pos:Md}=p_(qd,Md,Wd,pf,4,!1,Af,zf));return{code:gh,pos:Md}}function m_(qd,Md,Wd){return new td(Wd,qd-Md,qd)}var a_=new Set([103,109,115,105,121,117,100,118]),Um=class{constructor(qd){this.type=qd.type,this.value=qd.value,this.start=qd.start,this.end=qd.end,this.loc=new rd(qd.startLoc,qd.endLoc)}},y_=class extends ch{constructor(qd,Md){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(Wd,pf,Af,zf)=>this.options.errorRecovery?(this.raise(Od.InvalidDigit,m_(Wd,pf,Af),{radix:zf}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(Od.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(Od.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(Od.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(Od.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(Wd,pf,Af)=>{this.recordStrictModeErrors(Od.StrictNumericEscape,m_(Wd,pf,Af))},unterminated:(Wd,pf,Af)=>{throw this.raise(Od.UnterminatedString,m_(Wd-1,pf,Af))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(Od.StrictNumericEscape),unterminated:(Wd,pf,Af)=>{throw this.raise(Od.UnterminatedTemplate,m_(Wd,pf,Af))}}),this.state=new im,this.state.init(qd),this.input=Md,this.length=Md.length,this.comments=[],this.isLookahead=!1}pushToken(qd){this.tokens.length=this.state.tokensLength,this.tokens.push(qd),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Um(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(qd){return this.match(qd)?(this.next(),!0):!1}match(qd){return this.state.type===qd}createLookaheadState(qd){return{pos:qd.pos,value:null,type:qd.type,start:qd.start,end:qd.end,context:[this.curContext
2024-09-18 09:46:23 +08:00
` : ` \ r
2024-11-27 11:30:55 +08:00
` ):pf=String.fromCharCode(Wd),++this.state.curLine,this.state.lineStart=this.state.pos,pf}jsxReadString(Md){let Wd="",pf=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Od.UnterminatedString,this.state.startLoc);let Af=this.input.charCodeAt(this.state.pos);if(Af===Md)break;Af===38?(Wd+=this.input.slice(pf,this.state.pos),Wd+=this.jsxReadEntity(),pf=this.state.pos):yh(Af)?(Wd+=this.input.slice(pf,this.state.pos),Wd+=this.jsxReadNewLine(!1),pf=this.state.pos):++this.state.pos}Wd+=this.input.slice(pf,this.state.pos++),this.finishToken(133,Wd)}jsxReadEntity(){let Md=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let Wd=10;this.codePointAtPos(this.state.pos)===120&&(Wd=16,++this.state.pos);let pf=this.readInt(Wd,void 0,!1,"bail");if(pf!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(pf)}else{let Wd=0,pf=!1;for(;Wd++<10&&this.state.pos<this.length&&!(pf=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(pf){this.input.slice(Md,this.state.pos);let Af;++this.state.pos}}return this.state.pos=Md,"&"}jsxReadWord(){let Md,Wd=this.state.pos;do Md=this.input.charCodeAt(++this.state.pos);while(Xh(Md)||Md===45);this.finishToken(140,this.input.slice(Wd,this.state.pos))}jsxParseIdentifier(){let Md=this.startNode();return this.match(140)?Md.name=this.state.value:Of(this.state.type)?Md.name=hh(this.state.type):this.unexpected(),this.next(),this.finishNode(Md,"JSXIdentifier")}jsxParseNamespacedName(){let Md=this.state.startLoc,Wd=this.jsxParseIdentifier();if(!this.eat(14))return Wd;let pf=this.startNodeAt(Md);return pf.namespace=Wd,pf.name=this.jsxParseIdentifier(),this.finishNode(pf,"JSXNamespacedName")}jsxParseElementName(){let Md=this.state.startLoc,Wd=this.jsxParseNamespacedName();if(Wd.type==="JSXNamespacedName")return Wd;for(;this.eat(16);){let pf=this.startNodeAt(Md);pf.object=Wd,pf.property=this.jsxParseIdentifier(),Wd=this.finishNode(pf,"JSXMemberExpression")}return Wd}jsxParseAttributeValue(){let Md;switch(this.state.type){case 5:return Md=this.startNode(),this.setContext(Zd.brace),this.next(),Md=this.jsxParseExpressionContainer(Md,Zd.j_oTag),Md.expression.type==="JSXEmptyExpression"&&this.raise(lg.AttributeIsEmpty,Md),Md;case 142:case 133:return this.parseExprAtom();default:throw this.raise(lg.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let Md=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(Md,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(Md){return this.next(),Md.expression=this.parseExpression(),this.setContext(Zd.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(Md,"JSXSpreadChild")}jsxParseExpressionContainer(Md,Wd){if(this.match(8))Md.expression=this.jsxParseEmptyExpression();else{let pf=this.parseExpression();Md.expression=pf}return this.setContext(Wd),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(Md,"JSXExpressionContainer")}jsxParseAttribute(){let Md=this.startNode();return this.match(5)?(this.setContext(Zd.brace),this.next(),this.expect(21),Md.argument=this.parseMaybeAssignAllowIn(),this.setContext(Zd.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(Md,"JSXSpreadAttribute")):(Md.name=this.jsxParseNamespacedName(),Md.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(Md,"JSXAttribute"))}jsxParseOpeningElementAt(Md){let Wd=this.startNodeAt(Md);return this.eat(143)?this.finishNode(Wd,"JSXOpeningFragment"):(Wd.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(Wd))}jsxParseOpeningElementAfterName(Md){let Wd=[];for(;!this.match(56)&&!this.match(143);)Wd.push(this.jsxParseAttribute());return Md.attributes=Wd,Md.selfClosing=this.eat(56),this.expect(143),this.finishNode(Md,"JSXOpeningElement")}jsxParseClosingElementAt(Md){let Wd=this.startNodeAt(Md);return this.eat(143)?this.finishNode(Wd,"JSXClosingFragment"):(Wd.name=this.jsxParseElementName(),this.expect(143),this.finishNode(Wd,"JSXClosingElement"))}jsxParseElementAt(Md){let Wd=this.startNodeAt(Md),pf=[],Af
` ),cooked:Af===null?null:Af.slice(1,Ih)},sh.tail=gh,this.next();let hm=this.finishNode(sh,"TemplateElement");return this.resetEndLocation(hm,nd(this.state.lastTokEndLoc,Ih)),hm}parseTemplate(qd){let Md=this.startNode(),Wd=this.parseTemplateElement(qd),pf=[Wd],Af=[];for(;!Wd.tail;)Af.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),pf.push(Wd=this.parseTemplateElement(qd));return Md.expressions=Af,Md.quasis=pf,this.finishNode(Md,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(qd,Md,Wd,pf){Wd&&this.expectPlugin("recordAndTuple");let Af=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let zf=Object.create(null),sh=!0,gh=this.startNode();for(gh.properties=[],this.next();!this.match(qd);){if(sh)sh=!1;else if(this.expect(12),this.match(qd)){this.addTrailingCommaExtraToNode(gh);break}let Ch;Md?Ch=this.parseBindingProperty():(Ch=this.parsePropertyDefinition(pf),this.checkProto(Ch,Wd,zf,pf)),Wd&&!this.isObjectProperty(Ch)&&Ch.type!=="SpreadElement"&&this.raise(Od.InvalidRecordProperty,Ch),Ch.shorthand&&this.addExtra(Ch,"shorthand",!0),gh.properties.push(Ch)}this.next(),this.state.inFSharpPipelineDirectBody=Af;let Ih="ObjectExpression";return Md?Ih="ObjectPattern":Wd&&(Ih="RecordExpression"),this.finishNode(gh,Ih)}addTrailingCommaExtraToNode(qd){this.addExtra(qd,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(qd,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(qd){return!qd.computed&&qd.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(qd){let Md=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(Od.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)Md.push(this.parseDecorator());let Wd=this.startNode(),pf=!1,Af=!1,zf;if(this.match(21))return Md.length&&this.unexpected(),this.parseSpread();Md.length&&(Wd.decorators=Md,Md=[]),Wd.method=!1,qd&&(zf=this.state.startLoc);let sh=this.eat(55);this.parsePropertyNamePrefixOperator(Wd);let gh=this.state.containsEsc;if(this.parsePropertyName(Wd,qd),!sh&&!gh&&this.maybeAsyncOrAccessorProp(Wd)){let{key:Ih}=Wd,Ch=Ih.name;Ch==="async"&&!this.hasPrecedingLineBreak()&&(pf=!0,this.resetPreviousNodeTrailingComments(Ih),sh=this.eat(55),this.parsePropertyName(Wd)),(Ch==="get"||Ch==="set")&&(Af=!0,this.resetPreviousNodeTrailingComments(Ih),Wd.kind=Ch,this.match(55)&&(sh=!0,this.raise(Od.AccessorIsGenerator,this.state.curPosition(),{kind:Ch}),this.next()),this.parsePropertyName(Wd))}return this.parseObjPropValue(Wd,zf,sh,pf,!1,Af,qd)}getGetterSetterExpectedParamCount(qd){return qd.kind==="get"?0:1}getObjectOrClassMethodParams(qd){return qd.params}checkGetterSetterParams(qd){var Md;let Wd=this.getGetterSetterExpectedParamCount(qd),pf=this.getObjectOrClassMethodParams(qd);pf.length!==Wd&&this.raise(qd.kind==="get"?Od.BadGetterArity:Od.BadSetterArity,qd),qd.kind==="set"&&((Md=pf[pf.length-1])==null?void 0:Md.type)==="RestElement"&&this.raise(Od.BadSetterRestParameter,qd)}parseObjectMethod(qd,Md,Wd,pf,Af){if(Af){let zf=this.parseMethod(qd,Md,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(zf),zf}if(Wd||Md||this.match(10))return pf&&this.unexpected(),qd.kind="method",qd.method=!0,this.parseMethod(qd,Md,Wd,!1,!1,"ObjectMethod")}parseObjectProperty(qd,Md,Wd,pf){if(qd.shorthand=!1,this.eat(14))return qd.value=Wd?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(pf),this.finishNode(qd,"ObjectProperty");if(!qd.computed&&qd.key.type==="Identifier"){if(this.checkReservedWord(qd.key.name,qd.key.loc.start,!0,!1),Wd)qd.value=this.parseMaybeDefault(Md,bg(qd.key));else if(this.match(29)){let Af=this.state.startLoc;pf!=null?pf.shorthandAssignLoc===null&&(pf.shorthandAssignLoc=Af):this.raise(Od.InvalidCoverInitializedName,Af),qd.value=this.parseMaybeDefault(Md,bg(qd.key))}else qd.value=bg(qd.key);return qd.shorthand=!0,this.finishNode(qd,"ObjectProperty")}}parseObjPropValue(qd,Md,Wd,pf,Af,zf,sh){let gh=this.parseObjectMethod(qd,Wd,pf,Af,zf)||this.parseObjectPr
2024-09-25 14:23:53 +08:00
` )return qa-2;if(nd=== `
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa-1}else{if(nd===" \r "&&Ra.charAt(qa+1)=== `
` )return qa+2;if(nd=== `
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa+1}return qa}var us $ 2=mr $ 2;function yr $ 2(Ra,qa){return qa===!1?!1:Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="/"?cs $ 3(Ra,qa):qa}var fs $ 2=yr $ 2;function xr $ 3(Ra,qa){let td=null,rd=qa;for(;rd!==td;)td=rd,rd=ls $ 1(Ra,rd),rd=ps $ 1(Ra,rd),rd=fs $ 2(Ra,rd),rd=us $ 2(Ra,rd);return rd}var ds $ 1=xr $ 3;function Pr $ 3(Ra){let qa=[];for(let td of Ra)try{return td()}catch(rd){qa.push(rd)}throw Object.assign(new Error("All combinations failed"),{errors:qa})}var ms $ 3=Pr $ 3;function gr $ 2(Ra){if(!Ra.startsWith("#!"))return"";let qa=Ra.indexOf( `
` );return qa===-1?Ra:Ra.slice(0,qa)}var Oe $ 4=gr $ 2,Tr $ 3=(Ra,qa,td)=>{if(!(Ra&&qa==null))return Array.isArray(qa)||typeof qa=="string"?qa[td<0?qa.length+td:td]:qa.at(td)},St $ 3=Tr $ 3;function br $ 4(Ra){return Array.isArray(Ra)&&Ra.length>0}var Pe $ 4=br $ 4;function D $ 2(Ra){var qa,td,rd;let nd=((qa=Ra.range)==null?void 0:qa[0])??Ra.start,ad=(rd=((td=Ra.declaration)==null?void 0:td.decorators)??Ra.decorators)==null?void 0:rd[0];return ad?Math.min(D $ 2(ad),nd):nd}function B $ 2(Ra){var qa;return((qa=Ra.range)==null?void 0:qa[1])??Ra.end}function Ar $ 2(Ra){let qa=new Set(Ra);return td=>qa.has(td==null?void 0:td.type)}var ys $ 3=Ar $ 2,Sr $ 3=ys $ 3(["Block","CommentBlock","MultiLine"]),ge $ 4=Sr $ 3;function wr $ 3(Ra){let qa= ` * $ { Ra . value } * ` .split( `
` );return qa.length>1&&qa.every(td=>td.trimStart()[0]==="*")}var wt $ 2=wr $ 3;function Cr $ 1(Ra){return ge $ 4(Ra)&&Ra.value[0]==="*"&&/@(?:type|satisfies) \b /u.test(Ra.value)}var xs $ 2=Cr $ 1,Te $ 3=null;function be $ 5(Ra){if(Te $ 3!==null&&typeof Te $ 3.property){let qa=Te $ 3;return Te $ 3=be $ 5.prototype=null,qa}return Te $ 3=be $ 5.prototype=Ra??Object.create(null),new be $ 5}var Er $ 2=10;for(let Ra=0;Ra<=Er $ 2;Ra++)be $ 5();function Ct $ 4(Ra){return be $ 5(Ra)}function Ir $ 3(Ra,qa="type"){Ct $ 4(Ra);function td(rd){let nd=rd[qa],ad=Ra[nd];if(!Array.isArray(ad))throw Object.assign(new Error( ` Missing visitor keys for '${nd}' . ` ),{node:rd});return ad}return td}var Ps $ 1=Ir $ 3,gs $ 4={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","vari
` ;Ra=ie $ 3(!1,Ra.replace(Or $ 3,"").replace(Mr $ 3,""),Ur $ 3," $ 1");let td="";for(;td!==Ra;)td=Ra,Ra=ie $ 3(!1,Ra,Rr $ 2, ` $ { qa } $1 $2$ { qa } ` );Ra=Ra.replace(Ss $ 1,"").trimEnd();let rd=Object.create(null),nd=ie $ 3(!1,Ra,ws $ 2,"").replace(Ss $ 1,"").trimEnd(),ad;for(;ad=ws $ 2.exec(Ra);){let sd=ie $ 3(!1,ad[2],Br $ 4,"");if(typeof rd[ad[1]]=="string"||Array.isArray(rd[ad[1]])){let ud=rd[ad[1]];rd[ad[1]]=[..._r $ 3,...Array.isArray(ud)?ud:[ud],sd]}else rd[ad[1]]=sd}return{comments:nd,pragmas:rd}}function jr $ 3(Ra){let qa=Oe $ 4(Ra);qa&&(Ra=Ra.slice(qa.length+1));let td=Cs $ 1(Ra),{pragmas:rd,comments:nd}=Es $ 1(td);return{shebang:qa,text:Ra,pragmas:rd,comments:nd}}function Is $ 3(Ra){let{pragmas:qa}=jr $ 3(Ra);return Object.prototype.hasOwnProperty.call(qa,"prettier")||Object.prototype.hasOwnProperty.call(qa,"format")}function $ r $ 3(Ra){return Ra=typeof Ra=="function"?{parse:Ra}:Ra,{astFormat:"estree",hasPragma:Is $ 3,locStart:D $ 2,locEnd:B $ 2,...Ra}}var G $ 4= $ r $ 3;function Vr $ 3(Ra){let{filepath:qa}=Ra;if(qa){if(qa=qa.toLowerCase(),qa.endsWith(".cjs"))return"script";if(qa.endsWith(".mjs"))return"module"}}var Ns $ 1=Vr $ 3;function qr $ 3(Ra,qa){let{type:td="JsExpressionRoot",rootMarker:rd,text:nd}=qa,{tokens:ad,comments:sd}=Ra;return delete Ra.tokens,delete Ra.comments,{tokens:ad,comments:sd,type:td,node:Ra,range:[0,nd.length],rootMarker:rd}}var Ue $ 4=qr $ 3,re $ 4=Ra=>G $ 4(Jr $ 3(Ra)),zr $ 3={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}],"sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],"recordAndTuple"],tokens:!0,ranges:!0},ks $ 1="v8intrinsic",vs $ 1=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],V $ 5=(Ra,qa=zr $ 3)=>({...qa,plugins:[...qa.plugins,...Ra]}),Kr $ 4=/@(?:no)?flow \b /u;function Hr $ 4(Ra,qa){var td;if((td=qa.filepath)!=null&&td.endsWith(".js.flow"))return!0;let rd=Oe $ 4(Ra);rd&&(Ra=Ra.slice(rd.length));let nd=ds $ 1(Ra,0);return nd!==!1&&(Ra=Ra.slice(0,nd)),Kr $ 4.test(Ra)}function Wr $ 3(Ra,qa,td){let rd=Ra(qa,td),nd=rd.errors.find(ad=>!Xr $ 3.has(ad.reasonCode));if(nd)throw nd;return rd}function Jr $ 3({isExpression:Ra=!1,optionsCombinations:qa}){return(td,rd={})=>{if((rd.parser==="babel"||rd.parser==="__babel_estree")&&Hr $ 4(td,rd))return rd.parser="babel-flow",Bs $ 3.parse(td,rd);let nd=qa;(rd.__babelSourceType??Ns $ 1(rd))==="script"&&(nd=nd.map(cd=>({...cd,sourceType:"script"})));let ad=/%[A-Z]/u.test(td);td.includes("|>")?nd=(ad?[...vs $ 1,ks $ 1]:vs $ 1).flatMap(cd=>nd.map(dd=>V $ 5([cd],dd))):ad&&(nd=nd.map(cd=>V $ 5([ks $ 1],cd)));let sd=Ra?_e $ 4.parseExpression:_e $ 4.parse,ud;try{ud=ms $ 3(nd.map(cd=>()=>Wr $ 3(sd,td,cd)))}catch({errors:[cd]}){throw Re $ 5(cd)}return Ra&&(ud=Ue $ 4(ud,{text:td,rootMarker:rd.rootMarker})),As $ 2(ud,{parser:"babel",text:td})}}var Xr $ 3=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),Fs
` )return qa-2;if(nd=== `
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa-1}else{if(nd===" \r "&&Ra.charAt(qa+1)=== `
` )return qa+2;if(nd=== `
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa+1}return qa}var Ue $ 3= $ a $ 2;function Ka $ 1(Ra,qa,td={}){let rd=Ge $ 2(Ra,td.backwards?qa-1:qa,td),nd=Ue $ 3(Ra,rd,td);return rd!==nd}var te $ 3=Ka $ 1;function za(Ra,qa){if(qa===!1)return!1;if(Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="*"){for(let td=qa+2;td<Ra.length;++td)if(Ra.charAt(td)==="*"&&Ra.charAt(td+1)==="/")return td+2}return qa}var Lt $ 2=za;function Qa(Ra,qa){return qa===!1?!1:Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="/"?zs(Ra,qa):qa}var wt $ 1=Qa;function Za $ 1(Ra,qa){let td=null,rd=qa;for(;rd!==td;)td=rd,rd=Ks $ 1(Ra,rd),rd=Lt $ 2(Ra,rd),rd=Ge $ 2(Ra,rd);return rd=wt $ 1(Ra,rd),rd=Ue $ 3(Ra,rd),rd!==!1&&te $ 3(Ra,rd)}var Ot $ 3=Za $ 1;function eo $ 1(Ra){return Array.isArray(Ra)&&Ra.length>0}var w $ 1=eo $ 1,dr $ 1="'",Qs $ 1='"';function to $ 1(Ra,qa){let td=qa===!0||qa===dr $ 1?dr $ 1:Qs $ 1,rd=td===dr $ 1?Qs $ 1:dr $ 1,nd=0,ad=0;for(let sd of Ra)sd===td?nd++:sd===rd&&ad++;return nd>ad?rd:td}var xr $ 2=to $ 1;function ro $ 1(Ra,qa,td){let rd=qa==='"'?"'":'"',nd=N $ 4(!1,Ra,/ \\ (.)|(["'])/gsu,(ad,sd,ud)=>sd===rd?sd:ud===qa?" \\ "+ud:ud||(td&&/^[^ \n \r "'0-7 \\ bfnrt-vx \u 2028 \u 2029] $ /u.test(sd)?sd:" \\ "+sd));return qa+nd+qa}var Zs $ 1=ro $ 1;function no $ 2(Ra,qa){let td=Ra.slice(1,-1),rd=qa.parser==="json"||qa.parser==="jsonc"||qa.parser==="json5"&&qa.quoteProps==="preserve"&&!qa.singleQuote?'"':qa.__isInHtmlAttribute?"'":xr $ 2(td,qa.singleQuote);return Zs $ 1(td,rd,!(qa.parser==="css"||qa.parser==="less"||qa.parser==="scss"||qa.__embeddedInHtml))}var tt $ 3=no $ 2;function R $ 4(Ra){var qa,td,rd;let nd=((qa=Ra.range)==null?void 0:qa[0])??Ra.start,ad=(rd=((td=Ra.declaration)==null?void 0:td.decorators)??Ra.decorators)==null?void 0:rd[0];return ad?Math.min(R $ 4(ad),nd):nd}function k $ 1(Ra){var qa;return((qa=Ra.range)==null?void 0:qa[1])??Ra.end}function ht $ 3(Ra,qa){let td=R $ 4(Ra);return Number.isInteger(td)&&td===R $ 4(qa)}function so $ 2(Ra,qa){let td=k $ 1(Ra);return Number.isInteger(td)&&td===k $ 1(qa)}function eu $ 2(Ra,qa){return ht $ 3(Ra,qa)&&so $ 2(Ra,qa)}var Qt $ 2=null;function Zt $ 2(Ra){if(Qt $ 2!==null&&typeof Qt $ 2.property){let qa=Qt $ 2;return Qt $ 2=Zt $ 2.prototype=null,qa}return Qt $ 2=Zt $ 2.prototype=Ra??Object.create(null),new Zt $ 2}var uo $ 3=10;for(let Ra=0;Ra<=uo $ 3;Ra++)Zt $ 2();function In $ 1(Ra){return Zt $ 2(Ra)}function io $ 2(Ra,qa="type"){In $ 1(Ra);function td(rd){let nd=rd[qa],ad=Ra[nd];if(!Array.isArray(ad))throw Object.assign(new Error( ` Missing visitor keys for '${nd}' . ` ),{node:rd});return ad}return td}var hr $ 3=io $ 2,tu $ 3={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument
` ):Ra.type==="UnaryExpression"?rr $ 2(Ra.argument,{printWidth:td}):Ra.type==="CallExpression"&&Ra.arguments.length===0&&Ra.callee.type==="Identifier"?Ra.callee.name.length<=rd-2:kr $ 2(Ra)}function Oe $ 3(Ra,qa){return X $ 4(qa)?Bt $ 4(qa):d $ 1(qa,g $ 3.Leading,td=>te $ 3(Ra,k $ 1(td)))}function nu $ 4(Ra){return Ra.quasis.some(qa=>qa.value.raw.includes( `
` ))}function Lr $ 2(Ra,qa){return(Ra.type==="TemplateLiteral"&&nu $ 4(Ra)||Ra.type==="TaggedTemplateExpression"&&nu $ 4(Ra.quasi))&&!te $ 3(qa,R $ 4(Ra),{backwards:!0})}function wr $ 2(Ra){if(!d $ 1(Ra))return!1;let qa=O $ 3(!1,ct $ 1(Ra,g $ 3.Dangling),-1);return qa&&!re $ 3(qa)}function lu $ 3(Ra){if(Ra.length<=1)return!1;let qa=0;for(let td of Ra)if(_t $ 2(td)){if(qa+=1,qa>1)return!0}else if(L $ 4(td)){for(let rd of oe $ 3(td))if(_t $ 2(rd))return!0}return!1}function Or $ 2(Ra){let{node:qa,parent:td,key:rd}=Ra;return rd==="callee"&&L $ 4(qa)&&L $ 4(td)&&td.arguments.length>0&&qa.arguments.length>td.arguments.length}var xo $ 3=new Set(["!","-","+","~"]);function be $ 4(Ra,qa=2){if(qa<=0)return!1;if(Ra.type==="ChainExpression"||Ra.type==="TSNonNullExpression")return be $ 4(Ra.expression,qa);let td=rd=>be $ 4(rd,qa-1);if(vn $ 2(Ra))return et $ 4(Ra.pattern??Ra.regex.pattern)<=5;if(kr $ 2(Ra)||Do $ 2(Ra)||Ra.type==="ArgumentPlaceholder")return!0;if(Ra.type==="TemplateLiteral")return Ra.quasis.every(rd=>!rd.value.raw.includes( `
` ))&&Ra.expressions.every(td);if(se $ 2(Ra))return Ra.properties.every(rd=>!rd.computed&&(rd.shorthand||rd.value&&td(rd.value)));if(U $ 3(Ra))return Ra.elements.every(rd=>rd===null||td(rd));if(lt $ 2(Ra)){if(Ra.type==="ImportExpression"||be $ 4(Ra.callee,qa)){let rd=oe $ 3(Ra);return rd.length<=qa&&rd.every(td)}return!1}return q $ 3(Ra)?be $ 4(Ra.object,qa)&&be $ 4(Ra.property,qa):Ra.type==="UnaryExpression"&&xo $ 3.has(Ra.operator)||Ra.type==="UpdateExpression"?be $ 4(Ra.argument,qa):!1}function fe $ 3(Ra){var qa;return((qa=Ra.extra)==null?void 0:qa.raw)??Ra.raw}function mu $ 2(Ra){return Ra}function ae $ 1(Ra,qa="es5"){return Ra.trailingComma==="es5"&&qa==="es5"||Ra.trailingComma==="all"&&(qa==="all"||qa==="es5")}function ie $ 2(Ra,qa){switch(Ra.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return ie $ 2(Ra.left,qa);case"MemberExpression":case"OptionalMemberExpression":return ie $ 2(Ra.object,qa);case"TaggedTemplateExpression":return Ra.tag.type==="FunctionExpression"?!1:ie $ 2(Ra.tag,qa);case"CallExpression":case"OptionalCallExpression":return Ra.callee.type==="FunctionExpression"?!1:ie $ 2(Ra.callee,qa);case"ConditionalExpression":return ie $ 2(Ra.test,qa);case"UpdateExpression":return!Ra.prefix&&ie $ 2(Ra.argument,qa);case"BindExpression":return Ra.object&&ie $ 2(Ra.object,qa);case"SequenceExpression":return ie $ 2(Ra.expressions[0],qa);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return ie $ 2(Ra.expression,qa);default:return qa(Ra)}}var su $ 3={"==":!0,"!=":!0,"===":!0,"!==":!0},br $ 3={"*":!0,"/":!0,"%":!0},_n $ 3={">>":!0,">>>":!0,"<<":!0};function nr $ 2(Ra,qa){return!(er $ 2(qa)!==er $ 2(Ra)||Ra==="**"||su $ 3[Ra]&&su $ 3[qa]||qa==="%"&&br $ 3[Ra]||Ra==="%"&&br $ 3[qa]||qa!==Ra&&br $ 3[qa]&&br $ 3[Ra]||_n $ 3[Ra]&&_n $ 3[qa])}var ho $ 2=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((Ra,qa)=>Ra.map(td=>[td,qa])));function er $ 2(Ra){return ho $ 2.get(Ra)}function yu $ 2(Ra){return!!_n $ 3[Ra]||Ra==="|"||Ra==="^"||Ra==="&"}function Du $ 2(Ra){var qa;if(Ra.rest)return!0;let td=K $ 3(Ra);return((qa=O $ 3(!1,td,-1))==null?void 0:qa.type)==="RestElement"}var wn $ 3=new WeakMap;function K $ 3(Ra){if(wn $ 3.has(Ra))return wn $ 3.get(Ra);let qa=[];return Ra.this&&qa.push(Ra.this),Array.isArray(Ra.parameters)?qa.push(...Ra.parameters):Array.isArray(Ra.params)&&qa.push(...Ra.params),Ra.rest&&qa.push(Ra.rest),wn $ 3.set(Ra,qa),qa}function fu $ 1(Ra,qa){let{node:td}=Ra,rd=0,nd=ad=>qa(ad,rd++);td.this&&Ra.call(nd,"this"),Array.isArray(td.parameters)?Ra.each(nd,"parameters"):Array.isArray(td.params)&&Ra.each(nd,"params"),td.rest&&Ra.call(nd,"rest")}var On $ 3=new WeakMap;function oe $ 3(Ra){if(On $ 3.has(Ra))return On $ 3.get(Ra);if(Ra.type==="ChainExpression")return oe $ 3(Ra.expression);let qa=Ra.arguments;return Ra.type==="ImportExpression"&&(qa=[Ra.source],Ra.attributes&&qa.push(Ra.attributes),Ra.options&&qa.push(Ra.options)),On $ 3.set(Ra,qa),qa}function Rt $ 4(Ra,qa){let{node:td}=Ra;if(td.type==="ChainExpression")return Ra.call(()=>Rt $ 4(Ra,qa),"expression");td.type==="ImportExpression"?(Ra.call(rd=>qa(rd,0),"source"),td.attributes&&Ra.call(rd=>qa(rd,1),"attributes"),td.options&&Ra.call(rd=>qa(rd,1),"options")):Ra.each(qa,"arguments")}function Rn $ 2(Ra,qa){let td=[];if(Ra.type==="ChainExpression"&&(Ra=Ra.expression,td.push("expression")),Ra.type==="ImportExpression"){if(qa===0||qa===(Ra.attributes||Ra.options?-2:-1))return[...td,"source"];if(Ra.attributes&&(qa===1||qa===-1))return[...td,"attributes"];if(Ra.options&&(qa===1||qa===-1))return[...td,"options"];throw new RangeError("Invalid argument index")}if(qa<0&&(qa=Ra.arguments.length+qa),qa<0||qa>=Ra.arguments.length)throw new RangeError("Invalid argument index");return[...td,"arguments",qa]}function sr $ 2(Ra){return Ra.value.trim()==="prettier-ignore"&&!Ra.unignore}function Bt $ 4(Ra){return(Ra==null?void 0:Ra.prettierIgnore)||d $ 1(Ra,g $ 3.PrettierIgnore)}var g $ 3={Leading:2,Trailing:4,
Expected it to be 'string' or 'object' . ` ;if(ut $ 1(Ra))throw new Error("doc is valid.");let td=Object.prototype.toString.call(Ra);if(td!=="[object Object]")return ` Unexpected doc '${td}' . ` ;let rd=Bo $ 2([...jr $ 2].map(nd=> ` '${nd}' ` ));return ` Unexpected doc . type '${Ra.type}' .
Expected it to be $ { rd } . ` }var Jn $ 4=class extends Error{constructor(td){super(bo $ 1(td));Qm(this,"name","InvalidDocError");this.doc=td}},Ct $ 3=Jn $ 4,Au $ 1={};function Po $ 1(Ra,qa,td,rd){let nd=[Ra];for(;nd.length>0;){let ad=nd.pop();if(ad===Au $ 1){td(nd.pop());continue}td&&nd.push(ad,Au $ 1);let sd=ut $ 1(ad);if(!sd)throw new Ct $ 3(ad);if((qa==null?void 0:qa(ad))!==!1)switch(sd){case _e $ 3:case Pe $ 3:{let ud=sd===_e $ 3?ad:ad.parts;for(let cd=ud.length,dd=cd-1;dd>=0;--dd)nd.push(ud[dd]);break}case xe $ 3:nd.push(ad.flatContents,ad.breakContents);break;case le $ 3:if(rd&&ad.expandedStates)for(let ud=ad.expandedStates.length,cd=ud-1;cd>=0;--cd)nd.push(ad.expandedStates[cd]);else nd.push(ad.contents);break;case Ye $ 2:case Xe $ 2:case He $ 2:case je $ 3:case Ve $ 3:nd.push(ad.contents);break;case rt $ 2:case nt $ 2:case st $ 2:case $ e $ 3:case me $ 1:case ve $ 3:break;default:throw new Ct $ 3(ad)}}}var qn $ 3=Po $ 1,Tu $ 2=()=>{},vr $ 1=Tu $ 2;function f $ 1(Ra){return{type:Xe $ 2,contents:Ra}}function he $ 2(Ra,qa){return{type:Ye $ 2,contents:qa,n:Ra}}function l $ 1(Ra,qa={}){return vr $ 1(qa.expandedStates),{type:le $ 3,id:qa.id,contents:Ra,break:!!qa.shouldBreak,expandedStates:qa.expandedStates}}function du $ 3(Ra){return he $ 2(Number.NEGATIVE_INFINITY,Ra)}function Mr $ 2(Ra){return he $ 2(-1,Ra)}function ze $ 3(Ra,qa){return l $ 1(Ra[0],{...qa,expandedStates:Ra})}function qt $ 2(Ra){return{type:Pe $ 3,parts:Ra}}function b $ 2(Ra,qa="",td={}){return{type:xe $ 3,breakContents:Ra,flatContents:qa,groupId:td.groupId}}function At $ 4(Ra,qa){return{type:He $ 2,contents:Ra,groupId:qa.groupId,negate:qa.negate}}function Wn $ 2(Ra){return{type:Ve $ 3,contents:Ra}}var ke $ 3={type: $ e $ 3},Ee $ 3={type:ve $ 3},Gn $ 4={type:me $ 1,hard:!0},ko $ 1={type:me $ 1,hard:!0,literal:!0},x $ 3={type:me $ 1},E $ 2={type:me $ 1,soft:!0},F $ 1=[Gn $ 4,Ee $ 3],Rr $ 1=[ko $ 1,Ee $ 3],Un $ 3={type:nt $ 2};function P $ 3(Ra,qa){let td=[];for(let rd=0;rd<qa.length;rd++)rd!==0&&td.push(Ra),td.push(qa[rd]);return td}function xu $ 1(Ra,qa,td){let rd=Ra;if(qa>0){for(let nd=0;nd<Math.floor(qa/td);++nd)rd=f $ 1(rd);rd=he $ 2(qa%td,rd),rd=he $ 2(Number.NEGATIVE_INFINITY,rd)}return rd}function it $ 2(Ra,qa){return Ra?{type:je $ 3,label:Ra,contents:qa}:qa}function mt $ 3(Ra,qa){if(typeof Ra=="string")return qa(Ra);let td=new Map;return rd(Ra);function rd(ad){if(td.has(ad))return td.get(ad);let sd=nd(ad);return td.set(ad,sd),sd}function nd(ad){switch(ut $ 1(ad)){case _e $ 3:return qa(ad.map(rd));case Pe $ 3:return qa({...ad,parts:ad.parts.map(rd)});case xe $ 3:return qa({...ad,breakContents:rd(ad.breakContents),flatContents:rd(ad.flatContents)});case le $ 3:{let{expandedStates:sd,contents:ud}=ad;return sd?(sd=sd.map(rd),ud=sd[0]):ud=rd(ud),qa({...ad,contents:ud,expandedStates:sd})}case Ye $ 2:case Xe $ 2:case He $ 2:case je $ 3:case Ve $ 3:return qa({...ad,contents:rd(ad.contents)});case rt $ 2:case nt $ 2:case st $ 2:case $ e $ 3:case me $ 1:case ve $ 3:return qa(ad);default:throw new Ct $ 3(ad)}}}function gu $ 2(Ra,qa,td){let rd=td,nd=!1;function ad(sd){if(nd)return!1;let ud=qa(sd);ud!==void 0&&(nd=!0,rd=ud)}return qn $ 3(Ra,ad),rd}function Io $ 1(Ra){if(Ra.type===le $ 3&&Ra.break||Ra.type===me $ 1&&Ra.hard||Ra.type===ve $ 3)return!0}function ne $ 3(Ra){return gu $ 2(Ra,Io $ 1,!1)}function hu $ 3(Ra){if(Ra.length>0){let qa=O $ 3(!1,Ra,-1);!qa.expandedStates&&!qa.break&&(qa.break="propagated")}return null}function Su $ 1(Ra){let qa=new Set,td=[];function rd(ad){if(ad.type===ve $ 3&&hu $ 3(td),ad.type===le $ 3){if(td.push(ad),qa.has(ad))return!1;qa.add(ad)}}function nd(ad){ad.type===le $ 3&&td.pop().break&&hu $ 3(td)}qn $ 3(Ra,rd,nd,!0)}function Lo $ 2(Ra){return Ra.type===me $ 1&&!Ra.hard?Ra.soft?"":" ":Ra.type===xe $ 3?Ra.flatContents:Ra}function ur $ 2(Ra){return mt $ 3(Ra,Lo $ 2)}function wo $ 2(Ra){switch(ut $ 1(Ra)){case Pe $ 3:if(Ra.parts.every(qa=>qa===""))return"";break;case le $ 3:if(!Ra.contents&&!Ra.id&&!Ra.break&&!Ra.expandedStates)return"";if(Ra.contents.type===le $ 3&&Ra.contents.id===Ra.id&&Ra.contents.break===Ra.break&&Ra.contents.expandedStates===Ra.expandedStates)return Ra.contents;break;case Ye $ 2:case Xe $ 2:case He $ 2:case Ve $ 3:if(!Ra.contents)return"";break;case xe $ 3:if(!Ra.flatContents&&!Ra.breakContents)return"";break;case _e $ 3:{let qa=[];for(let td of Ra){if(!td)continue;let[r
` )):td)}function Oo $ 1(Ra){if(Ra.type===me $ 1)return!0}function Bu $ 1(Ra){return gu $ 2(Ra,Oo $ 1,!1)}function ir $ 3(Ra,qa){return Ra.type===je $ 3?{...Ra,contents:qa(Ra.contents)}:qa(Ra)}function _o $ 2(Ra){let qa= ` * $ { Ra . value } * ` .split( `
` );return qa.length>1&&qa.every(td=>td.trimStart()[0]==="*")}var bu $ 2=_o $ 2;function Pu $ 1(Ra,qa){let td=Ra.node;if(vt $ 2(td))return qa.originalText.slice(R $ 4(td),k $ 1(td)).trimEnd();if(re $ 3(td))return bu $ 2(td)?jo $ 2(td):["/*",Ie $ 2(td.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(td))}function jo $ 2(Ra){let qa=Ra.value.split( `
` );return["/*",P $ 3(F $ 1,qa.map((td,rd)=>rd===0?td.trimEnd():" "+(rd<qa.length-1?td.trim():td.trimStart()))),"*/"]}var Kn $ 3={};Ar $ 1(Kn $ 3,{endOfLine:()=>Go $ 2,ownLine:()=>Wo $ 2,remaining:()=>Uo $ 3});function vo(Ra){let qa=Ra.type||Ra.kind||"(unknown type)",td=String(Ra.name||Ra.id&&(typeof Ra.id=="object"?Ra.id.name:Ra.id)||Ra.key&&(typeof Ra.key=="object"?Ra.key.name:Ra.key)||Ra.value&&(typeof Ra.value=="object"?"":String(Ra.value))||Ra.operator||"");return td.length>20&&(td=td.slice(0,19)+"…"),qa+(td?" "+td:"")}function Nn $ 3(Ra,qa){(Ra.comments??(Ra.comments=[])).push(qa),qa.printed=!1,qa.nodeDescription=vo(Ra)}function ce $ 3(Ra,qa){qa.leading=!0,qa.trailing=!1,Nn $ 3(Ra,qa)}function Le $ 3(Ra,qa,td){qa.leading=!1,qa.trailing=!1,td&&(qa.marker=td),Nn $ 3(Ra,qa)}function z $ 3(Ra,qa){qa.leading=!1,qa.trailing=!0,Nn $ 3(Ra,qa)}function Mo $ 3(Ra,qa){let td=null,rd=qa;for(;rd!==td;)td=rd,rd=Ge $ 2(Ra,rd),rd=Lt $ 2(Ra,rd),rd=wt $ 1(Ra,rd),rd=Ue $ 3(Ra,rd);return rd}var yt $ 2=Mo $ 3;function Ro $ 1(Ra,qa){let td=yt $ 2(Ra,qa);return td===!1?"":Ra.charAt(td)}var ge $ 3=Ro $ 1;function Jo $ 2(Ra,qa,td){for(let rd=qa;rd<td;++rd)if(Ra.charAt(rd)=== `
` )return!0;return!1}var de $ 2=Jo $ 2;function qo $ 1(Ra){return re $ 3(Ra)&&Ra.value[0]==="*"&&/@(?:type|satisfies) \b /u.test(Ra.value)}var ku $ 1=qo $ 1;function Wo $ 2(Ra){return[Mu $ 2,Lu $ 1,_u $ 2,ep,Xo $ 1,Yn $ 3,Hn $ 2,Iu $ 2,wu $ 3,sp,rp, $ n $ 4,vu $ 2,up,Ou $ 2,ju $ 2,Vn $ 3,Yo $ 1,yp].some(qa=>qa(Ra))}function Go $ 2(Ra){return[No $ 1,_u $ 2,Lu $ 1,vu $ 2,Yn $ 3,Hn $ 2,Iu $ 2,wu $ 3,ju $ 2,tp,np, $ n $ 4,op $ 1,Vn $ 3,lp,mp].some(qa=>qa(Ra))}function Uo $ 3(Ra){return[Mu $ 2,Yn $ 3,Hn $ 2,Ho $ 3,Zo $ 2,Ou $ 2, $ n $ 4,Qo $ 2,zo $ 1,cp,Vn $ 3,pp].some(qa=>qa(Ra))}function bt $ 4(Ra,qa){let td=(Ra.body||Ra.properties).find(({type:rd})=>rd!=="EmptyStatement");td?ce $ 3(td,qa):Le $ 3(Ra,qa)}function Xn $ 4(Ra,qa){Ra.type==="BlockStatement"?bt $ 4(Ra,qa):ce $ 3(Ra,qa)}function No $ 1({comment:Ra,followingNode:qa}){return qa&&ku $ 1(Ra)?(ce $ 3(qa,Ra),!0):!1}function Yn $ 3({comment:Ra,precedingNode:qa,enclosingNode:td,followingNode:rd,text:nd}){if((td==null?void 0:td.type)!=="IfStatement"||!rd)return!1;if(ge $ 3(nd,k $ 1(Ra))===")")return z $ 3(qa,Ra),!0;if(qa===td.consequent&&rd===td.alternate){if(qa.type==="BlockStatement")z $ 3(qa,Ra);else{let ad=vt $ 2(Ra)||Ra.loc.start.line===Ra.loc.end.line,sd=Ra.loc.start.line===qa.loc.start.line;ad&&sd?z $ 3(qa,Ra):Le $ 3(td,Ra)}return!0}return rd.type==="BlockStatement"?(bt $ 4(rd,Ra),!0):rd.type==="IfStatement"?(Xn $ 4(rd.consequent,Ra),!0):td.consequent===rd?(ce $ 3(rd,Ra),!0):!1}function Hn $ 2({comment:Ra,precedingNode:qa,enclosingNode:td,followingNode:rd,text:nd}){return(td==null?void 0:td.type)!=="WhileStatement"||!rd?!1:ge $ 3(nd,k $ 1(Ra))===")"?(z $ 3(qa,Ra),!0):rd.type==="BlockStatement"?(bt $ 4(rd,Ra),!0):td.body===rd?(ce $ 3(rd,Ra),!0):!1}function Iu $ 2({comment:Ra,precedingNode:qa,enclosingNode:td,followingNode:rd}){return(td==null?void 0:td.type)!=="TryStatement"&&(td==null?void 0:td.type)!=="CatchClause"||!rd?!1:td.type==="CatchClause"&&qa?(z $ 3(qa,Ra),!0):rd.type==="BlockStatement"?(bt $ 4(rd,Ra),!0):rd.type==="TryStatement"?(Xn $ 4(rd.finalizer,Ra),!0):rd.type==="CatchClause"?(Xn $ 4(rd.body,Ra),!0):!1}function Xo $ 1({comment:Ra,enclosingNode:qa,followingNode:td}){return q $ 3(qa)&&(td==null?void 0:td.type)==="Identifier"?(ce $ 3(qa,Ra),!0):!1}function Yo $ 1({comment:Ra,enclosingNode:qa,followingNode:td,options:rd}){return!rd.experimentalTernaries||!((qa==null?void 0:qa.type)==="ConditionalExpression"||(qa==null?void 0:qa.type)==="ConditionalTypeAnnotation"||(qa==null?void 0:qa.type)==="TSConditionalType")?!1:(td==null?void 0:td.type)==="ConditionalExpression"||(td==null?void 0:td.type)==="ConditionalTypeAnnotation"||(td==null?void 0:td.type)==="TSConditionalType"?(Le $ 3(qa,Ra),!0):!1}function Lu $ 1({comment:Ra,precedingNode:qa,enclosingNode:td,followingNode:rd,text:nd,options:ad}){let sd=qa&&!de $ 2(nd,k $ 1(qa),R $ 4(Ra));return(!qa||!sd)&&((td==null?void 0:td.type)==="ConditionalExpression"||(td==null?void 0:td.type)==="ConditionalTypeAnnotation"||(td==null?void 0:td.type)==="TSConditionalType")&&rd?ad.experimentalTernaries&&td.alternate===rd&&!(re $ 3(Ra)&&!de $ 2(ad.originalText,R $ 4(Ra),k $ 1(Ra)))?(Le $ 3(td,Ra),!0):(ce $ 3(rd,Ra),!0):!1}function Ho $ 3({comment:Ra,precedingNode:qa,enclosingNode:td}){return Ae $ 2(td)&&td.shorthand&&td.key===qa&&td.value.type==="AssignmentPattern"?(z $ 3(td.value.left,Ra),!0):!1}var Vo $ 2=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function wu $ 3({comment:Ra,precedingNode:qa,enclosingNode:td,followingNode:rd}){if(Vo $ 2.has(td==null?void 0:td.type)){if(w $ 1(td.decorators)&&(rd==null?void 0:rd.type)!=="Decorator")return z $ 3(O $ 3(!1,td.decorators,-1),Ra),!0;if(td.body&&rd===td.body)return bt $ 4(td.body,Ra),!0;if(rd){if(td.superClass&&rd===td.superClass&&qa&&(qa===td.id||qa===td.typeParameters))return z $ 3(qa,Ra),!0;for(let nd of["implements","extends","mixins"])if(td[nd]&&rd===td[nd][0])return qa&&(qa===td.id||qa===td.typeParameters||qa===td.superClass)?z $ 3(qa,Ra):Le $ 3(td,Ra,nd),!0}}return!1}var $ o $ 2=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty
2024-09-18 09:46:23 +08:00
` ;default:return `
2024-11-27 11:30:55 +08:00
` }}var Se $ 3=Symbol("MODE_BREAK"),at $ 4=Symbol("MODE_FLAT"),ar $ 2=Symbol("cursor");function qu $ 2(){return{value:"",length:0,queue:[]}}function Cp(Ra,qa){return Qn $ 4(Ra,{type:"indent"},qa)}function Ap $ 1(Ra,qa,td){return qa===Number.NEGATIVE_INFINITY?Ra.root||qu $ 2():qa<0?Qn $ 4(Ra,{type:"dedent"},td):qa?qa.type==="root"?{...Ra,root:Ra}:Qn $ 4(Ra,{type:typeof qa=="string"?"stringAlign":"numberAlign",n:qa},td):Ra}function Qn $ 4(Ra,qa,td){let rd=qa.type==="dedent"?Ra.queue.slice(0,-1):[...Ra.queue,qa],nd="",ad=0,sd=0,ud=0;for(let Ad of rd)switch(Ad.type){case"indent":pd(),td.useTabs?cd(1):dd(td.tabWidth);break;case"stringAlign":pd(),nd+=Ad.n,ad+=Ad.n.length;break;case"numberAlign":sd+=1,ud+=Ad.n;break;default:throw new Error( ` Unexpected type '${Ad.type}' ` )}return Td(),{...Ra,value:nd,length:ad,queue:rd};function cd(Ad){nd+=" ".repeat(Ad),ad+=td.tabWidth*Ad}function dd(Ad){nd+=" ".repeat(Ad),ad+=Ad}function pd(){td.useTabs?fd():Td()}function fd(){sd>0&&cd(sd),Sd()}function Td(){ud>0&&dd(ud),Sd()}function Sd(){sd=0,ud=0}}function Zn $ 3(Ra){let qa=0,td=0,rd=Ra.length;e:for(;rd--;){let nd=Ra[rd];if(nd===ar $ 2){td++;continue}for(let ad=nd.length-1;ad>=0;ad--){let sd=nd[ad];if(sd===" "||sd===" ")qa++;else{Ra[rd]=nd.slice(0,ad+1);break e}}}if(qa>0||td>0)for(Ra.length=rd+1;td-- >0;)Ra.push(ar $ 2);return qa}function Jr $ 2(Ra,qa,td,rd,nd,ad){if(td===Number.POSITIVE_INFINITY)return!0;let sd=qa.length,ud=[Ra],cd=[];for(;td>=0;){if(ud.length===0){if(sd===0)return!0;ud.push(qa[--sd]);continue}let{mode:dd,doc:pd}=ud.pop(),fd=ut $ 1(pd);switch(fd){case rt $ 2:cd.push(pd),td-=et $ 4(pd);break;case _e $ 3:case Pe $ 3:{let Td=fd===_e $ 3?pd:pd.parts;for(let Sd=Td.length-1;Sd>=0;Sd--)ud.push({mode:dd,doc:Td[Sd]});break}case Xe $ 2:case Ye $ 2:case He $ 2:case je $ 3:ud.push({mode:dd,doc:pd.contents});break;case st $ 2:td+=Zn $ 3(cd);break;case le $ 3:{if(ad&&pd.break)return!1;let Td=pd.break?Se $ 3:dd,Sd=pd.expandedStates&&Td===Se $ 3?O $ 3(!1,pd.expandedStates,-1):pd.contents;ud.push({mode:Td,doc:Sd});break}case xe $ 3:{let Td=(pd.groupId?nd[pd.groupId]||at $ 4:dd)===Se $ 3?pd.breakContents:pd.flatContents;Td&&ud.push({mode:dd,doc:Td});break}case me $ 1:if(dd===Se $ 3||pd.hard)return!0;pd.soft||(cd.push(" "),td--);break;case Ve $ 3:rd=!0;break;case $ e $ 3:if(rd)return!1;break}}return!1}function es $ 2(Ra,qa){let td={},rd=qa.printWidth,nd=Ju $ 3(qa.endOfLine),ad=0,sd=[{ind:qu $ 2(),mode:Se $ 3,doc:Ra}],ud=[],cd=!1,dd=[],pd=0;for(Su $ 1(Ra);sd.length>0;){let{ind:Td,mode:Sd,doc:Ad}=sd.pop();switch(ut $ 1(Ad)){case rt $ 2:{let Nd=nd!== `
` ?N $ 4(!1,Ad, `
` ,nd):Ad;ud.push(Nd),sd.length>0&&(ad+=et $ 4(Nd));break}case _e $ 3:for(let Nd=Ad.length-1;Nd>=0;Nd--)sd.push({ind:Td,mode:Sd,doc:Ad[Nd]});break;case nt $ 2:if(pd>=2)throw new Error("There are too many 'cursor' in doc.");ud.push(ar $ 2),pd++;break;case Xe $ 2:sd.push({ind:Cp(Td,qa),mode:Sd,doc:Ad.contents});break;case Ye $ 2:sd.push({ind:Ap $ 1(Td,Ad.n,qa),mode:Sd,doc:Ad.contents});break;case st $ 2:ad-=Zn $ 3(ud);break;case le $ 3:switch(Sd){case at $ 4:if(!cd){sd.push({ind:Td,mode:Ad.break?Se $ 3:at $ 4,doc:Ad.contents});break}case Se $ 3:{cd=!1;let Nd={ind:Td,mode:at $ 4,doc:Ad.contents},Ld=rd-ad,Rd=dd.length>0;if(!Ad.break&&Jr $ 2(Nd,sd,Ld,Rd,td))sd.push(Nd);else if(Ad.expandedStates){let Od=O $ 3(!1,Ad.expandedStates,-1);if(Ad.break){sd.push({ind:Td,mode:Se $ 3,doc:Od});break}else for(let kd=1;kd<Ad.expandedStates.length+1;kd++)if(kd>=Ad.expandedStates.length){sd.push({ind:Td,mode:Se $ 3,doc:Od});break}else{let Fd=Ad.expandedStates[kd],Ud={ind:Td,mode:at $ 4,doc:Fd};if(Jr $ 2(Ud,sd,Ld,Rd,td)){sd.push(Ud);break}}}else sd.push({ind:Td,mode:Se $ 3,doc:Ad.contents});break}}Ad.id&&(td[Ad.id]=O $ 3(!1,sd,-1).mode);break;case Pe $ 3:{let Nd=rd-ad,{parts:Ld}=Ad;if(Ld.length===0)break;let[Rd,Od]=Ld,kd={ind:Td,mode:at $ 4,doc:Rd},Fd={ind:Td,mode:Se $ 3,doc:Rd},Ud=Jr $ 2(kd,[],Nd,dd.length>0,td,!0);if(Ld.length===1){Ud?sd.push(kd):sd.push(Fd);break}let Hd={ind:Td,mode:at $ 4,doc:Od},Vd={ind:Td,mode:Se $ 3,doc:Od};if(Ld.length===2){Ud?sd.push(Hd,kd):sd.push(Vd,Fd);break}Ld.splice(0,2);let Zd={ind:Td,mode:Sd,doc:qt $ 2(Ld)},zd=Ld[0];Jr $ 2({ind:Td,mode:at $ 4,doc:[Rd,Od,zd]},[],Nd,dd.length>0,td,!0)?sd.push(Zd,Hd,kd):Ud?sd.push(Zd,Vd,kd):sd.push(Zd,Vd,Fd);break}case xe $ 3:case He $ 2:{let Nd=Ad.groupId?td[Ad.groupId]:Sd;if(Nd===Se $ 3){let Ld=Ad.type===xe $ 3?Ad.breakContents:Ad.negate?Ad.contents:f $ 1(Ad.contents);Ld&&sd.push({ind:Td,mode:Sd,doc:Ld})}if(Nd===at $ 4){let Ld=Ad.type===xe $ 3?Ad.flatContents:Ad.negate?f $ 1(Ad.contents):Ad.contents;Ld&&sd.push({ind:Td,mode:Sd,doc:Ld})}break}case Ve $ 3:dd.push({ind:Td,mode:Sd,doc:Ad.contents});break;case $ e $ 3:dd.length>0&&sd.push({ind:Td,mode:Sd,doc:Gn $ 4});break;case me $ 1:switch(Sd){case at $ 4:if(Ad.hard)cd=!0;else{Ad.soft||(ud.push(" "),ad+=1);break}case Se $ 3:if(dd.length>0){sd.push({ind:Td,mode:Sd,doc:Ad},...dd.reverse()),dd.length=0;break}Ad.literal?Td.root?(ud.push(nd,Td.root.value),ad=Td.root.length):(ud.push(nd),ad=0):(ad-=Zn $ 3(ud),ud.push(nd+Td.value),ad=Td.length);break}break;case je $ 3:sd.push({ind:Td,mode:Sd,doc:Ad.contents});break;case ve $ 3:break;default:throw new Ct $ 3(Ad)}sd.length===0&&dd.length>0&&(sd.push(...dd.reverse()),dd.length=0)}let fd=ud.indexOf(ar $ 2);if(fd!==-1){let Td=ud.indexOf(ar $ 2,fd+1),Sd=ud.slice(0,fd).join(""),Ad=ud.slice(fd+1,Td).join(""),Nd=ud.slice(Td+1).join("");return{formatted:Sd+Ad+Nd,cursorNodeStart:Sd.length,cursorNodeText:Ad}}return{formatted:ud.join("")}}function Tp $ 1(Ra,qa,td=0){let rd=0;for(let nd=td;nd<Ra.length;++nd)Ra[nd]===" "?rd=rd+qa-rd%qa:rd++;return rd}var Wu $ 1=Tp $ 1;function dp(Ra,qa){let td=Ra.lastIndexOf( `
2024-09-25 14:23:53 +08:00
` );return td===-1?0:Wu $ 1(Ra.slice(td+1).match(/^[ \t ]*/u)[0],qa)}var Gu $ 2=dp;function qr $ 2(Ra,qa,td){let{node:rd}=Ra;if(rd.type==="TemplateLiteral"&&gp(Ra)){let cd=xp(Ra,td,qa);if(cd)return cd}let nd="expressions";rd.type==="TSTemplateLiteralType"&&(nd="types");let ad=[],sd=Ra.map(qa,nd);ad.push(ke $ 3," ` " ) ; let ud = 0 ; return Ra . each ( ( { index : cd , node : dd } ) => { if ( ad . push ( qa ( ) ) , dd . tail ) return ; let { tabWidth : pd } = td , fd = dd . value . raw , Td = fd . includes ( `
2024-11-27 11:30:55 +08:00
` )?Gu $ 2(fd,pd):ud;ud=Td;let Sd=sd[cd],Ad=rd[nd][cd],Nd=de $ 2(td.originalText,k $ 1(dd),R $ 4(rd.quasis[cd+1]));if(!Nd){let Rd=es $ 2(Sd,{...td,printWidth:Number.POSITIVE_INFINITY}).formatted;Rd.includes( `
` )?Nd=!0:Sd=Rd}Nd&&(d $ 1(Ad)||Ad.type==="Identifier"||q $ 3(Ad)||Ad.type==="ConditionalExpression"||Ad.type==="SequenceExpression"||Te $ 2(Ad)||De $ 2(Ad))&&(Sd=[f $ 1([E $ 2,Sd]),E $ 2]);let Ld=Td===0&&fd.endsWith( `
` )?he $ 2(Number.NEGATIVE_INFINITY,Sd):xu $ 1(Sd,Td,pd);ad.push(l $ 1([" ${ ",Ld,ke$3," } "]))},"quasis"),ad.push(" ` "),ad}function Uu$3(Ra,qa){let td=qa(" quasi ");return it$2(td.label&&{tagged:!0,...td.label},[qa(" tag "),qa(Ra.node.typeArguments?" typeArguments ":" typeParameters "),ke$3,td])}function xp(Ra,qa,td){let{node:rd}=Ra,nd=rd.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(nd.length>1||nd.some(ad=>ad.length>0)){qa.__inJestEach=!0;let ad=Ra.map(td," expressions ");qa.__inJestEach=!1;let sd=[],ud=ad.map(Td=>" $ { "+es$2(Td,{...qa,printWidth:Number.POSITIVE_INFINITY,endOfLine:" lf "}).formatted+" } " ) , cd = [ { hasLineBreak : ! 1 , cells : [ ] } ] ; for ( let Td = 1 ; Td < rd . quasis . length ; Td ++ ) { let Sd = O$3 ( ! 1 , cd , - 1 ) , Ad = ud [ Td - 1 ] ; Sd . cells . push ( Ad ) , Ad . includes ( `
` )&&(Sd.hasLineBreak=!0),rd.quasis[Td].value.raw.includes( `
` )&&cd.push({hasLineBreak:!1,cells:[]})}let dd=Math.max(nd.length,...cd.map(Td=>Td.cells.length)),pd=Array.from({length:dd}).fill(0),fd=[{cells:nd},...cd.filter(Td=>Td.cells.length>0)];for(let{cells:Td}of fd.filter(Sd=>!Sd.hasLineBreak))for(let[Sd,Ad]of Td.entries())pd[Sd]=Math.max(pd[Sd],et $ 4(Ad));return sd.push(ke $ 3," ` ",f$1([F$1,P$3(F$1,fd.map(Td=>P$3(" | ",Td.cells.map((Sd,Ad)=>Td.hasLineBreak?Sd:Sd+" ".repeat(pd[Ad]-et$4(Sd))))))]),F$1," ` "),sd}}function hp(Ra,qa){let{node:td}=Ra,rd=qa();return d $ 1(td)&&(rd=l $ 1([f $ 1([E $ 2,rd]),E $ 2])),[" ${ ",rd,ke$3," } "]}function Gt $ 3(Ra,qa){return Ra.map(td=>hp(td,qa),"expressions")}function Wr $ 2(Ra,qa){return mt $ 3(Ra,td=>typeof td=="string"?qa?N $ 4(!1,td,/( \\ *) ` / gu , "$1$1\\`" ) : ts$1 ( td ) : td ) } function ts$1 ( Ra ) { return N$4 ( ! 1 , Ra , /([\\`]|\$\{)/gu , String . raw ` \$ 1 ` ) } function gp ( { node : Ra , parent : qa } ) { let td = /^[fx]?(?:describe|it|test)$/u ; return qa . type === "TaggedTemplateExpression" && qa . quasi === Ra && qa . tag . type === "MemberExpression" && qa . tag . property . type === "Identifier" && qa . tag . property . name === "each" && ( qa . tag . object . type === "Identifier" && td . test ( qa . tag . object . name ) || qa . tag . object . type === "MemberExpression" && qa . tag . object . property . type === "Identifier" && ( qa . tag . object . property . name === "only" || qa . tag . object . property . name === "skip" ) && qa . tag . object . object . type === "Identifier" && td . test ( qa . tag . object . object . name ) ) } var ns$2 = [ ( Ra , qa ) => Ra . type === "ObjectExpression" && qa === "properties" , ( Ra , qa ) => Ra . type === "CallExpression" && Ra . callee . type === "Identifier" && Ra . callee . name === "Component" && qa === "arguments" , ( Ra , qa ) => Ra . type === "Decorator" && qa === "expression" ] ; function Nu$2 ( Ra ) { let qa = rd => rd . type === "TemplateLiteral" , td = ( rd , nd ) => Ae$2 ( rd ) && ! rd . computed && rd . key . type === "Identifier" && rd . key . name === "styles" && nd === "value" ; return Ra . match ( qa , ( rd , nd ) => U$3 ( rd ) && nd === "elements" , td , ... ns$2 ) || Ra . match ( qa , td , ... ns$2 ) } function Xu$3 ( Ra ) { return Ra . match ( qa => qa . type === "TemplateLiteral" , ( qa , td ) => Ae$2 ( qa ) && ! qa . computed && qa . key . type === "Identifier" && qa . key . name === "template" && td === "value" , ... ns$2 ) } function rs$1 ( Ra , qa ) { return d$1 ( Ra , g$3 . Block | g$3 . Leading , ( { value : td } ) => td === ` ${ qa } ` ) } function Gr$2 ( { node : Ra , parent : qa } , td ) { return rs$1 ( Ra , td ) || Sp ( qa ) && rs$1 ( qa , td ) || qa . type === "ExpressionStatement" && rs$1 ( qa , td ) } function Sp ( Ra ) { return Ra . type === "AsConstExpression" || Ra . type === "TSAsExpression" && Ra . typeAnnotation . type === "TSTypeReference" && Ra . typeAnnotation . typeName . type === "Identifier" && Ra . typeAnnotation . typeName . name === "const" } async function Bp ( Ra , qa , td ) { let { node : rd } = td , nd = rd . quasis . map ( pd => pd . value . raw ) , ad = 0 , sd = nd . reduce ( ( pd , fd , Td ) => Td === 0 ? fd : pd + "@prettier-placeholder-" + ad ++ + "-id" + fd , "" ) , ud = await Ra ( sd , { parser : "scss" } ) , cd = Gt$3 ( td , qa ) , dd = bp ( ud , cd ) ; if ( ! dd ) throw new Error ( "Couldn't insert all the expressions" ) ; return [ "`" , f$1 ( [ F$1 , dd ] ) , E$2 , "`" ] } function bp ( Ra , qa ) { if ( ! w$1 ( qa ) ) return Ra ; let td = 0 , rd = mt$3 ( Wt$1 ( Ra ) , nd => typeof nd != "string" || ! nd . includes ( "@prettier-placeholder" ) ? nd : nd . split ( /@prettier-placeholder-(\d+)-id/u ) . map ( ( ad , sd ) => sd % 2 === 0 ? Ie$2 ( ad ) : ( td ++ , qa [ ad ] ) ) ) ; return qa . length === td ? rd : null } function Pp ( { node : Ra , parent : qa , grandparent : td } ) { return td && Ra . quasis && qa . type === "JSXExpressionContainer" && td . type === "JSXElement" && td . openingElement . name . name === "style" && td . openingElement . attributes . some ( rd => rd . type === "JSXAttribute" && rd . name . name === "jsx" ) || ( qa == null ? void 0 : qa . type ) === "TaggedTemplateExpression" && qa . tag . type === "Identifier" && qa . tag . name === "css" || ( qa == null ? void 0 : qa . type ) === "TaggedTemplateExpression" && qa . tag . type === "MemberExpression" && qa . tag . object . name === "css" && ( qa . tag . property . name === "global" || qa . tag . property . name === "resolve" ) } function Ur$2 ( Ra ) { return Ra . type === "Identifier" && Ra . name === "styled" } function Yu$1 ( Ra ) { return /^[A-Z]/u . test ( Ra . object . name ) && Ra . property . name === "extend" } function kp$1 ( { parent : Ra } ) { if ( ! Ra || Ra . type !== "TaggedTemplateExpression" ) return ! 1 ; let qa = Ra . tag . type === "ParenthesizedExpression" ? Ra . tag . expression : Ra . tag ; switch ( qa . type ) { case "MemberExpression" : return Ur$2 ( qa . object ) || Yu$1 ( qa ) ; case "CallExpression" : return Ur$2 ( qa . callee ) || qa . callee . type === "MemberExpression" && ( qa . callee . object . type === "MemberExpression" && ( Ur$2 ( qa . callee . object . object ) || Yu$1 ( qa . calle
` ),Sd=Td.length,Ad=ad[ud],Nd=Sd>2&&Td[0].trim()===""&&Td[1].trim()==="",Ld=Sd>2&&Td[Sd-1].trim()===""&&Td[Sd-2].trim()==="",Rd=Td.every(kd=>/^ \s *(?:#[^ \n \r ]*)? $ /u.test(kd));if(!pd&&/#[^ \n \r ]* $ /u.test(Td[Sd-1]))return null;let Od=null;Rd?Od=Op $ 1(Td):Od=await Ra(fd,{parser:"graphql"}),Od?(Od=Wr $ 2(Od,!1),!dd&&Nd&&sd.push(""),sd.push(Od),!pd&&Ld&&sd.push("")):!dd&&!pd&&Nd&&sd.push(""),Ad&&sd.push(Ad)}return[" ` ",f$1([F$1,P$3(F$1,sd)]),F$1," ` "]}function Op $ 1(Ra){let qa=[],td=!1,rd=Ra.map(nd=>nd.trim());for(let[nd,ad]of rd.entries())ad!==""&&(rd[nd-1]===""&&td?qa.push([F $ 1,ad]):qa.push(ad),td=!0);return qa.length===0?null:P $ 3(F $ 1,qa)}function _p({node:Ra,parent:qa}){return Gr $ 2({node:Ra,parent:qa},"GraphQL")||qa&&(qa.type==="TaggedTemplateExpression"&&(qa.tag.type==="MemberExpression"&&qa.tag.object.name==="graphql"&&qa.tag.property.name==="experimental"||qa.tag.type==="Identifier"&&(qa.tag.name==="gql"||qa.tag.name==="graphql"))||qa.type==="CallExpression"&&qa.callee.type==="Identifier"&&qa.callee.name==="graphql")}function jp(Ra){if(_p(Ra))return wp}var Vu $ 3=jp,ss $ 1=0;async function $ u $ 2(Ra,qa,td,rd,nd){let{node:ad}=rd,sd=ss $ 1;ss $ 1=ss $ 1+1>>>0;let ud=Rd=> ` PRETTIER _HTML _PLACEHOLDER _$ { Rd } _$ { sd } _IN _JS ` ,cd=ad.quasis.map((Rd,Od,kd)=>Od===kd.length-1?Rd.value.cooked:Rd.value.cooked+ud(Od)).join(""),dd=Gt $ 3(rd,td),pd=new RegExp(ud(String.raw ` ( \ d + ) ` ),"gu"),fd=0,Td=await qa(cd,{parser:Ra,__onHtmlRoot(Rd){fd=Rd.children.length}}),Sd=mt $ 3(Td,Rd=>{if(typeof Rd!="string")return Rd;let Od=[],kd=Rd.split(pd);for(let Fd=0;Fd<kd.length;Fd++){let Ud=kd[Fd];if(Fd%2===0){Ud&&(Ud=ts $ 1(Ud),nd.__embeddedInHtml&&(Ud=N $ 4(!1,Ud,/< \/ (?=script \b )/giu,String.raw ` < \ / ` )),Od.push(Ud));continue}let Hd=Number(Ud);Od.push(dd[Hd])}return Od}),Ad=/^ \s /u.test(cd)?" ":"",Nd=/ \s $ /u.test(cd)?" ":"",Ld=nd.htmlWhitespaceSensitivity==="ignore"?F $ 1:Ad&&Nd?x $ 3:null;return Ld?l $ 1([" ` ",f$1([Ld,l$1(Sd)]),Ld," ` "]):it $ 2({hug:!1},l $ 1([" ` ",Ad,fd>1?f$1(l$1(Sd)):l$1(Sd),Nd," ` "]))}function vp(Ra){return Gr $ 2(Ra,"HTML")||Ra.match(qa=>qa.type==="TemplateLiteral",(qa,td)=>qa.type==="TaggedTemplateExpression"&&qa.tag.type==="Identifier"&&qa.tag.name==="html"&&td==="quasi")}var Mp $ 1= $ u $ 2.bind(void 0,"html"),Rp $ 1= $ u $ 2.bind(void 0,"angular");function Jp(Ra){if(vp(Ra))return Mp $ 1;if(Xu $ 3(Ra))return Rp $ 1}var Ku $ 3=Jp;async function qp(Ra,qa,td){let{node:rd}=td,nd=N $ 4(!1,rd.quasis[0].value.raw,/((?: \\ \\ )*) \\ ` / gu , ( cd , dd ) => "\\" . repeat ( dd . length / 2 ) + "`" ) , ad = Wp$1 ( nd ) , sd = ad !== "" ; sd && ( nd = N$4 ( ! 1 , nd , new RegExp ( ` ^ ${ ad } ` , "gmu" ) , "" ) ) ; let ud = Wr$2 ( await Ra ( nd , { parser : "markdown" , _ _inJsTemplate : ! 0 } ) , ! 0 ) ; return [ "`" , sd ? f$1 ( [ E$2 , ud ] ) : [ Rr$1 , du$3 ( ud ) ] , E$2 , "`" ] } function Wp$1 ( Ra ) { let qa = Ra . match ( /^([^\S\n]*)\S/mu ) ; return qa === null ? "" : qa [ 1 ] } function Gp ( Ra ) { if ( Up ( Ra ) ) return qp } function Up ( { node : Ra , parent : qa } ) { return ( qa == null ? void 0 : qa . type ) === "TaggedTemplateExpression" && Ra . quasis . length === 1 && qa . tag . type === "Identifier" && ( qa . tag . name === "md" || qa . tag . name === "markdown" ) } var zu$1 = Gp ; function Np$1 ( Ra ) { let { node : qa } = Ra ; if ( qa . type !== "TemplateLiteral" || Xp ( qa ) ) return ; let td ; for ( let rd of [ Hu$3 , Vu$3 , Ku$3 , zu$1 ] ) if ( td = rd ( Ra ) , ! ! td ) return qa . quasis . length === 1 && qa . quasis [ 0 ] . value . raw . trim ( ) === "" ? "``" : async ( ... nd ) => { let ad = await td ( ... nd ) ; return ad && it$2 ( { embed : ! 0 , ... ad . label } , ad ) } } function Xp ( { quasis : Ra } ) { return Ra . some ( ( { value : { cooked : qa } } ) => qa === null ) } var Qu$3 = Np$1 , Yp = /\*\/$/ , Hp$1 = /^\/\*\*?/ , ri$4 = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/ , Vp$1 = /(^|\s+)\/\/([^\n\r]*)/g , Zu$4 = /^(\r?\n)+/ , $p = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g , ei$3 = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g , Kp$1 = /(\r?\n|^) *\* ?/g , ni$4 = [ ] ; function si$3 ( Ra ) { let qa = Ra . match ( ri$4 ) ; return qa ? qa [ 0 ] . trimStart ( ) : "" } function ui$4 ( Ra ) { let qa = Ra . match ( ri$4 ) , td = qa == null ? void 0 : qa [ 0 ] ; return td == null ? Ra : Ra . slice ( td . length ) } function ii$4 ( Ra ) { let qa = `
2024-09-25 14:23:53 +08:00
` ;Ra=N $ 4(!1,Ra.replace(Hp $ 1,"").replace(Yp,""),Kp $ 1," $ 1");let td="";for(;td!==Ra;)td=Ra,Ra=N $ 4(!1,Ra, $ p, ` $ { qa } $1 $2$ { qa } ` );Ra=Ra.replace(Zu $ 4,"").trimEnd();let rd=Object.create(null),nd=N $ 4(!1,Ra,ei $ 3,"").replace(Zu $ 4,"").trimEnd(),ad;for(;ad=ei $ 3.exec(Ra);){let sd=N $ 4(!1,ad[2],Vp $ 1,"");if(typeof rd[ad[1]]=="string"||Array.isArray(rd[ad[1]])){let ud=rd[ad[1]];rd[ad[1]]=[...ni $ 4,...Array.isArray(ud)?ud:[ud],sd]}else rd[ad[1]]=sd}return{comments:nd,pragmas:rd}}function ai $ 3({comments:Ra="",pragmas:qa={}}){let td= `
` ,rd="/**",nd=" *",ad=" */",sd=Object.keys(qa),ud=sd.flatMap(dd=>ti $ 4(dd,qa[dd])).map(dd=> ` $ { nd } $ { dd } $ { td } ` ).join("");if(!Ra){if(sd.length===0)return"";if(sd.length===1&&!Array.isArray(qa[sd[0]])){let dd=qa[sd[0]];return ` $ { rd } $ { ti$4 ( sd [ 0 ] , dd ) [ 0 ] } $ { ad } ` }}let cd=Ra.split(td).map(dd=> ` $ { nd } $ { dd } ` ).join(td)+td;return rd+td+(Ra?cd:"")+(Ra&&sd.length>0?nd+td:"")+ud+ad}function ti $ 4(Ra,qa){return[...ni $ 4,...Array.isArray(qa)?qa:[qa]].map(td=> ` @ $ { Ra } $ { td } ` .trim())}function zp $ 1(Ra){if(!Ra.startsWith("#!"))return"";let qa=Ra.indexOf( `
` );return qa===-1?Ra:Ra.slice(0,qa)}var oi $ 4=zp $ 1;function Qp(Ra){let qa=oi $ 4(Ra);qa&&(Ra=Ra.slice(qa.length+1));let td=si $ 3(Ra),{pragmas:rd,comments:nd}=ii $ 4(td);return{shebang:qa,text:Ra,pragmas:rd,comments:nd}}function pi $ 5(Ra){let{shebang:qa,text:td,pragmas:rd,comments:nd}=Qp(Ra),ad=ui $ 4(td),sd=ai $ 3({pragmas:{format:"",...rd},comments:nd.trimStart()});return(qa? ` $ { qa }
` :"")+sd+(ad.startsWith( `
2024-09-18 09:46:23 +08:00
` )? `
` : `
2024-11-27 11:30:55 +08:00
` )+ad}function Zp(Ra,qa){let{originalText:td,[Symbol.for("comments")]:rd,locStart:nd,locEnd:ad,[Symbol.for("printedComments")]:sd}=qa,{node:ud}=Ra,cd=nd(ud),dd=ad(ud);for(let pd of rd)nd(pd)>=cd&&ad(pd)<=dd&&sd.add(pd);return td.slice(cd,dd)}var ci $ 3=Zp;function us $ 1(Ra,qa){var td,rd,nd,ad,sd,ud,cd,dd,pd;if(Ra.isRoot)return!1;let{node:fd,key:Td,parent:Sd}=Ra;if(qa.__isInHtmlInterpolation&&!qa.bracketSpacing&&nc $ 2(fd)&&or $ 2(Ra))return!0;if(ec $ 1(fd))return!1;if(fd.type==="Identifier"){if((td=fd.extra)!=null&&td.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_ \d +_ \d +_IN_JS $ /u.test(fd.name)||Td==="left"&&(fd.name==="async"&&!Sd.await||fd.name==="let")&&Sd.type==="ForOfStatement")return!0;if(fd.name==="let"){let Ad=(rd=Ra.findAncestor(Nd=>Nd.type==="ForOfStatement"))==null?void 0:rd.left;if(Ad&&ie $ 2(Ad,Nd=>Nd===fd))return!0}if(Td==="object"&&fd.name==="let"&&Sd.type==="MemberExpression"&&Sd.computed&&!Sd.optional){let Ad=Ra.findAncestor(Ld=>Ld.type==="ExpressionStatement"||Ld.type==="ForStatement"||Ld.type==="ForInStatement"),Nd=Ad?Ad.type==="ExpressionStatement"?Ad.expression:Ad.type==="ForStatement"?Ad.init:Ad.left:void 0;if(Nd&&ie $ 2(Nd,Ld=>Ld===fd))return!0}if(Td==="expression")switch(fd.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let Ad=Ra.findAncestor(Nd=>!Te $ 2(Nd));if(Ad!==Sd&&Ad.type==="ExpressionStatement")return!0}}return!1}if(fd.type==="ObjectExpression"||fd.type==="FunctionExpression"||fd.type==="ClassExpression"||fd.type==="DoExpression"){let Ad=(nd=Ra.findAncestor(Nd=>Nd.type==="ExpressionStatement"))==null?void 0:nd.expression;if(Ad&&ie $ 2(Ad,Nd=>Nd===fd))return!0}if(fd.type==="ObjectExpression"){let Ad=(ad=Ra.findAncestor(Nd=>Nd.type==="ArrowFunctionExpression"))==null?void 0:ad.body;if(Ad&&Ad.type!=="SequenceExpression"&&Ad.type!=="AssignmentExpression"&&ie $ 2(Ad,Nd=>Nd===fd))return!0}switch(Sd.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(Td==="superClass"&&(fd.type==="ArrowFunctionExpression"||fd.type==="AssignmentExpression"||fd.type==="AwaitExpression"||fd.type==="BinaryExpression"||fd.type==="ConditionalExpression"||fd.type==="LogicalExpression"||fd.type==="NewExpression"||fd.type==="ObjectExpression"||fd.type==="SequenceExpression"||fd.type==="TaggedTemplateExpression"||fd.type==="UnaryExpression"||fd.type==="UpdateExpression"||fd.type==="YieldExpression"||fd.type==="TSNonNullExpression"||fd.type==="ClassExpression"&&w $ 1(fd.decorators)))return!0;break;case"ExportDefaultDeclaration":return li $ 4(Ra,qa)||fd.type==="SequenceExpression";case"Decorator":if(Td==="expression"&&!uc $ 2(fd))return!0;break;case"TypeAnnotation":if(Ra.match(void 0,void 0,(Ad,Nd)=>Nd==="returnType"&&Ad.type==="ArrowFunctionExpression")&&rc $ 3(fd))return!0;break;case"BinaryExpression":if(Td==="left"&&(Sd.operator==="in"||Sd.operator==="instanceof")&&fd.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(Td==="init"&&Ra.match(void 0,void 0,(Ad,Nd)=>Nd==="declarations"&&Ad.type==="VariableDeclaration",(Ad,Nd)=>Nd==="left"&&Ad.type==="ForInStatement"))return!0;break}switch(fd.type){case"UpdateExpression":if(Sd.type==="UnaryExpression")return fd.prefix&&(fd.operator==="++"&&Sd.operator==="+"||fd.operator==="--"&&Sd.operator==="-");case"UnaryExpression":switch(Sd.type){case"UnaryExpression":return fd.operator===Sd.operator&&(fd.operator==="+"||fd.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return Td==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return Td==="callee";case"BinaryExpression":return Td==="left"&&Sd.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(Sd.type==="UpdateExpression"||fd.operator==="in"&&tc $ 1(Ra))return!0;if(fd.operator==="|>"&&(sd=fd.extra)!=null&&sd.parenthesized){let Ad=Ra.grandparent;if(Ad.type==="BinaryExpression"&&Ad.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":cas
\ r ` ),ms $ 2=Ra=>Ra===""||Ra===x $ 3||Ra===F $ 1||Ra===E $ 2;function cc(Ra,qa,td){var rd,nd,ad;let{node:sd}=Ra;if(sd.type==="JSXElement"&&gc $ 1(sd))return[td("openingElement"),td("closingElement")];let ud=sd.type==="JSXElement"?td("openingElement"):td("openingFragment"),cd=sd.type==="JSXElement"?td("closingElement"):td("closingFragment");if(sd.children.length===1&&sd.children[0].type==="JSXExpressionContainer"&&(sd.children[0].expression.type==="TemplateLiteral"||sd.children[0].expression.type==="TaggedTemplateExpression"))return[ud,...Ra.map(td,"children"),cd];sd.children=sd.children.map(Hd=>Sc(Hd)?{type:"JSXText",value:" ",raw:" "}:Hd);let dd=sd.children.some(X $ 4),pd=sd.children.filter(Hd=>Hd.type==="JSXExpressionContainer").length>1,fd=sd.type==="JSXElement"&&sd.openingElement.attributes.length>1,Td=ne $ 3(ud)||dd||fd||pd,Sd=Ra.parent.rootMarker==="mdx",Ad=qa.singleQuote?"{' '}":'{" "}',Nd=Sd?" ":b $ 2([Ad,E $ 2]," "),Ld=((nd=(rd=sd.openingElement)==null?void 0:rd.name)==null?void 0:nd.name)==="fbt",Rd=lc $ 2(Ra,qa,td,Nd,Ld),Od=sd.children.some(Hd=>pr $ 2(Hd));for(let Hd=Rd.length-2;Hd>=0;Hd--){let Vd=Rd[Hd]===""&&Rd[Hd+1]==="",Zd=Rd[Hd]===F $ 1&&Rd[Hd+1]===""&&Rd[Hd+2]===F $ 1,zd=(Rd[Hd]===E $ 2||Rd[Hd]===F $ 1)&&Rd[Hd+1]===""&&Rd[Hd+2]===Nd,Xd=Rd[Hd]===Nd&&Rd[Hd+1]===""&&(Rd[Hd+2]===E $ 2||Rd[Hd+2]===F $ 1),Qd=Rd[Hd]===Nd&&Rd[Hd+1]===""&&Rd[Hd+2]===Nd,hf=Rd[Hd]===E $ 2&&Rd[Hd+1]===""&&Rd[Hd+2]===F $ 1||Rd[Hd]===F $ 1&&Rd[Hd+1]===""&&Rd[Hd+2]===E $ 2;Zd&&Od||Vd||zd||Qd||hf?Rd.splice(Hd,2):Xd&&Rd.splice(Hd+1,2)}for(;Rd.length>0&&ms $ 2(O $ 3(!1,Rd,-1));)Rd.pop();for(;Rd.length>1&&ms $ 2(Rd[0])&&ms $ 2(Rd[1]);)Rd.shift(),Rd.shift();let kd=[];for(let[Hd,Vd]of Rd.entries()){if(Vd===Nd){if(Hd===1&&Rd[Hd-1]===""){if(Rd.length===2){kd.push(Ad);continue}kd.push([Ad,F $ 1]);continue}else if(Hd===Rd.length-1){kd.push(Ad);continue}else if(Rd[Hd-1]===""&&Rd[Hd-2]===F $ 1){kd.push(Ad);continue}}kd.push(Vd),ne $ 3(Vd)&&(Td=!0)}let Fd=Od?qt $ 2(kd):l $ 1(kd,{shouldBreak:!0});if(((ad=qa.cursorNode)==null?void 0:ad.type)==="JSXText"&&sd.children.includes(qa.cursorNode)&&(Fd=[Un $ 3,Fd,Un $ 3]),Sd)return Fd;let Ud=l $ 1([ud,f $ 1([F $ 1,Fd]),F $ 1,cd]);return Td?Ud:ze $ 3([l $ 1([ud,...Rd,cd]),Ud])}function lc $ 2(Ra,qa,td,rd,nd){let ad=[];return Ra.each(({node:sd,next:ud})=>{if(sd.type==="JSXText"){let cd=fe $ 3(sd);if(pr $ 2(sd)){let dd=Nr $ 2.split(cd,!0);dd[0]===""&&(ad.push(""),dd.shift(),/ \n /u.test(dd[0])?ad.push(fi $ 3(nd,dd[1],sd,ud)):ad.push(rd),dd.shift());let pd;if(O $ 3(!1,dd,-1)===""&&(dd.pop(),pd=dd.pop()),dd.length===0)return;for(let[fd,Td]of dd.entries())fd%2===1?ad.push(x $ 3):ad.push(Td);pd!==void 0?/ \n /u.test(pd)?ad.push(fi $ 3(nd,O $ 3(!1,ad,-1),sd,ud)):ad.push(rd):ad.push(Di $ 3(nd,O $ 3(!1,ad,-1),sd,ud))}else/ \n /u.test(cd)?cd.match(/ \n /gu).length>1&&ad.push("",F $ 1):ad.push("",rd)}else{let cd=td();if(ad.push(cd),ud&&pr $ 2(ud)){let dd=Nr $ 2.trim(fe $ 3(ud)),[pd]=Nr $ 2.split(dd);ad.push(Di $ 3(nd,pd,sd,ud))}else ad.push(F $ 1)}},"children"),ad}function Di $ 3(Ra,qa,td,rd){return Ra?"":td.type==="JSXElement"&&!td.closingElement||(rd==null?void 0:rd.type)==="JSXElement"&&!rd.closingElement?qa.length===1?E $ 2:F $ 1:E $ 2}function fi $ 3(Ra,qa,td,rd){return Ra?F $ 1:qa.length===1?td.type==="JSXElement"&&!td.closingElement||(rd==null?void 0:rd.type)==="JSXElement"&&!rd.closingElement?F $ 1:E $ 2:F $ 1}var mc=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function yc $ 1(Ra,qa,td){let{parent:rd}=Ra;if(mc.has(rd.type))return qa;let nd=Ra.match(void 0,sd=>sd.type==="ArrowFunctionExpression",L $ 4,sd=>sd.type==="JSXExpressionContainer"),ad=Be $ 3(Ra,td);return l $ 1([ad?"":b $ 2("("),f $ 1([E $ 2,qa]),E $ 2,ad?"":b $ 2(")")],{shouldBreak:nd})}function Dc(Ra,qa,td){let{node:rd}=Ra,nd=[];if(nd.push(td("name")),rd.value){let ad;if(Q $ 4(rd.value)){let sd=fe $ 3(rd.value),ud=N $ 4(!1,N $ 4(!1,sd.slice(1,-1),"'","'"),""",'"'),cd=xr $ 2(ud,qa.jsxSingleQuote);ud=cd==='"'?N $ 4(!1,ud,'"',"""):N $ 4(!1,ud,"'","'"),ad=Ra.call(()=>ye $ 2(Ra,Ie $ 2(cd+ud+cd),qa),"value")}else ad=td("value");nd.push
2024-09-25 14:23:53 +08:00
` )&&!sd&&!d $ 1(ad.attributes[0]))return l $ 1(["<",td("name"),ad.typeArguments?td("typeArguments"):td("typeParameters")," ",...Ra.map(td,"attributes"),ad.selfClosing?" />":">"]);let ud=(nd=ad.attributes)==null?void 0:nd.some(dd=>Q $ 4(dd.value)&&dd.value.value.includes( `
2024-11-27 11:30:55 +08:00
` )),cd=qa.singleAttributePerLine&&ad.attributes.length>1?F $ 1:x $ 3;return l $ 1(["<",td("name"),ad.typeArguments?td("typeArguments"):td("typeParameters"),f $ 1(Ra.map(()=>[cd,td()],"attributes")),...Fc $ 1(ad,qa,sd)],{shouldBreak:ud})}function Fc $ 1(Ra,qa,td){return Ra.selfClosing?[x $ 3,"/>"]:Cc(Ra,qa,td)?[">"]:[E $ 2,">"]}function Cc(Ra,qa,td){let rd=Ra.attributes.length>0&&d $ 1(O $ 3(!1,Ra.attributes,-1),g $ 3.Trailing);return Ra.attributes.length===0&&!td||(qa.bracketSameLine||qa.jsxBracketSameLine)&&(!td||Ra.attributes.length>0)&&!rd}function Ac(Ra,qa,td){let{node:rd}=Ra,nd=[];nd.push("</");let ad=td("name");return d $ 1(rd.name,g $ 3.Leading|g $ 3.Line)?nd.push(f $ 1([F $ 1,ad]),F $ 1):d $ 1(rd.name,g $ 3.Leading|g $ 3.Block)?nd.push(" ",ad):nd.push(ad),nd.push(">"),nd}function Tc(Ra,qa){let{node:td}=Ra,rd=d $ 1(td),nd=d $ 1(td,g $ 3.Line),ad=td.type==="JSXOpeningFragment";return[ad?"<":"</",f $ 1([nd?F $ 1:rd&&!ad?" ":"",M $ 4(Ra,qa)]),nd?F $ 1:"",">"]}function dc $ 1(Ra,qa,td){let rd=ye $ 2(Ra,cc(Ra,qa,td),qa);return yc $ 1(Ra,rd,qa)}function xc $ 1(Ra,qa){let{node:td}=Ra,rd=d $ 1(td,g $ 3.Line);return[M $ 4(Ra,qa,{indent:rd}),rd?F $ 1:""]}function hc(Ra,qa,td){let{node:rd}=Ra;return["{",Ra.call(({node:nd})=>{let ad=["...",td()];return!d $ 1(nd)||!zn $ 3(Ra)?ad:[f $ 1([E $ 2,ye $ 2(Ra,ad,qa)]),E $ 2]},rd.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function Ei $ 2(Ra,qa,td){let{node:rd}=Ra;if(rd.type.startsWith("JSX"))switch(rd.type){case"JSXAttribute":return Dc(Ra,qa,td);case"JSXIdentifier":return rd.name;case"JSXNamespacedName":return P $ 3(":",[td("namespace"),td("name")]);case"JSXMemberExpression":return P $ 3(".",[td("object"),td("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return hc(Ra,qa,td);case"JSXExpressionContainer":return fc(Ra,qa,td);case"JSXFragment":case"JSXElement":return dc $ 1(Ra,qa,td);case"JSXOpeningElement":return Ec $ 1(Ra,qa,td);case"JSXClosingElement":return Ac(Ra,qa,td);case"JSXOpeningFragment":case"JSXClosingFragment":return Tc(Ra,qa);case"JSXEmptyExpression":return xc $ 1(Ra,qa);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new Me $ 4(rd,"JSX")}}function gc $ 1(Ra){if(Ra.children.length===0)return!0;if(Ra.children.length>1)return!1;let qa=Ra.children[0];return qa.type==="JSXText"&&!pr $ 2(qa)}function pr $ 2(Ra){return Ra.type==="JSXText"&&(Nr $ 2.hasNonWhitespaceCharacter(fe $ 3(Ra))||!/ \n /u.test(fe $ 3(Ra)))}function Sc(Ra){return Ra.type==="JSXExpressionContainer"&&Q $ 4(Ra.expression)&&Ra.expression.value===" "&&!d $ 1(Ra.expression)}function Fi $ 1(Ra){let{node:qa,parent:td}=Ra;if(!X $ 4(qa)||!X $ 4(td))return!1;let{index:rd,siblings:nd}=Ra,ad;for(let sd=rd;sd>0;sd--){let ud=nd[sd-1];if(!(ud.type==="JSXText"&&!pr $ 2(ud))){ad=ud;break}}return(ad==null?void 0:ad.type)==="JSXExpressionContainer"&&ad.expression.type==="JSXEmptyExpression"&&Bt $ 4(ad.expression)}function Bc $ 1(Ra){return Bt $ 4(Ra.node)||Fi $ 1(Ra)}var Xr $ 2=Bc $ 1,bc=0;function Yr $ 2(Ra,qa,td){var rd;let{node:nd,parent:ad,grandparent:sd,key:ud}=Ra,cd=ud!=="body"&&(ad.type==="IfStatement"||ad.type==="WhileStatement"||ad.type==="SwitchStatement"||ad.type==="DoWhileStatement"),dd=nd.operator==="|>"&&((rd=Ra.root.extra)==null?void 0:rd.__isUsingHackPipeline),pd=ys $ 2(Ra,td,qa,!1,cd);if(cd)return pd;if(dd)return l $ 1(pd);if(L $ 4(ad)&&ad.callee===nd||ad.type==="UnaryExpression"||q $ 3(ad)&&!ad.computed)return l $ 1([f $ 1([E $ 2,...pd]),E $ 2]);let fd=ad.type==="ReturnStatement"||ad.type==="ThrowStatement"||ad.type==="JSXExpressionContainer"&&sd.type==="JSXAttribute"||nd.operator!=="|"&&ad.type==="JsExpressionRoot"||nd.type!=="NGPipeExpression"&&(ad.type==="NGRoot"&&qa.parser==="__ng_binding"||ad.type==="NGMicrosyntaxExpression"&&sd.type==="NGMicrosyntax"&&sd.body.length===1)||nd===ad.body&&ad.type==="ArrowFunctionExpression"||nd!==ad.body&&ad.type==="ForStatement"||ad.type==="ConditionalExpression"&&sd.type!=="ReturnStatement"&&sd.type!=="ThrowStatement"&&!L $ 4(sd)||ad.type==="TemplateLiteral",Td=ad.type==="AssignmentExpression"||ad.type==="VariableDeclarator"||ad.type==="ClassProperty"||ad.type==="PropertyDefinition"||ad.type==="TSAbstractPropertyDefinition"||ad.type==="ClassPrivateProperty"
2024-09-18 09:46:23 +08:00
` ).split( `
2024-11-27 11:30:55 +08:00
` ),bf=0,yf=hf.length,_f;++bf<yf;)_f=hf[bf],_f!==""&&(hf[bf]=Vd+_f);return"[^"+(Qd.label||Qd.identifier)+"]: "+hf.join( `
` )}}function kd(Ud,Hd,Vd){Ud.splice(Ud.indexOf(Hd),0,Vd)}function Fd(Ud,Hd,Vd,Zd){for(var zd=Ud.length,Xd=-1;++Xd<zd;)if(Hd[Ud[Xd][0]].apply(Vd,Zd))return!0;return!1}}),Bt $ 3=C $ 1(Ra=>{Ra.isRemarkParser=qa,Ra.isRemarkCompiler=td;function qa(rd){return!!(rd&&rd.prototype&&rd.prototype.blockTokenizers)}function td(rd){return!!(rd&&rd.prototype&&rd.prototype.visitors)}}),Mi $ 1=C $ 1((Ra,qa)=>{var td=Bt $ 3();qa.exports=fd;var rd=9,nd=32,ad=36,sd=48,ud=57,cd=92,dd=["math","math-inline"],pd="math-display";function fd(Ad){let Nd=this.Parser,Ld=this.Compiler;td.isRemarkParser(Nd)&&Td(Nd,Ad),td.isRemarkCompiler(Ld)&&Sd(Ld)}function Td(Ad,Nd){let Ld=Ad.prototype,Rd=Ld.inlineMethods;kd.locator=Od,Ld.inlineTokenizers.math=kd,Rd.splice(Rd.indexOf("text"),0,"math");function Od(Fd,Ud){return Fd.indexOf(" $ ",Ud)}function kd(Fd,Ud,Hd){let Vd=Ud.length,Zd=!1,zd=!1,Xd=0,Qd,hf,bf,yf,_f,gf,xf;if(Ud.charCodeAt(Xd)===cd&&(zd=!0,Xd++),Ud.charCodeAt(Xd)===ad){if(Xd++,zd)return Hd?!0:Fd(Ud.slice(0,Xd))({type:"text",value:" $ "});if(Ud.charCodeAt(Xd)===ad&&(Zd=!0,Xd++),bf=Ud.charCodeAt(Xd),!(bf===nd||bf===rd)){for(yf=Xd;Xd<Vd;){if(hf=bf,bf=Ud.charCodeAt(Xd+1),hf===ad){if(Qd=Ud.charCodeAt(Xd-1),Qd!==nd&&Qd!==rd&&(bf!==bf||bf<sd||bf>ud)&&(!Zd||bf===ad)){_f=Xd-1,Xd++,Zd&&Xd++,gf=Xd;break}}else hf===cd&&(Xd++,bf=Ud.charCodeAt(Xd+1));Xd++}if(gf!==void 0)return Hd?!0:(xf=Ud.slice(yf,_f+1),Fd(Ud.slice(0,gf))({type:"inlineMath",value:xf,data:{hName:"span",hProperties:{className:dd.concat(Zd&&Nd.inlineMathDouble?[pd]:[])},hChildren:[{type:"text",value:xf}]}}))}}}}function Sd(Ad){let Nd=Ad.prototype;Nd.visitors.inlineMath=Ld;function Ld(Rd){let Od=" $ ";return(Rd.data&&Rd.data.hProperties&&Rd.data.hProperties.className||[]).includes(pd)&&(Od=" $ $ "),Od+Rd.value+Od}}}), $ i $ 1=C $ 1((Ra,qa)=>{var td=Bt $ 3();qa.exports=pd;var rd=10,nd=32,ad=36,sd= `
` ,ud=" $ ",cd=2,dd=["math","math-display"];function pd(){let Sd=this.Parser,Ad=this.Compiler;td.isRemarkParser(Sd)&&fd(Sd),td.isRemarkCompiler(Ad)&&Td(Ad)}function fd(Sd){let Ad=Sd.prototype,Nd=Ad.blockMethods,Ld=Ad.interruptParagraph,Rd=Ad.interruptList,Od=Ad.interruptBlockquote;Ad.blockTokenizers.math=kd,Nd.splice(Nd.indexOf("fencedCode")+1,0,"math"),Ld.splice(Ld.indexOf("fencedCode")+1,0,["math"]),Rd.splice(Rd.indexOf("fencedCode")+1,0,["math"]),Od.splice(Od.indexOf("fencedCode")+1,0,["math"]);function kd(Fd,Ud,Hd){var Vd=Ud.length,Zd=0;let zd,Xd,Qd,hf,bf,yf,_f,gf,xf,Mf,Yf;for(;Zd<Vd&&Ud.charCodeAt(Zd)===nd;)Zd++;for(bf=Zd;Zd<Vd&&Ud.charCodeAt(Zd)===ad;)Zd++;if(yf=Zd-bf,!(yf<cd)){for(;Zd<Vd&&Ud.charCodeAt(Zd)===nd;)Zd++;for(_f=Zd;Zd<Vd;){if(zd=Ud.charCodeAt(Zd),zd===ad)return;if(zd===rd)break;Zd++}if(Ud.charCodeAt(Zd)===rd){if(Hd)return!0;for(Xd=[],_f!==Zd&&Xd.push(Ud.slice(_f,Zd)),Zd++,Qd=Ud.indexOf(sd,Zd+1),Qd=Qd===-1?Vd:Qd;Zd<Vd;){for(gf=!1,Mf=Zd,Yf=Qd,hf=Qd,xf=0;hf>Mf&&Ud.charCodeAt(hf-1)===nd;)hf--;for(;hf>Mf&&Ud.charCodeAt(hf-1)===ad;)xf++,hf--;for(yf<=xf&&Ud.indexOf(ud,Mf)===hf&&(gf=!0,Yf=hf);Mf<=Yf&&Mf-Zd<bf&&Ud.charCodeAt(Mf)===nd;)Mf++;if(gf)for(;Yf>Mf&&Ud.charCodeAt(Yf-1)===nd;)Yf--;if((!gf||Mf!==Yf)&&Xd.push(Ud.slice(Mf,Yf)),gf)break;Zd=Qd+1,Qd=Ud.indexOf(sd,Zd+1),Qd=Qd===-1?Vd:Qd}return Xd=Xd.join( `
` ),Fd(Ud.slice(0,Qd))({type:"math",value:Xd,data:{hName:"div",hProperties:{className:dd.concat()},hChildren:[{type:"text",value:Xd}]}})}}}}function Td(Sd){let Ad=Sd.prototype;Ad.visitors.math=Nd;function Nd(Ld){return ` $$
2024-09-25 14:23:53 +08:00
` +Ld.value+ `
$$ ` }}}),Wi=C $ 1((Ra,qa)=>{var td=Mi $ 1(),rd= $ i $ 1();qa.exports=nd;function nd(ad){var sd=ad||{};rd.call(this,sd),td.call(this,sd)}}),Ie $ 1=C $ 1((Ra,qa)=>{qa.exports=rd;var td=Object.prototype.hasOwnProperty;function rd(){for(var nd={},ad=0;ad<arguments.length;ad++){var sd=arguments[ad];for(var ud in sd)td.call(sd,ud)&&(nd[ud]=sd[ud])}return nd}}),Ji $ 2=C $ 1((Ra,qa)=>{typeof Object.create=="function"?qa.exports=function(td,rd){rd&&(td.super_=rd,td.prototype=Object.create(rd.prototype,{constructor:{value:td,enumerable:!1,writable:!0,configurable:!0}}))}:qa.exports=function(td,rd){if(rd){td.super_=rd;var nd=function(){};nd.prototype=rd.prototype,td.prototype=new nd,td.prototype.constructor=td}}}),Zi $ 1=C $ 1((Ra,qa)=>{var td=Ie $ 1(),rd=Ji $ 2();qa.exports=nd;function nd(ad){var sd,ud,cd;rd(pd,ad),rd(dd,pd),sd=pd.prototype;for(ud in sd)cd=sd[ud],cd&&typeof cd=="object"&&(sd[ud]="concat"in cd?cd.concat():td(cd));return pd;function dd(fd){return ad.apply(this,fd)}function pd(){return this instanceof pd?ad.apply(this,arguments):new dd(arguments)}}}),ru $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd,nd,ad){return sd;function sd(){var ud=ad||this,cd=ud[rd];return ud[rd]=!nd,dd;function dd(){ud[rd]=cd}}}}),nu $ 3=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){for(var nd=String(rd),ad=[],sd=/ \r ? \n | \r /g;sd.exec(nd);)ad.push(sd.lastIndex);return ad.push(nd.length+1),{toPoint:ud,toPosition:ud,toOffset:cd};function ud(dd){var pd=-1;if(dd>-1&&dd<ad[ad.length-1]){for(;++pd<ad.length;)if(ad[pd]>dd)return{line:pd+1,column:dd-(ad[pd-1]||0)+1,offset:dd}}return{}}function cd(dd){var pd=dd&&dd.line,fd=dd&&dd.column,Td;return!isNaN(pd)&&!isNaN(fd)&&pd-1 in ad&&(Td=(ad[pd-2]||0)+fd-1||0),Td>-1&&Td<ad[ad.length-1]?Td:-1}}}),uu $ 3=C $ 1((Ra,qa)=>{qa.exports=rd;var td=" \\ ";function rd(nd,ad){return sd;function sd(ud){for(var cd=0,dd=ud.indexOf(td),pd=nd[ad],fd=[],Td;dd!==-1;)fd.push(ud.slice(cd,dd)),cd=dd+1,Td=ud.charAt(cd),(!Td||pd.indexOf(Td)===-1)&&fd.push(td),dd=ud.indexOf(td,cd+1);return fd.push(ud.slice(cd)),fd.join("")}}}),au $ 2=C $ 1((Ra,qa)=>{qa.exports={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´ ",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸ ",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:" ",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"× ",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"}}),ou $ 2=C $ 1((Ra,qa)=>{qa.exports={0:"<22> ",128:"€",130:"‚ ",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ ",137:"‰",138:"Š",139:"‹ ",140:"Œ",142:"Ž",145:"‘ ",146:"’ ",147:"“",148:"”",149:"•",150:"– ",151:"—",152:"˜ ",153:"™",154:"š",155:"› ",156:"œ",158:"ž",159:"Ÿ"}}),Ne $ 1=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){var nd=typeof rd=="string"?rd.charCodeAt(0):rd;return nd>=48&&nd<=57}}),lu $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){var nd=typeof rd=="string"?rd.charCodeAt(0):rd;return nd>=97&&nd<=102||nd>=65&&nd<=70||nd>=48&&nd<=57}}),Ve $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){var nd=typeof rd=="string"?rd.charCodeAt(0):rd;return nd>=97&&nd<=122||nd>=65&&nd<=90}}),pu $ 2=C $ 1((Ra,qa)=>{var td=Ve $ 2(),rd=Ne $ 1();qa.exports=nd;function nd(ad){return td(ad)||rd(ad)}}),du $ 2=C $ 1((Ra,qa)=>{qa.exports={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abr
2024-11-27 11:30:55 +08:00
` ,Nfr:"𝔑 ",NoBreak:" ",NonBreakingSpace:" ",Nopf:"ℕ ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩 ",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν ",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О ",Odblac:"Ő",Ofr:"𝔒 ",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο ",Oopf:"𝕆 ",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘ ",Or:"⩔",Oscr:"𝒪 ",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓 ",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ ",Popf:"ℙ ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫 ",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔 ",Qopf:"ℚ ",Qscr:"𝒬 ",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р ",Re:"ℜ ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ ",Rho:"Ρ ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь ",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С ",Sfr:"𝔖 ",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊 ",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮 ",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т ",Tfr:"𝔗 ",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼ ",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋 ",TripleDot:"⃛",Tscr:"𝒯 ",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У ",Udblac:"Ű",Ufr:"𝔘 ",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃ ",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌 ",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"
` );xf!==-1;)Nd++,gf=xf,xf=_f.indexOf( `
` ,xf+1);gf===-1?Ld+=_f.length:Ld=_f.length-gf,Nd in fd&&(gf!==-1?Ld+=fd[Nd]:Ld<=fd[Nd]&&(Ld=fd[Nd]+1))}function Zd(){var _f=[],gf=Nd+1;return function(){for(var xf=Nd+1;gf<xf;)_f.push((fd[gf]||0)+1),gf++;return _f}}function zd(){var _f={line:Nd,column:Ld};return _f.offset=pd.toOffset(_f),_f}function Xd(_f){this.start=_f,this.end=zd()}function Qd(_f){cd.slice(0,_f.length)!==_f&&pd.file.fail(new Error("Incorrectly eaten value: please report this warning on https://git.io/vg5Ft"),zd())}function hf(){var _f=zd();return gf;function gf(xf,Mf){var Yf=xf.position,Qf=Yf?Yf.start:_f,qf=[],Bf=Yf&&Yf.end.line,Df=_f.line;if(xf.position=new Xd(Qf),Yf&&Mf&&Yf.indent){if(qf=Yf.indent,Bf<Df){for(;++Bf<Df;)qf.push((fd[Bf]||0)+1);qf.push(_f.column)}Mf=qf.concat(Mf)}return xf.position.indent=Mf||[],xf}}function bf(_f,gf){var xf=gf?gf.children:Td,Mf=xf[xf.length-1],Yf;return Mf&&_f.type===Mf.type&&(_f.type==="text"||_f.type==="blockquote")&&rd(Mf)&&rd(_f)&&(Yf=_f.type==="text"?nd:ad,_f=Yf.call(pd,Mf,_f)),_f!==Mf&&xf.push(_f),pd.atStart&&Td.length!==0&&pd.exitStart(),_f}function yf(_f){var gf=Zd(),xf=hf(),Mf=zd();return Qd(_f),Yf.reset=Qf,Qf.test=qf,Yf.test=qf,cd=cd.slice(_f.length),Vd(_f),gf=gf(),Yf;function Yf(Bf,Df){return xf(bf(xf(Bf),Df),gf)}function Qf(){var Bf=Yf.apply(null,arguments);return Nd=Mf.line,Ld=Mf.column,cd=_f+cd,Bf}function qf(){var Bf=xf({});return Nd=Mf.line,Ld=Mf.column,cd=_f+cd,Bf.position}}}}function rd(sd){var ud,cd;return sd.type!=="text"||!sd.position?!0:(ud=sd.position.start,cd=sd.position.end,ud.line!==cd.line||cd.column-ud.column===sd.value.length)}function nd(sd,ud){return sd.value+=ud.value,sd}function ad(sd,ud){return this.options.commonmark||this.options.gfm?ud:(sd.children=sd.children.concat(ud.children),sd)}}),Uu $ 2=C $ 1((Ra,qa)=>{qa.exports=ad;var td=[" \\ "," ` "," * "," { "," } "," [ "," ] "," ( "," ) "," # "," + "," - "," . "," ! "," _ "," > "],rd=td.concat([" ~ "," | " ] ) , nd = rd . concat ( [ `
` ,'"'," $ ","%","&","'",",","/",":",";","<","=","?","@","^"]);ad.default=td,ad.gfm=rd,ad.commonmark=nd;function ad(sd){var ud=sd||{};return ud.commonmark?nd:ud.gfm?rd:td}}),Mu $ 1=C $ 1((Ra,qa)=>{qa.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]}),Rt $ 3=C $ 1((Ra,qa)=>{qa.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:Mu $ 1()}}),Vu $ 2=C $ 1((Ra,qa)=>{var td=Ie $ 1(),rd=Uu $ 2(),nd=Rt $ 3();qa.exports=ad;function ad(sd){var ud=this,cd=ud.options,dd,pd;if(sd==null)sd={};else if(typeof sd=="object")sd=td(sd);else throw new Error("Invalid value ` "+sd+" ` for setting ` options ` ");for(dd in nd){if(pd=sd[dd],pd==null&&(pd=cd[dd]),dd!=="blocks"&&typeof pd!="boolean"||dd==="blocks"&&typeof pd!="object")throw new Error("Invalid value ` "+pd+" ` for setting ` options . "+dd+" ` ");sd[dd]=pd}return ud.options=sd,ud.escape=rd(sd),ud}}),Hu $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(ud){if(ud==null)return sd;if(typeof ud=="string")return ad(ud);if(typeof ud=="object")return"length"in ud?nd(ud):rd(ud);if(typeof ud=="function")return ud;throw new Error("Expected function, string, or object as test")}function rd(ud){return cd;function cd(dd){var pd;for(pd in ud)if(dd[pd]!==ud[pd])return!1;return!0}}function nd(ud){for(var cd=[],dd=-1;++dd<ud.length;)cd[dd]=td(ud[dd]);return pd;function pd(){for(var fd=-1;++fd<cd.length;)if(cd[fd].apply(this,arguments))return!0;return!1}}function ad(ud){return cd;function cd(dd){return!!(dd&&dd.type===ud)}}function sd(){return!0}}),Ku $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){return rd}}),Zu $ 3=C $ 1((Ra,qa)=>{qa.exports=ud;var td=Hu $ 2(),rd=Ku $ 2(),nd=!0,ad="skip",sd=!1;ud.CONTINUE=nd,ud.SKIP=ad,ud.EXIT=sd;function ud(dd,pd,fd,Td){var Sd,Ad;typeof pd=="function"&&typeof fd!="function"&&(Td=fd,fd=pd,pd=null),Ad=td(pd),Sd=Td?-1:1,Nd(dd,null,[])();function Nd(Ld,Rd,Od){var kd=typeof Ld=="object"&&Ld!==null?Ld:{},Fd;return typeof kd.type=="string"&&(Fd=typeof kd.tagName=="string"?kd.tagName:typeof kd.name=="string"?kd.name:void 0,Ud.displayName="node ("+rd(kd.type+(Fd?"<"+Fd+">":""))+")"),Ud;function Ud(){var Hd=Od.concat(Ld),Vd=[],Zd,zd;if((!pd||Ad(Ld,Rd,Od[Od.length-1]||null))&&(Vd=cd(fd(Ld,Od)),Vd[0]===sd))return Vd;if(Ld.children&&Vd[0]!==ad)for(zd=(Td?Ld.children.length:-1)+Sd;zd>-1&&zd<Ld.children.length;){if(Zd=Nd(Ld.children[zd],zd,Hd)(),Zd[0]===sd)return Zd;zd=typeof Zd[1]=="number"?Zd[1]:zd+Sd}return Vd}}}function cd(dd){return dd!==null&&typeof dd=="object"&&"length"in dd?dd:typeof dd=="number"?[nd,dd]:[dd]}}),ra $ 1=C $ 1((Ra,qa)=>{qa.exports=sd;var td=Zu $ 3(),rd=td.CONTINUE,nd=td.SKIP,ad=td.EXIT;sd.CONTINUE=rd,sd.SKIP=nd,sd.EXIT=ad;function sd(ud,cd,dd,pd){typeof cd=="function"&&typeof dd!="function"&&(pd=dd,dd=cd,cd=null),td(ud,cd,fd,pd);function fd(Td,Sd){var Ad=Sd[Sd.length-1],Nd=Ad?Ad.children.indexOf(Td):null;return dd(Td,Nd,Ad)}}}),na=C $ 1((Ra,qa)=>{var td=ra $ 1();qa.exports=rd;function rd(sd,ud){return td(sd,ud?nd:ad),sd}function nd(sd){delete sd.position}function ad(sd){sd.position=void 0}}),aa $ 2=C $ 1((Ra,qa)=>{var td=Ie $ 1(),rd=na();qa.exports=sd;var nd= `
2024-09-25 14:23:53 +08:00
` ,ad=/ \r \n | \r /g;function sd(){var ud=this,cd=String(ud.file),dd={line:1,column:1,offset:0},pd=td(dd),fd;return cd=cd.replace(ad,nd),cd.charCodeAt(0)===65279&&(cd=cd.slice(1),pd.column++,pd.offset++),fd={type:"root",children:ud.tokenizeBlock(cd,pd),position:{start:dd,end:ud.eof||td(dd)}},ud.options.position||rd(fd,!0),fd}}),sa=C $ 1((Ra,qa)=>{var td=/^[ \t ]*( \n | $ )/;qa.exports=rd;function rd(nd,ad,sd){for(var ud,cd="",dd=0,pd=ad.length;dd<pd&&(ud=td.exec(ad.slice(dd)),ud!=null);)dd+=ud[0].length,cd+=ud[0];if(cd!==""){if(sd)return!0;nd(cd)}}}),Hr $ 2=C $ 1((Ra,qa)=>{var td="",rd;qa.exports=nd;function nd(ad,sd){if(typeof ad!="string")throw new TypeError("expected a string");if(sd===1)return ad;if(sd===2)return ad+ad;var ud=ad.length*sd;if(rd!==ad||typeof rd>"u")rd=ad,td="";else if(td.length>=ud)return td.substr(0,ud);for(;ud>td.length&&sd>1;)sd&1&&(td+=ad),sd>>=1,ad+=ad;return td+=ad,td=td.substr(0,ud),td}}),Mt $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){return String(rd).replace(/ \n + $ /,"")}}),pa=C $ 1((Ra,qa)=>{var td=Hr $ 2(),rd=Mt $ 2();qa.exports=dd;var nd= `
2024-11-27 11:30:55 +08:00
` ,ad=" ",sd=" ",ud=4,cd=td(sd,ud);function dd(pd,fd,Td){for(var Sd=-1,Ad=fd.length,Nd="",Ld="",Rd="",Od="",kd,Fd,Ud;++Sd<Ad;)if(kd=fd.charAt(Sd),Ud)if(Ud=!1,Nd+=Rd,Ld+=Od,Rd="",Od="",kd===nd)Rd=kd,Od=kd;else for(Nd+=kd,Ld+=kd;++Sd<Ad;){if(kd=fd.charAt(Sd),!kd||kd===nd){Od=kd,Rd=kd;break}Nd+=kd,Ld+=kd}else if(kd===sd&&fd.charAt(Sd+1)===kd&&fd.charAt(Sd+2)===kd&&fd.charAt(Sd+3)===kd)Rd+=cd,Sd+=3,Ud=!0;else if(kd===ad)Rd+=kd,Ud=!0;else{for(Fd="";kd===ad||kd===sd;)Fd+=kd,kd=fd.charAt(++Sd);if(kd!==nd)break;Rd+=Fd+kd,Od+=kd}if(Ld)return Td?!0:pd(Nd)({type:"code",lang:null,meta:null,value:rd(Ld)})}}),ma=C $ 1((Ra,qa)=>{qa.exports=dd;var td= `
` ,rd=" ",nd=" ",ad="~",sd=" ` ",ud=3,cd=4;function dd(pd,fd,Td){var Sd=this,Ad=Sd.options.gfm,Nd=fd.length+1,Ld=0,Rd=" ",Od,kd,Fd,Ud,Hd,Vd,Zd,zd,Xd,Qd,hf,bf,yf;if(Ad){for(;Ld<Nd&&(Fd=fd.charAt(Ld),!(Fd!==nd&&Fd!==rd));)Rd+=Fd,Ld++;if(bf=Ld,Fd=fd.charAt(Ld),!(Fd!==ad&&Fd!==sd)){for(Ld++,kd=Fd,Od=1,Rd+=Fd;Ld<Nd&&(Fd=fd.charAt(Ld),Fd===kd);)Rd+=Fd,Od++,Ld++;if(!(Od<ud)){for(;Ld<Nd&&(Fd=fd.charAt(Ld),!(Fd!==nd&&Fd!==rd));)Rd+=Fd,Ld++;for(Ud=" ",Zd=" ";Ld<Nd&&(Fd=fd.charAt(Ld),!(Fd===td||kd===sd&&Fd===kd));)Fd===nd||Fd===rd?Zd+=Fd:(Ud+=Zd+Fd,Zd=" "),Ld++;if(Fd=fd.charAt(Ld),!(Fd&&Fd!==td)){if(Td)return!0;yf=pd.now(),yf.column+=Rd.length,yf.offset+=Rd.length,Rd+=Ud,Ud=Sd.decode.raw(Sd.unescape(Ud),yf),Zd&&(Rd+=Zd),Zd=" ",Qd=" ",hf=" ",zd=" ",Xd=" ";for(var _f=!0;Ld<Nd;){if(Fd=fd.charAt(Ld),zd+=Qd,Xd+=hf,Qd=" ",hf=" ",Fd!==td){zd+=Fd,hf+=Fd,Ld++;continue}for(_f?(Rd+=Fd,_f=!1):(Qd+=Fd,hf+=Fd),Zd=" ",Ld++;Ld<Nd&&(Fd=fd.charAt(Ld),Fd===nd);)Zd+=Fd,Ld++;if(Qd+=Zd,hf+=Zd.slice(bf),!(Zd.length>=cd)){for(Zd=" ";Ld<Nd&&(Fd=fd.charAt(Ld),Fd===kd);)Zd+=Fd,Ld++;if(Qd+=Zd,hf+=Zd,!(Zd.length<Od)){for(Zd=" ";Ld<Nd&&(Fd=fd.charAt(Ld),!(Fd!==nd&&Fd!==rd));)Qd+=Fd,hf+=Fd,Ld++;if(!Fd||Fd===td)break}}}for(Rd+=zd+Qd,Ld=-1,Nd=Ud.length;++Ld<Nd;)if(Fd=Ud.charAt(Ld),Fd===nd||Fd===rd)Hd||(Hd=Ud.slice(0,Ld));else if(Hd){Vd=Ud.slice(Ld);break}return pd(Rd)({type:" code ",lang:Hd||Ud||null,meta:Vd||null,value:Xd})}}}}}}),Re$3=C$1((Ra,qa)=>{Ra=qa.exports=td;function td(rd){return rd.trim?rd.trim():Ra.right(Ra.left(rd))}Ra.left=function(rd){return rd.trimLeft?rd.trimLeft():rd.replace(/^\s\s*/," " ) } , Ra . right = function ( rd ) { if ( rd . trimRight ) return rd . trimRight ( ) ; for ( var nd = /\s/ , ad = rd . length ; nd . test ( rd . charAt ( -- ad ) ) ; ) ; return rd . slice ( 0 , ad + 1 ) } } ) , Kr$2 = C$1 ( ( Ra , qa ) => { qa . exports = td ; function td ( rd , nd , ad , sd ) { for ( var ud = rd . length , cd = - 1 , dd , pd ; ++ cd < ud ; ) if ( dd = rd [ cd ] , pd = dd [ 1 ] || { } , ! ( pd . pedantic !== void 0 && pd . pedantic !== ad . options . pedantic ) && ! ( pd . commonmark !== void 0 && pd . commonmark !== ad . options . commonmark ) && nd [ dd [ 0 ] ] . apply ( ad , sd ) ) return ! 0 ; return ! 1 } } ) , ba$1 = C$1 ( ( Ra , qa ) => { var td = Re$3 ( ) , rd = Kr$2 ( ) ; qa . exports = cd ; var nd = `
` ,ad=" ",sd=" ",ud=">";function cd(dd,pd,fd){for(var Td=this,Sd=Td.offset,Ad=Td.blockTokenizers,Nd=Td.interruptBlockquote,Ld=dd.now(),Rd=Ld.line,Od=pd.length,kd=[],Fd=[],Ud=[],Hd,Vd=0,Zd,zd,Xd,Qd,hf,bf,yf,_f;Vd<Od&&(Zd=pd.charAt(Vd),!(Zd!==sd&&Zd!==ad));)Vd++;if(pd.charAt(Vd)===ud){if(fd)return!0;for(Vd=0;Vd<Od;){for(Xd=pd.indexOf(nd,Vd),bf=Vd,yf=!1,Xd===-1&&(Xd=Od);Vd<Od&&(Zd=pd.charAt(Vd),!(Zd!==sd&&Zd!==ad));)Vd++;if(pd.charAt(Vd)===ud?(Vd++,yf=!0,pd.charAt(Vd)===sd&&Vd++):Vd=bf,Qd=pd.slice(Vd,Xd),!yf&&!td(Qd)){Vd=bf;break}if(!yf&&(zd=pd.slice(Vd),rd(Nd,Ad,Td,[dd,zd,!0])))break;hf=bf===Vd?Qd:pd.slice(bf,Xd),Ud.push(Vd-bf),kd.push(hf),Fd.push(Qd),Vd=Xd+1}for(Vd=-1,Od=Ud.length,Hd=dd(kd.join(nd));++Vd<Od;)Sd[Rd]=(Sd[Rd]||0)+Ud[Vd],Rd++;return _f=Td.enterBlock(),Fd=Td.tokenizeBlock(Fd.join(nd),Ld),_f(),Hd({type:"blockquote",children:Fd})}}}),xa $ 1=C $ 1((Ra,qa)=>{qa.exports=ud;var td= `
` ,rd=" ",nd=" ",ad="#",sd=6;function ud(cd,dd,pd){for(var fd=this,Td=fd.options.pedantic,Sd=dd.length+1,Ad=-1,Nd=cd.now(),Ld="",Rd="",Od,kd,Fd;++Ad<Sd;){if(Od=dd.charAt(Ad),Od!==nd&&Od!==rd){Ad--;break}Ld+=Od}for(Fd=0;++Ad<=Sd;){if(Od=dd.charAt(Ad),Od!==ad){Ad--;break}Ld+=Od,Fd++}if(!(Fd>sd)&&!(!Fd||!Td&&dd.charAt(Ad+1)===ad)){for(Sd=dd.length+1,kd="";++Ad<Sd;){if(Od=dd.charAt(Ad),Od!==nd&&Od!==rd){Ad--;break}kd+=Od}if(!(!Td&&kd.length===0&&Od&&Od!==td)){if(pd)return!0;for(Ld+=kd,kd="",Rd="";++Ad<Sd&&(Od=dd.charAt(Ad),!(!Od||Od===td));){if(Od!==nd&&Od!==rd&&Od!==ad){Rd+=kd+Od,kd="";continue}for(;Od===nd||Od===rd;)kd+=Od,Od=dd.charAt(++Ad);if(!Td&&Rd&&!kd&&Od===ad){Rd+=Od;continue}for(;Od===ad;)kd+=Od,Od=dd.charAt(++Ad);for(;Od===nd||Od===rd;)kd+=Od,Od=dd.charAt(++Ad);Ad--}return Nd.column+=Ld.length,Nd.offset+=Ld.length,Ld+=Rd+kd,cd(Ld)({type:"heading",depth:Fd,children:fd.tokenizeInline(Rd,Nd)})}}}}),Ba=C $ 1((Ra,qa)=>{qa.exports=dd;var td=" ",rd= `
` ,nd=" ",ad="*",sd="-",ud="_",cd=3;function dd(pd,fd,Td){for(var Sd=-1,Ad=fd.length+1,Nd="",Ld,Rd,Od,kd;++Sd<Ad&&(Ld=fd.charAt(Sd),!(Ld!==td&&Ld!==nd));)Nd+=Ld;if(!(Ld!==ad&&Ld!==sd&&Ld!==ud))for(Rd=Ld,Nd+=Ld,Od=1,kd="";++Sd<Ad;)if(Ld=fd.charAt(Sd),Ld===Rd)Od++,Nd+=kd+Rd,kd="";else if(Ld===nd)kd+=Ld;else return Od>=cd&&(!Ld||Ld===rd)?(Nd+=kd,Td?!0:pd(Nd)({type:"thematicBreak"})):void 0}}), $ t $ 3=C $ 1((Ra,qa)=>{qa.exports=sd;var td=" ",rd=" ",nd=1,ad=4;function sd(ud){for(var cd=0,dd=0,pd=ud.charAt(cd),fd={},Td,Sd=0;pd===td||pd===rd;){for(Td=pd===td?ad:nd,dd+=Td,Td>1&&(dd=Math.floor(dd/Td)*Td);Sd<dd;)fd[++Sd]=cd;pd=ud.charAt(++cd)}return{indent:dd,stops:fd}}}),Oa $ 2=C $ 1((Ra,qa)=>{var td=Re $ 3(),rd=Hr $ 2(),nd= $ t $ 3();qa.exports=cd;var ad= `
` ,sd=" ",ud="!";function cd(dd,pd){var fd=dd.split(ad),Td=fd.length+1,Sd=1/0,Ad=[],Nd,Ld,Rd;for(fd.unshift(rd(sd,pd)+ud);Td--;)if(Ld=nd(fd[Td]),Ad[Td]=Ld.stops,td(fd[Td]).length!==0)if(Ld.indent)Ld.indent>0&&Ld.indent<Sd&&(Sd=Ld.indent);else{Sd=1/0;break}if(Sd!==1/0)for(Td=fd.length;Td--;){for(Rd=Ad[Td],Nd=Sd;Nd&&!(Nd in Rd);)Nd--;fd[Td]=fd[Td].slice(Rd[Nd]+1)}return fd.shift(),fd.join(ad)}}),Ua $ 2=C $ 1((Ra,qa)=>{var td=Re $ 3(),rd=Hr $ 2(),nd=Ne $ 1(),ad= $ t $ 3(),sd=Oa $ 2(),ud=Kr $ 2();qa.exports=Zd;var cd="*",dd="_",pd="+",fd="-",Td=".",Sd=" ",Ad= `
` ,Nd=" ",Ld=")",Rd="x",Od=4,kd=/ \n \n (?! \s * $ )/,Fd=/^ \[ ([ X \t x])][ \t ]/,Ud=/^([ \t ]*)([*+-]| \d +[.)])( {1,4}(?! )| | \t | $ |(?= \n ))([^ \n ]*)/,Hd=/^([ \t ]*)([*+-]| \d +[.)])([ \t ]+)/,Vd=/^( {1,4}| \t )?/gm;function Zd(hf,bf,yf){for(var _f=this,gf=_f.options.commonmark,xf=_f.options.pedantic,Mf=_f.blockTokenizers,Yf=_f.interruptList,Qf=0,qf=bf.length,Bf=null,Df, $ f,Zf,Xf,Tf,vf,Pf,Gf,ah,Wf,Rf,Vf,lh,Uf,wf,Of,jf,uh,_h,nh=!1,wh,hh,Th,Vh;Qf<qf&&(Xf=bf.charAt(Qf),!(Xf!==Nd&&Xf!==Sd));)Qf++;if(Xf=bf.charAt(Qf),Xf===cd||Xf===pd||Xf===fd)Tf=Xf,Zf=!1;else{for(Zf=!0, $ f="";Qf<qf&&(Xf=bf.charAt(Qf),!!nd(Xf));) $ f+=Xf,Qf++;if(Xf=bf.charAt(Qf),! $ f||!(Xf===Td||gf&&Xf===Ld)||yf&& $ f!=="1")return;Bf=parseInt( $ f,10),Tf=Xf}if(Xf=bf.charAt(++Qf),!(Xf!==Sd&&Xf!==Nd&&(xf||Xf!==Ad&&Xf!==""))){if(yf)return!0;for(Qf=0,Uf=[],wf=[],Of=[];Qf<qf;){for(vf=bf.indexOf(Ad,Qf),Pf=Qf,Gf=!1,Vh=!1,vf===-1&&(vf=qf),Df=0;Qf<qf;){if(Xf=bf.charAt(Qf),Xf===Nd)Df+=Od-Df%Od;else if(Xf===Sd)Df++;else break;Qf++}if(jf&&Df>=jf.indent&&(Vh=!0),Xf=bf.charAt(Qf),ah=null,!Vh){if(Xf===cd||Xf===pd||Xf===fd)ah=Xf,Qf++,Df++;else{for( $ f="";Qf<qf&&(Xf=bf.charAt(Qf),!!nd(Xf));) $ f+=Xf,Qf++;Xf=bf.charAt(Qf),Qf++, $ f&&(Xf===Td||gf&&Xf===Ld)&&(ah=Xf,Df+= $ f.length+1)}if(ah)if(Xf=bf.charAt(Qf),Xf===Nd)Df+=Od-Df%Od,Qf++;else if(Xf===Sd){for(Th=Qf+Od;Qf<Th&&bf.charAt(Qf)===Sd;)Qf++,Df++;Qf===Th&&bf.charAt(Qf)===Sd&&(Qf-=Od-1,Df-=Od-1)}else Xf!==Ad&&Xf!==""&&(ah=null)}if(ah){if(!xf&&Tf!==ah)break;Gf=!0}else!gf&&!Vh&&bf.charAt(Pf)===Sd?Vh=!0:gf&&jf&&(Vh=Df>=jf.indent||Df>Od),Gf=!1,Qf=Pf;if(Rf=bf.slice(Pf,vf),Wf=Pf===Qf?Rf:bf.slice(Qf,vf),(ah===cd||ah===dd||ah===fd)&&Mf.thematicBreak.call(_f,hf,Rf,!0))break;if(Vf=lh,lh=!Gf&&!td(Wf).length,Vh&&jf)jf.value=jf.value.concat(Of,Rf),wf=wf.concat(Of,Rf),Of=[];else if(Gf)Of.length!==0&&(nh=!0,jf.value.push(""),jf.trail=Of.concat()),jf={value:[Rf],indent:Df,trail:[]},Uf.push(jf),wf=wf.concat(Of,Rf),Of=[];else if(lh){if(Vf&&!gf)break;Of.push(Rf)}else{if(Vf||ud(Yf,Mf,_f,[hf,Rf,!0]))break;jf.value=jf.value.concat(Of,Rf),wf=wf.concat(Of,Rf),Of=[]}Qf=vf+1}for(wh=hf(wf.join(Ad)).reset({type:"list",ordered:Zf,start:Bf,spread:nh,children:[]}),uh=_f.enterList(),_h=_f.enterBlock(),Qf=-1,qf=Uf.length;++Qf<qf;)jf=Uf[Qf].value.join(Ad),hh=hf.now(),hf(jf)(zd(_f,jf,hh),wh),jf=Uf[Qf].trail.join(Ad),Qf!==qf-1&&(jf+=Ad),hf(jf);return uh(),_h(),wh}}function zd(hf,bf,yf){var _f=hf.offset,gf=hf.options.pedantic?Xd:Qd,xf=null,Mf,Yf;return bf=gf.apply(null,arguments),hf.options.gfm&&(Mf=bf.match(Fd),Mf&&(Yf=Mf[0].length,xf=Mf[1].toLowerCase()===Rd,_f[yf.line]+=Yf,bf=bf.slice(Yf))),{type:"listItem",spread:kd.test(bf),checked:xf,children:hf.tokenizeBlock(bf,yf)}}function Xd(hf,bf,yf){var _f=hf.offset,gf=yf.line;return bf=bf.replace(Hd,xf),gf=yf.line,bf.replace(Vd,xf);function xf(Mf){return _f[gf]=(_f[gf]||0)+Mf.length,gf++,""}}function Qd(hf,bf,yf){var _f=hf.offset,gf=yf.line,xf,Mf,Yf,Qf,qf,Bf,Df;for(bf=bf.replace(Ud, $ f),Qf=bf.split(Ad),qf=sd(bf,ad(xf).indent).split(Ad),qf[0]=Yf,_f[gf]=(_f[gf]||0)+Mf.length,gf++,Bf=0,Df=Qf.length;++Bf<Df;)_f[gf]=(_f[gf]||0)+Qf[Bf].length-qf[Bf].length,gf++;return qf.join(Ad);function $ f(Zf,Xf,Tf,vf,Pf){return Mf=Xf+Tf+vf,Yf=Pf,Number(Tf)<10&&Mf.length%2===1&&(Tf=Sd+Tf),xf=Xf+rd(Sd,Tf.length)+vf,xf+Yf}}}),Ga $ 1=C $ 1((Ra,qa)=>{qa.exports=pd;var td= `
` ,rd=" ",nd=" ",ad="=",sd="-",ud=3,cd=1,dd=2;function pd(fd,Td,Sd){for(var Ad=this,Nd=fd.now(),Ld=Td.length,Rd=-1,Od="",kd,Fd,Ud,Hd,Vd;++Rd<Ld;){if(Ud=Td.charAt(Rd),Ud!==nd||Rd>=ud){Rd--;break}Od+=Ud}for(kd="",Fd="";++Rd<Ld;){if(Ud=Td.charAt(Rd),Ud===td){Rd--;break}Ud===nd||Ud===rd?Fd+=Ud:(kd+=Fd+Ud,Fd="")}if(Nd.column+=Od.length,Nd.offset+=Od.length,Od+=kd+Fd,Ud=Td.charAt(++Rd),Hd=Td.charAt(++Rd),!(Ud!==td||Hd!==ad&&Hd!==sd)){for(Od+=Ud,Fd=Hd,Vd=Hd===ad?cd:dd;++Rd<Ld;){if(Ud=Td.charAt(Rd),Ud!==Hd){if(Ud!==td)return;Rd--;break}Fd+=Ud}return Sd?!0:fd(Od+Fd)({type:"heading",depth:Vd,children:Ad.tokenizeInline(kd,Nd)})}}}),Xt $ 2=C $ 1(Ra=>{var qa="[a-zA-Z_:][a-zA-Z0-9:._-]*",td="[^ \" '=<> ` \ \u0000 - \ \u0020 ] + ",rd=" '[^' ] * '",nd=' "[^" ] * "',ad=" ( ? : "+td+" | "+rd+" | "+nd+" ) ",sd=" ( ? : \ \ s + "+qa+" ( ? : \ \ s *= \ \ s * "+ad+" ) ? ) ",ud=" < [ A - Za - z ] [ A - Za - z0 - 9 \ \ - ] * "+sd+" * \ \ s * \ \ / ? > ",cd=" < \ \ / [ A - Za - z ] [ A - Za - z0 - 9 \ \ - ] * \ \ s * > ",dd=" <!-- -- > | <!-- ( ? : - ? [ ^ > - ] ) ( ? : - ? [ ^ - ] ) * -- > ",pd=" < [ ? ] . * ? [ ? ] > ",fd=" < ! [ A - Za - z ] + \ \ s + [ ^ > ] * > ",Td=" < ! \ \ [ CDATA \ \ [ [ \ \ s \ \ S ] * ? \ \ ] \ \ ] > ";Ra.openCloseTag=new RegExp(" ^ ( ? : "+ud+" | "+cd+" ) "),Ra.tag=new RegExp(" ^ ( ? : "+ud+" | "+cd+" | "+dd+" | "+pd+" | "+fd+" | "+Td+" ) ")}),Ka=C$1((Ra,qa)=>{var td=Xt$2().openCloseTag;qa.exports=kd;var rd=" ",nd=" " , ad = `
` ,sd="<",ud=/^<(script|pre|style)(?=( \s |>| $ ))/i,cd=/< \/ (script|pre|style)>/i,dd=/^<!--/,pd=/-->/,fd=/^< \? /,Td=/ \? >/,Sd=/^<![A-Za-z]/,Ad=/>/,Nd=/^<! \[ CDATA \[ /,Ld=/]]>/,Rd=/^ $ /,Od=new RegExp(td.source+" \\ s* $ ");function kd(Fd,Ud,Hd){for(var Vd=this,Zd=Vd.options.blocks.join("|"),zd=new RegExp("^</?("+Zd+")(?=( \\ s|/?>| $ ))","i"),Xd=Ud.length,Qd=0,hf,bf,yf,_f,gf,xf,Mf,Yf=[[ud,cd,!0],[dd,pd,!0],[fd,Td,!0],[Sd,Ad,!0],[Nd,Ld,!0],[zd,Rd,!0],[Od,Rd,!1]];Qd<Xd&&(_f=Ud.charAt(Qd),!(_f!==rd&&_f!==nd));)Qd++;if(Ud.charAt(Qd)===sd){for(hf=Ud.indexOf(ad,Qd+1),hf=hf===-1?Xd:hf,bf=Ud.slice(Qd,hf),yf=-1,gf=Yf.length;++yf<gf;)if(Yf[yf][0].test(bf)){xf=Yf[yf];break}if(xf){if(Hd)return xf[2];if(Qd=hf,!xf[1].test(bf))for(;Qd<Xd;){if(hf=Ud.indexOf(ad,Qd+1),hf=hf===-1?Xd:hf,bf=Ud.slice(Qd+1,hf),xf[1].test(bf)){bf&&(Qd=hf);break}Qd=hf}return Mf=Ud.slice(0,Qd),Fd(Mf)({type:"html",value:Mf})}}}}),ue $ 2=C $ 1((Ra,qa)=>{qa.exports=nd;var td=String.fromCharCode,rd=/ \s /;function nd(ad){return rd.test(typeof ad=="number"?td(ad):ad.charAt(0))}}),Qt $ 1=C $ 1((Ra,qa)=>{var td=xr $ 1();qa.exports=rd;function rd(nd){return td(nd).toLowerCase()}}),io $ 1=C $ 1((Ra,qa)=>{var td=ue $ 2(),rd=Qt $ 1();qa.exports=Rd;var nd='"',ad="'",sd=" \\ ",ud= `
` ,cd=" ",dd=" ",pd="[",fd="]",Td="(",Sd=")",Ad=":",Nd="<",Ld=">";function Rd(Fd,Ud,Hd){for(var Vd=this,Zd=Vd.options.commonmark,zd=0,Xd=Ud.length,Qd="",hf,bf,yf,_f,gf,xf,Mf,Yf;zd<Xd&&(_f=Ud.charAt(zd),!(_f!==dd&&_f!==cd));)Qd+=_f,zd++;if(_f=Ud.charAt(zd),_f===pd){for(zd++,Qd+=_f,yf="";zd<Xd&&(_f=Ud.charAt(zd),_f!==fd);)_f===sd&&(yf+=_f,zd++,_f=Ud.charAt(zd)),yf+=_f,zd++;if(!(!yf||Ud.charAt(zd)!==fd||Ud.charAt(zd+1)!==Ad)){for(xf=yf,Qd+=yf+fd+Ad,zd=Qd.length,yf="";zd<Xd&&(_f=Ud.charAt(zd),!(_f!==cd&&_f!==dd&&_f!==ud));)Qd+=_f,zd++;if(_f=Ud.charAt(zd),yf="",hf=Qd,_f===Nd){for(zd++;zd<Xd&&(_f=Ud.charAt(zd),!!Od(_f));)yf+=_f,zd++;if(_f=Ud.charAt(zd),_f===Od.delimiter)Qd+=Nd+yf+_f,zd++;else{if(Zd)return;zd-=yf.length+1,yf=""}}if(!yf){for(;zd<Xd&&(_f=Ud.charAt(zd),!!kd(_f));)yf+=_f,zd++;Qd+=yf}if(yf){for(Mf=yf,yf="";zd<Xd&&(_f=Ud.charAt(zd),!(_f!==cd&&_f!==dd&&_f!==ud));)yf+=_f,zd++;if(_f=Ud.charAt(zd),gf=null,_f===nd?gf=nd:_f===ad?gf=ad:_f===Td&&(gf=Sd),!gf)yf="",zd=Qd.length;else if(yf){for(Qd+=yf+_f,zd=Qd.length,yf="";zd<Xd&&(_f=Ud.charAt(zd),_f!==gf);){if(_f===ud){if(zd++,_f=Ud.charAt(zd),_f===ud||_f===gf)return;yf+=ud}yf+=_f,zd++}if(_f=Ud.charAt(zd),_f!==gf)return;bf=Qd,Qd+=yf+_f,zd++,Yf=yf,yf=""}else return;for(;zd<Xd&&(_f=Ud.charAt(zd),!(_f!==cd&&_f!==dd));)Qd+=_f,zd++;if(_f=Ud.charAt(zd),!_f||_f===ud)return Hd?!0:(hf=Fd(hf).test().end,Mf=Vd.decode.raw(Vd.unescape(Mf),hf,{nonTerminated:!1}),Yf&&(bf=Fd(bf).test().end,Yf=Vd.decode.raw(Vd.unescape(Yf),bf)),Fd(Qd)({type:"definition",identifier:rd(xf),label:xf,title:Yf||null,url:Mf}))}}}}function Od(Fd){return Fd!==Ld&&Fd!==pd&&Fd!==fd}Od.delimiter=Ld;function kd(Fd){return Fd!==pd&&Fd!==fd&&!td(Fd)}}),oo $ 3=C $ 1((Ra,qa)=>{var td=ue $ 2();qa.exports=Nd;var rd=" ",nd= `
` ,ad=" ",sd="-",ud=":",cd=" \\ ",dd="|",pd=1,fd=2,Td="left",Sd="center",Ad="right";function Nd(Ld,Rd,Od){var kd=this,Fd,Ud,Hd,Vd,Zd,zd,Xd,Qd,hf,bf,yf,_f,gf,xf,Mf,Yf,Qf,qf,Bf,Df, $ f,Zf;if(kd.options.gfm){for(Fd=0,Yf=0,zd=Rd.length+1,Xd=[];Fd<zd;){if(Df=Rd.indexOf(nd,Fd), $ f=Rd.indexOf(dd,Fd+1),Df===-1&&(Df=Rd.length), $ f===-1|| $ f>Df){if(Yf<fd)return;break}Xd.push(Rd.slice(Fd,Df)),Yf++,Fd=Df+1}for(Vd=Xd.join(nd),Ud=Xd.splice(1,1)[0]||[],Fd=0,zd=Ud.length,Yf--,Hd=!1,yf=[];Fd<zd;){if(hf=Ud.charAt(Fd),hf===dd){if(bf=null,Hd===!1){if(Zf===!1)return}else yf.push(Hd),Hd=!1;Zf=!1}else if(hf===sd)bf=!0,Hd=Hd||null;else if(hf===ud)Hd===Td?Hd=Sd:bf&&Hd===null?Hd=Ad:Hd=Td;else if(!td(hf))return;Fd++}if(Hd!==!1&&yf.push(Hd),!(yf.length<pd)){if(Od)return!0;for(Mf=-1,qf=[],Bf=Ld(Vd).reset({type:"table",align:yf,children:qf});++Mf<Yf;){for(Qf=Xd[Mf],Zd={type:"tableRow",children:[]},Mf&&Ld(nd),Ld(Qf).reset(Zd,Bf),zd=Qf.length+1,Fd=0,Qd="",_f="",gf=!0;Fd<zd;){if(hf=Qf.charAt(Fd),hf===rd||hf===ad){_f?Qd+=hf:Ld(hf),Fd++;continue}hf===""||hf===dd?gf?Ld(hf):((_f||hf)&&!gf&&(Vd=_f,Qd.length>1&&(hf?(Vd+=Qd.slice(0,-1),Qd=Qd.charAt(Qd.length-1)):(Vd+=Qd,Qd="")),xf=Ld.now(),Ld(Vd)({type:"tableCell",children:kd.tokenizeInline(_f,xf)},Zd)),Ld(Qd+hf),Qd="",_f=""):(Qd&&(_f+=Qd,Qd=""),_f+=hf,hf===cd&&Fd!==zd-2&&(_f+=Qf.charAt(Fd+1),Fd++)),gf=!1,Fd++}Mf||Ld(nd+Ud)}return Bf}}}}),lo $ 2=C $ 1((Ra,qa)=>{var td=Re $ 3(),rd=Mt $ 2(),nd=Kr $ 2();qa.exports=dd;var ad=" ",sd= `
` ,ud=" ",cd=4;function dd(pd,fd,Td){for(var Sd=this,Ad=Sd.options,Nd=Ad.commonmark,Ld=Sd.blockTokenizers,Rd=Sd.interruptParagraph,Od=fd.indexOf(sd),kd=fd.length,Fd,Ud,Hd,Vd,Zd;Od<kd;){if(Od===-1){Od=kd;break}if(fd.charAt(Od+1)===sd)break;if(Nd){for(Vd=0,Fd=Od+1;Fd<kd;){if(Hd=fd.charAt(Fd),Hd===ad){Vd=cd;break}else if(Hd===ud)Vd++;else break;Fd++}if(Vd>=cd&&Hd!==sd){Od=fd.indexOf(sd,Od+1);continue}}if(Ud=fd.slice(Od+1),nd(Rd,Ld,Sd,[pd,Ud,!0]))break;if(Fd=Od,Od=fd.indexOf(sd,Od+1),Od!==-1&&td(fd.slice(Fd,Od))===""){Od=Fd;break}}return Ud=fd.slice(0,Od),Td?!0:(Zd=pd.now(),Ud=rd(Ud),pd(Ud)({type:"paragraph",children:Sd.tokenizeInline(Ud,Zd)}))}}),Do $ 1=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd,nd){return rd.indexOf(" \\ ",nd)}}),Fo $ 1=C $ 1((Ra,qa)=>{var td=Do $ 1();qa.exports=ad,ad.locator=td;var rd= `
` ,nd=" \\ ";function ad(sd,ud,cd){var dd=this,pd,fd;if(ud.charAt(0)===nd&&(pd=ud.charAt(1),dd.escape.indexOf(pd)!==-1))return cd?!0:(pd===rd?fd={type:"break"}:fd={type:"text",value:pd},sd(nd+pd)(fd))}}),tn $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd,nd){return rd.indexOf("<",nd)}}),yo $ 2=C $ 1((Ra,qa)=>{var td=ue $ 2(),rd=pr $ 1(),nd=tn $ 2();qa.exports=fd,fd.locator=nd,fd.notInLink=!0;var ad="<",sd=">",ud="@",cd="/",dd="mailto:",pd=dd.length;function fd(Td,Sd,Ad){var Nd=this,Ld="",Rd=Sd.length,Od=0,kd="",Fd=!1,Ud="",Hd,Vd,Zd,zd,Xd;if(Sd.charAt(0)===ad){for(Od++,Ld=ad;Od<Rd&&(Hd=Sd.charAt(Od),!(td(Hd)||Hd===sd||Hd===ud||Hd===":"&&Sd.charAt(Od+1)===cd));)kd+=Hd,Od++;if(kd){if(Ud+=kd,kd="",Hd=Sd.charAt(Od),Ud+=Hd,Od++,Hd===ud)Fd=!0;else{if(Hd!==":"||Sd.charAt(Od+1)!==cd)return;Ud+=cd,Od++}for(;Od<Rd&&(Hd=Sd.charAt(Od),!(td(Hd)||Hd===sd));)kd+=Hd,Od++;if(Hd=Sd.charAt(Od),!(!kd||Hd!==sd))return Ad?!0:(Ud+=kd,Zd=Ud,Ld+=Ud+Hd,Vd=Td.now(),Vd.column++,Vd.offset++,Fd&&(Ud.slice(0,pd).toLowerCase()===dd?(Zd=Zd.slice(pd),Vd.column+=pd,Vd.offset+=pd):Ud=dd+Ud),zd=Nd.inlineTokenizers,Nd.inlineTokenizers={text:zd.text},Xd=Nd.enterLink(),Zd=Nd.tokenizeInline(Zd,Vd),Nd.inlineTokenizers=zd,Xd(),Td(Ld)({type:"link",title:null,url:rd(Ud,{nonTerminated:!1}),children:Zd}))}}}}),xo $ 2=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd,nd){var ad=String(rd),sd=0,ud;if(typeof nd!="string")throw new Error("Expected character");for(ud=ad.indexOf(nd);ud!==-1;)sd++,ud=ad.indexOf(nd,ud+nd.length);return sd}}),Bo $ 1=C $ 1((Ra,qa)=>{qa.exports=rd;var td=["www.","http://","https://"];function rd(nd,ad){var sd=-1,ud,cd,dd;if(!this.options.gfm)return sd;for(cd=td.length,ud=-1;++ud<cd;)dd=nd.indexOf(td[ud],ad),dd!==-1&&(sd===-1||dd<sd)&&(sd=dd);return sd}}),Oo=C $ 1((Ra,qa)=>{var td=xo $ 2(),rd=pr $ 1(),nd=Ne $ 1(),ad=Ve $ 2(),sd=ue $ 2(),ud=Bo $ 1();qa.exports=Vd,Vd.locator=ud,Vd.notInLink=!0;var cd=33,dd=38,pd=41,fd=42,Td=44,Sd=45,Ad=46,Nd=58,Ld=59,Rd=63,Od=60,kd=95,Fd=126,Ud="(",Hd=")";function Vd(Zd,zd,Xd){var Qd=this,hf=Qd.options.gfm,bf=Qd.inlineTokenizers,yf=zd.length,_f=-1,gf=!1,xf,Mf,Yf,Qf,qf,Bf,Df, $ f,Zf,Xf,Tf,vf,Pf,Gf;if(hf){if(zd.slice(0,4)==="www.")gf=!0,Qf=4;else if(zd.slice(0,7).toLowerCase()==="http://")Qf=7;else if(zd.slice(0,8).toLowerCase()==="https://")Qf=8;else return;for(_f=Qf-1,Yf=Qf,xf=[];Qf<yf;){if(Df=zd.charCodeAt(Qf),Df===Ad){if(_f===Qf-1)break;xf.push(Qf),_f=Qf,Qf++;continue}if(nd(Df)||ad(Df)||Df===Sd||Df===kd){Qf++;continue}break}if(Df===Ad&&(xf.pop(),Qf--),xf[0]!==void 0&&(Mf=xf.length<2?Yf:xf[xf.length-2]+1,zd.slice(Mf,Qf).indexOf("_")===-1)){if(Xd)return!0;for( $ f=Qf,qf=Qf;Qf<yf&&(Df=zd.charCodeAt(Qf),!(sd(Df)||Df===Od));)Qf++,Df===cd||Df===fd||Df===Td||Df===Ad||Df===Nd||Df===Rd||Df===kd||Df===Fd||( $ f=Qf);if(Qf= $ f,zd.charCodeAt(Qf-1)===pd)for(Bf=zd.slice(qf,Qf),Zf=td(Bf,Ud),Xf=td(Bf,Hd);Xf>Zf;)Qf=qf+Bf.lastIndexOf(Hd),Bf=zd.slice(qf,Qf),Xf--;if(zd.charCodeAt(Qf-1)===Ld&&(Qf--,ad(zd.charCodeAt(Qf-1)))){for( $ f=Qf-2;ad(zd.charCodeAt( $ f));) $ f--;zd.charCodeAt( $ f)===dd&&(Qf= $ f)}return Tf=zd.slice(0,Qf),Pf=rd(Tf,{nonTerminated:!1}),gf&&(Pf="http://"+Pf),Gf=Qd.enterLink(),Qd.inlineTokenizers={text:bf.text},vf=Qd.tokenizeInline(Tf,Zd.now()),Qd.inlineTokenizers=bf,Gf(),Zd(Tf)({type:"link",title:null,url:Pf,children:vf})}}}}),No=C $ 1((Ra,qa)=>{var td=Ne $ 1(),rd=Ve $ 2(),nd=43,ad=45,sd=46,ud=95;qa.exports=cd;function cd(pd,fd){var Td=this,Sd,Ad;if(!this.options.gfm||(Sd=pd.indexOf("@",fd),Sd===-1))return-1;if(Ad=Sd,Ad===fd||!dd(pd.charCodeAt(Ad-1)))return cd.call(Td,pd,Sd+1);for(;Ad>fd&&dd(pd.charCodeAt(Ad-1));)Ad--;return Ad}function dd(pd){return td(pd)||rd(pd)||pd===nd||pd===ad||pd===sd||pd===ud}}),Mo $ 2=C $ 1((Ra,qa)=>{var td=pr $ 1(),rd=Ne $ 1(),nd=Ve $ 2(),ad=No();qa.exports=fd,fd.locator=ad,fd.notInLink=!0;var sd=43,ud=45,cd=46,dd=64,pd=95;function fd(Td,Sd,Ad){var Nd=this,Ld=Nd.options.gfm,Rd=Nd.inlineTokenizers,Od=0,kd=Sd.length,Fd=-1,Ud,Hd,Vd,Zd;if(Ld){for(Ud=Sd.charCodeAt(Od);rd(Ud)||nd(Ud)||Ud===sd||Ud===ud||Ud===cd||Ud===pd;)Ud=Sd.charCodeAt(++Od);if(Od!==0&&Ud===dd){for(Od++;Od<kd;){if(Ud=Sd.charCodeAt(Od),rd(Ud)||nd(Ud)||Ud===ud||Ud===cd||Ud===pd){Od++,Fd===-1&&Ud===cd&
` ,ad="!",sd='"',ud="'",cd="(",dd=")",pd="<",fd=">",Td="[",Sd=" \\ ",Ad="]",Nd=" ` ";function Ld(Rd,Od,kd){var Fd=this,Ud=" ",Hd=0,Vd=Od.charAt(0),Zd=Fd.options.pedantic,zd=Fd.options.commonmark,Xd=Fd.options.gfm,Qd,hf,bf,yf,_f,gf,xf,Mf,Yf,Qf,qf,Bf,Df,$f,Zf,Xf,Tf,vf;if(Vd===ad&&(Mf=!0,Ud=Vd,Vd=Od.charAt(++Hd)),Vd===Td&&!(!Mf&&Fd.inLink)){for(Ud+=Vd,$f=" ",Hd++,qf=Od.length,Xf=Rd.now(),Df=0,Xf.column+=Hd,Xf.offset+=Hd;Hd<qf;){if(Vd=Od.charAt(Hd),gf=Vd,Vd===Nd){for(hf=1;Od.charAt(Hd+1)===Nd;)gf+=Vd,Hd++,hf++;bf?hf>=bf&&(bf=0):bf=hf}else if(Vd===Sd)Hd++,gf+=Od.charAt(Hd);else if((!bf||Xd)&&Vd===Td)Df++;else if((!bf||Xd)&&Vd===Ad)if(Df)Df--;else{if(Od.charAt(Hd+1)!==cd)return;gf+=cd,Qd=!0,Hd++;break}$f+=gf,gf=" ",Hd++}if(Qd){for(Yf=$f,Ud+=$f+gf,Hd++;Hd<qf&&(Vd=Od.charAt(Hd),!!td(Vd));)Ud+=Vd,Hd++;if(Vd=Od.charAt(Hd),$f=" ",yf=Ud,Vd===pd){for(Hd++,yf+=pd;Hd<qf&&(Vd=Od.charAt(Hd),Vd!==fd);){if(zd&&Vd===nd)return;$f+=Vd,Hd++}if(Od.charAt(Hd)!==fd)return;Ud+=pd+$f+fd,Zf=$f,Hd++}else{for(Vd=null,gf=" ";Hd<qf&&(Vd=Od.charAt(Hd),!(gf&&(Vd===sd||Vd===ud||zd&&Vd===cd)));){if(td(Vd)){if(!Zd)break;gf+=Vd}else{if(Vd===cd)Df++;else if(Vd===dd){if(Df===0)break;Df--}$f+=gf,gf=" ",Vd===Sd&&($f+=Sd,Vd=Od.charAt(++Hd)),$f+=Vd}Hd++}Ud+=$f,Zf=$f,Hd=Ud.length}for($f=" ";Hd<qf&&(Vd=Od.charAt(Hd),!!td(Vd));)$f+=Vd,Hd++;if(Vd=Od.charAt(Hd),Ud+=$f,$f&&(Vd===sd||Vd===ud||zd&&Vd===cd))if(Hd++,Ud+=Vd,$f=" ",Qf=Vd===cd?dd:Vd,_f=Ud,zd){for(;Hd<qf&&(Vd=Od.charAt(Hd),Vd!==Qf);)Vd===Sd&&($f+=Sd,Vd=Od.charAt(++Hd)),Hd++,$f+=Vd;if(Vd=Od.charAt(Hd),Vd!==Qf)return;for(Bf=$f,Ud+=$f+Vd,Hd++;Hd<qf&&(Vd=Od.charAt(Hd),!!td(Vd));)Ud+=Vd,Hd++}else for(gf=" ";Hd<qf;){if(Vd=Od.charAt(Hd),Vd===Qf)xf&&($f+=Qf+gf,gf=" "),xf=!0;else if(!xf)$f+=Vd;else if(Vd===dd){Ud+=$f+Qf+gf,Bf=$f;break}else td(Vd)?gf+=Vd:($f+=Qf+gf+Vd,gf=" ",xf=!1);Hd++}if(Od.charAt(Hd)===dd)return kd?!0:(Ud+=dd,Zf=Fd.decode.raw(Fd.unescape(Zf),Rd(yf).test().end,{nonTerminated:!1}),Bf&&(_f=Rd(_f).test().end,Bf=Fd.decode.raw(Fd.unescape(Bf),_f)),vf={type:Mf?" image ":" link ",title:Bf||null,url:Zf},Mf?vf.alt=Fd.decode.raw(Fd.unescape(Yf),Xf)||null:(Tf=Fd.enterLink(),vf.children=Fd.tokenizeInline(Yf,Xf),Tf()),Rd(Ud)(vf))}}}}),rs=C$1((Ra,qa)=>{var td=ue$2(),rd=dn$2(),nd=Qt$1();qa.exports=Ad,Ad.locator=rd;var ad=" link ",sd=" image ",ud=" shortcut ",cd=" collapsed ",dd=" full ",pd=" ! ",fd=" [ ",Td=" \ \ ",Sd=" ] ";function Ad(Nd,Ld,Rd){var Od=this,kd=Od.options.commonmark,Fd=Ld.charAt(0),Ud=0,Hd=Ld.length,Vd=" ",Zd=" ",zd=ad,Xd=ud,Qd,hf,bf,yf,_f,gf,xf,Mf;if(Fd===pd&&(zd=sd,Zd=Fd,Fd=Ld.charAt(++Ud)),Fd===fd){for(Ud++,Zd+=Fd,gf=" ",Mf=0;Ud<Hd;){if(Fd=Ld.charAt(Ud),Fd===fd)xf=!0,Mf++;else if(Fd===Sd){if(!Mf)break;Mf--}Fd===Td&&(gf+=Td,Fd=Ld.charAt(++Ud)),gf+=Fd,Ud++}if(Vd=gf,Qd=gf,Fd=Ld.charAt(Ud),Fd===Sd){if(Ud++,Vd+=Fd,gf=" ",!kd)for(;Ud<Hd&&(Fd=Ld.charAt(Ud),!!td(Fd));)gf+=Fd,Ud++;if(Fd=Ld.charAt(Ud),Fd===fd){for(hf=" ",gf+=Fd,Ud++;Ud<Hd&&(Fd=Ld.charAt(Ud),!(Fd===fd||Fd===Sd));)Fd===Td&&(hf+=Td,Fd=Ld.charAt(++Ud)),hf+=Fd,Ud++;Fd=Ld.charAt(Ud),Fd===Sd?(Xd=hf?dd:cd,gf+=hf+Fd,Ud++):hf=" ",Vd+=gf,gf=" "}else{if(!Qd)return;hf=Qd}if(!(Xd!==dd&&xf))return Vd=Zd+Vd,zd===ad&&Od.inLink?null:Rd?!0:(bf=Nd.now(),bf.column+=Zd.length,bf.offset+=Zd.length,hf=Xd===dd?hf:Qd,yf={type:zd+" Reference ",identifier:nd(hf),label:hf,referenceType:Xd},zd===ad?(_f=Od.enterLink(),yf.children=Od.tokenizeInline(Qd,bf),_f()):yf.alt=Od.decode.raw(Od.unescape(Qd),bf)||null,Nd(Vd)(yf))}}}}),ns$1=C$1((Ra,qa)=>{qa.exports=td;function td(rd,nd){var ad=rd.indexOf(" * * ",nd),sd=rd.indexOf(" _ _ ",nd);return sd===-1?ad:ad===-1||sd<ad?sd:ad}}),os$1=C$1((Ra,qa)=>{var td=Re$3(),rd=ue$2(),nd=ns$1();qa.exports=cd,cd.locator=nd;var ad=" \ \ ",sd=" * ",ud=" _ ";function cd(dd,pd,fd){var Td=this,Sd=0,Ad=pd.charAt(Sd),Nd,Ld,Rd,Od,kd,Fd,Ud;if(!(Ad!==sd&&Ad!==ud||pd.charAt(++Sd)!==Ad)&&(Ld=Td.options.pedantic,Rd=Ad,kd=Rd+Rd,Fd=pd.length,Sd++,Od=" ",Ad=" ",!(Ld&&rd(pd.charAt(Sd)))))for(;Sd<Fd;){if(Ud=Ad,Ad=pd.charAt(Sd),Ad===Rd&&pd.charAt(Sd+1)===Rd&&(!Ld||!rd(Ud))&&(Ad=pd.charAt(Sd+2),Ad!==Rd))return td(Od)?fd?!0:(Nd=dd.now(),Nd.column+=2,Nd.offset+=2,dd(kd+Od+kd)({type:" strong " , children : Td . tokenizeInline ( Od , Nd ) } ) ) : v
2024-09-25 14:23:53 +08:00
` ,nd);ad>nd&&rd.charAt(ad-1)===" ";)ad--;return ad}}),Os $ 1=C $ 1((Ra,qa)=>{var td=Ts();qa.exports=sd,sd.locator=td;var rd=" ",nd= `
2024-11-27 11:30:55 +08:00
` ,ad=2;function sd(ud,cd,dd){for(var pd=cd.length,fd=-1,Td="",Sd;++fd<pd;){if(Sd=cd.charAt(fd),Sd===nd)return fd<ad?void 0:dd?!0:(Td+=Sd,ud(Td)({type:"break"}));if(Sd!==rd)return;Td+=Sd}}}),Ls $ 1=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd,nd,ad){var sd=this,ud,cd,dd,pd,fd,Td,Sd,Ad,Nd,Ld;if(ad)return!0;for(ud=sd.inlineMethods,pd=ud.length,cd=sd.inlineTokenizers,dd=-1,Nd=nd.length;++dd<pd;)Ad=ud[dd],!(Ad==="text"||!cd[Ad])&&(Sd=cd[Ad].locator,Sd||rd.file.fail("Missing locator: ` "+Ad+" ` "),Td=Sd.call(sd,nd,1),Td!==-1&&Td<Nd&&(Nd=Td));fd=nd.slice(0,Nd),Ld=rd.now(),sd.decode(fd,Ld,Rd);function Rd(Od,kd,Fd){rd(Fd||Od)({type:"text",value:Od})}}}),Us=C $ 1((Ra,qa)=>{var td=Ie $ 1(),rd=ru $ 2(),nd=nu $ 3(),ad=uu $ 3(),sd=Ou $ 1(),ud=Iu $ 1();qa.exports=cd;function cd(fd,Td){this.file=Td,this.offset={},this.options=td(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=nd(Td).toOffset,this.unescape=ad(this,"escape"),this.decode=sd(this)}var dd=cd.prototype;dd.setOptions=Vu $ 2(),dd.parse=aa $ 2(),dd.options=Rt $ 3(),dd.exitStart=rd("atStart",!0),dd.enterList=rd("inList",!1),dd.enterLink=rd("inLink",!1),dd.enterBlock=rd("inBlock",!1),dd.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]],dd.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]],dd.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]],dd.blockTokenizers={blankLine:sa(),indentedCode:pa(),fencedCode:ma(),blockquote:ba $ 1(),atxHeading:xa $ 1(),thematicBreak:Ba(),list:Ua $ 2(),setextHeading:Ga $ 1(),html:Ka(),definition:io $ 1(),table:oo $ 3(),paragraph:lo $ 2()},dd.inlineTokenizers={escape:Fo $ 1(),autoLink:yo $ 2(),url:Oo(),email:Mo $ 2(),html:Vo $ 1(),link:Qo $ 1(),reference:rs(),strong:os $ 1(),emphasis:ms $ 1(),deletion:ys $ 1(),code:Bs $ 1(),break:Os $ 1(),text:Ls $ 1()},dd.blockMethods=pd(dd.blockTokenizers),dd.inlineMethods=pd(dd.inlineTokenizers),dd.tokenizeBlock=ud("block"),dd.tokenizeInline=ud("inline"),dd.tokenizeFactory=ud;function pd(fd){var Td=[],Sd;for(Sd in fd)Td.push(Sd);return Td}}),Gs=C $ 1((Ra,qa)=>{var td=Zi $ 1(),rd=Ie $ 1(),nd=Us();qa.exports=ad,ad.Parser=nd;function ad(sd){var ud=this.data("settings"),cd=td(nd);cd.prototype.options=rd(cd.prototype.options,ud,sd),this.Parser=cd}}),js $ 1=C $ 1((Ra,qa)=>{qa.exports=td;function td(rd){if(rd)throw rd}}),yn $ 2=C $ 1((Ra,qa)=>{qa.exports=function(td){return td!=null&&td.constructor!=null&&typeof td.constructor.isBuffer=="function"&&td.constructor.isBuffer(td)}}),rc $ 2=C $ 1((Ra,qa)=>{var td=Object.prototype.hasOwnProperty,rd=Object.prototype.toString,nd=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,sd=function(pd){return typeof Array.isArray=="function"?Array.isArray(pd):rd.call(pd)==="[object Array]"},ud=function(pd){if(!pd||rd.call(pd)!=="[object Object]")return!1;var fd=td.call(pd,"constructor"),Td=pd.constructor&&pd.constructor.prototype&&td.call(pd.constructor.prototype,"isPrototypeOf");if(pd.constructor&&!fd&&!Td)return!1;var Sd;for(Sd in pd);return typeof Sd>"u"||td.call(pd,Sd)},cd=function(pd,fd){nd&&fd.name==="__proto__"?nd(pd,fd.name,{enumerable:!0,configurable:!0,value:fd.newValue,writable:!0}):pd[fd.name]=fd.newValue},dd=function(pd,fd){if(fd==="__proto__")if(td.call(pd,fd)){if(ad)return ad(pd,fd).value}else return;return pd[fd]};qa.exports=function pd(){var fd,Td,Sd,Ad,Nd,Ld,Rd=arguments[0],Od=1,kd=arguments.length,Fd=!1;for(typeof Rd=="boolean"&&(Fd=Rd,Rd=arguments[1]||{},Od=2),(Rd==null||typeof Rd!="object"&&typeof Rd!="function")&&(Rd={});Od<kd;++Od)if(fd=arguments[Od],fd!=null)for(Td in fd)Sd=dd(Rd,Td),Ad=dd(fd,Td),Rd!==Ad&&(Fd&&Ad&&(ud(Ad)||(Nd=sd(Ad)))?(Nd?(Nd=!1,Ld=Sd&&sd(Sd)?Sd:[]):Ld=Sd&&ud(Sd)?Sd:{},cd(Rd,{name:Td,newValue:pd(Fd,Ld,Ad)})):typeof Ad<"u"&&cd(Rd,{name:Td,newValue:Ad}
2024-09-25 14:23:53 +08:00
Expected it to be 'string' or 'object' . ` ;if(Y $ 2(Ra))throw new Error("doc is valid.");let td=Object.prototype.toString.call(Ra);if(td!=="[object Object]")return ` Unexpected doc '${td}' . ` ;let rd=ll $ 1([...wr $ 1].map(nd=> ` '${nd}' ` ));return ` Unexpected doc . type '${Ra.type}' .
Expected it to be $ { rd } . ` }var Dt $ 3=class extends Error{constructor(td){super(fl $ 1(td));Qm(this,"name","InvalidDocError");this.doc=td}},qe $ 3=Dt $ 3,Nn $ 2={};function Dl $ 2(Ra,qa,td,rd){let nd=[Ra];for(;nd.length>0;){let ad=nd.pop();if(ad===Nn $ 2){td(nd.pop());continue}td&&nd.push(ad,Nn $ 2);let sd=Y $ 2(ad);if(!sd)throw new qe $ 3(ad);if((qa==null?void 0:qa(ad))!==!1)switch(sd){case H $ 2:case J $ 3:{let ud=sd===H $ 2?ad:ad.parts;for(let cd=ud.length,dd=cd-1;dd>=0;--dd)nd.push(ud[dd]);break}case X $ 3:nd.push(ad.flatContents,ad.breakContents);break;case K $ 2:if(rd&&ad.expandedStates)for(let ud=ad.expandedStates.length,cd=ud-1;cd>=0;--cd)nd.push(ad.expandedStates[cd]);else nd.push(ad.contents);break;case re $ 2:case ee $ 2:case se $ 1:case fe $ 2:case ce $ 2:nd.push(ad.contents);break;case $ $ 1:case ge $ 2:case oe $ 2:case le $ 2:case W $ 3:case te $ 2:break;default:throw new qe $ 3(ad)}}}var Rn $ 1=Dl $ 2,Un $ 2=()=>{},kr $ 1=Un $ 2;function Ze $ 2(Ra){return{type:ee $ 2,contents:Ra}}function ve $ 2(Ra,qa){return{type:re $ 2,contents:qa,n:Ra}}function ze $ 2(Ra,qa={}){return kr $ 1(qa.expandedStates),{type:K $ 2,id:qa.id,contents:Ra,break:!!qa.shouldBreak,expandedStates:qa.expandedStates}}function _e $ 2(Ra){return ve $ 2({type:"root"},Ra)}function Ee $ 2(Ra){return{type:J $ 3,parts:Ra}}function zn $ 2(Ra,qa="",td={}){return{type:X $ 3,breakContents:Ra,flatContents:qa,groupId:td.groupId}}var er $ 1={type:te $ 2},rr $ 1={type:W $ 3,hard:!0},pl $ 1={type:W $ 3,hard:!0,literal:!0},Br $ 2={type:W $ 3},qr $ 1={type:W $ 3,soft:!0},L $ 3=[rr $ 1,er $ 1],tr $ 1=[pl $ 1,er $ 1];function Tr $ 1(Ra,qa){let td=[];for(let rd=0;rd<qa.length;rd++)rd!==0&&td.push(Ra),td.push(qa[rd]);return td}function dl $ 1(Ra,qa){if(typeof Ra=="string")return qa(Ra);let td=new Map;return rd(Ra);function rd(ad){if(td.has(ad))return td.get(ad);let sd=nd(ad);return td.set(ad,sd),sd}function nd(ad){switch(Y $ 2(ad)){case H $ 2:return qa(ad.map(rd));case J $ 3:return qa({...ad,parts:ad.parts.map(rd)});case X $ 3:return qa({...ad,breakContents:rd(ad.breakContents),flatContents:rd(ad.flatContents)});case K $ 2:{let{expandedStates:sd,contents:ud}=ad;return sd?(sd=sd.map(rd),ud=sd[0]):ud=rd(ud),qa({...ad,contents:ud,expandedStates:sd})}case re $ 2:case ee $ 2:case se $ 1:case fe $ 2:case ce $ 2:return qa({...ad,contents:rd(ad.contents)});case $ $ 1:case ge $ 2:case oe $ 2:case le $ 2:case W $ 3:case te $ 2:return qa(ad);default:throw new qe $ 3(ad)}}}function Mn $ 1(Ra){if(Ra.length>0){let qa=M $ 3(!1,Ra,-1);!qa.expandedStates&&!qa.break&&(qa.break="propagated")}return null}function Yn $ 2(Ra){let qa=new Set,td=[];function rd(ad){if(ad.type===te $ 2&&Mn $ 1(td),ad.type===K $ 2){if(td.push(ad),qa.has(ad))return!1;qa.add(ad)}}function nd(ad){ad.type===K $ 2&&td.pop().break&&Mn $ 1(td)}Rn $ 1(Ra,rd,nd,!0)}function Ce $ 1(Ra,qa=tr $ 1){return dl $ 1(Ra,td=>typeof td=="string"?Tr $ 1(qa,td.split( `
` )):td)}function hl $ 1(Ra,qa){let td=Ra.match(new RegExp( ` ( $ { Be$2 ( qa ) } ) + ` ,"gu"));return td===null?0:td.reduce((rd,nd)=>Math.max(rd,nd.length/qa.length),0)}var _r $ 1=hl $ 1;function ml $ 1(Ra,qa){let td=Ra.match(new RegExp( ` ( $ { Be$2 ( qa ) } ) + ` ,"gu"));if(td===null)return 0;let rd=new Map,nd=0;for(let ad of td){let sd=ad.length/qa.length;rd.set(sd,!0),sd>nd&&(nd=sd)}for(let ad=1;ad<nd;ad++)if(!rd.get(ad))return ad;return nd+1}var Gn $ 3=ml $ 1,Sr $ 1="'",Vn $ 2='"';function Fl $ 1(Ra,qa){let td=qa===!0||qa===Sr $ 1?Sr $ 1:Vn $ 2,rd=td===Sr $ 1?Vn $ 2:Sr $ 1,nd=0,ad=0;for(let sd of Ra)sd===td?nd++:sd===rd&&ad++;return nd>ad?rd:td}var jn $ 2=Fl $ 1,pt $ 2=class extends Error{constructor(td,rd,nd="type"){super( ` Unexpected $ { rd } node $ { nd } : $ { JSON . stringify ( td [ nd ] ) } . ` );Qm(this,"name","UnexpectedNodeError");this.node=td}}, $ n $ 3=pt $ 2,Xn $ 3=Ue $ 2(xr $ 1());function gl $ 1(Ra){return(Ra==null?void 0:Ra.type)==="front-matter"}var Hn $ 1=gl $ 1,nr $ 1=3;function vl $ 1(Ra){let qa=Ra.slice(0,nr $ 1);if(qa!=="---"&&qa!=="+++")return;let td=Ra.indexOf( `
` ,nr $ 1);if(td===-1)return;let rd=Ra.slice(nr $ 1,td).trim(),nd=Ra.indexOf( `
$ { qa } ` ,td),ad=rd;if(ad||(ad=qa==="+++"?"toml":"yaml"),nd===-1&&qa==="---"&&ad==="yaml"&&(nd=Ra.indexOf( `
... ` ,td)),nd===-1)return;let sd=nd+1+nr $ 1,ud=Ra.charAt(sd+1);if(!/ \s ?/u.test(ud))return;let cd=Ra.slice(0,sd);return{type:"front-matter",language:ad,explicitLanguage:rd,value:Ra.slice(td+1,nd),startDelimiter:qa,endDelimiter:cd.slice(-nr $ 1),raw:cd}}function El $ 2(Ra){let qa=vl $ 1(Ra);if(!qa)return{content:Ra};let{raw:td}=qa;return{frontMatter:qa,content:N $ 3(!1,td,/[^ \n ]/gu," ")+Ra.slice(td.length)}}var ir $ 2=El $ 2,Wn $ 1=["format","prettier"];function dt $ 2(Ra){let qa= ` @ ( $ { Wn$1 . join ( "|" ) } ) ` ,td=new RegExp([ ` <!-- \ \ s * $ { qa } \ \ s * -- > ` , ` \ \ { \ \ s * \ \ / \ \ * \ \ s * $ { qa } \ \ s * \ \ * \ \ / \ \ s * \ \ } ` , ` <!-- . * \ r ?
2024-09-18 09:46:23 +08:00
[ \ \ s \ \ S ] * ( ^ |
) [ ^ \ \ S
] * $ { qa } [ ^ \ \ S
] * ( $ |
) [ \ \ s \ \ S ] *
2024-09-25 14:23:53 +08:00
. * -- > ` ].join("|"),"mu"),rd=Ra.match(td);return(rd==null?void 0:rd.index)===0}var Kn $ 2=Ra=>dt $ 2(ir $ 2(Ra).content.trimStart()),Jn $ 3=Ra=>{let qa=ir $ 2(Ra),td= ` <!-- @ $ { Wn$1 [ 0 ] } -- > ` ;return qa.frontMatter? ` $ { qa . frontMatter . raw }
2024-09-18 09:46:23 +08:00
2024-09-25 14:23:53 +08:00
$ { td }
2024-09-18 09:46:23 +08:00
2024-09-25 14:23:53 +08:00
$ { qa . content } ` : ` $ { td }
2024-09-18 09:46:23 +08:00
2024-09-25 14:23:53 +08:00
$ { qa . content } ` },Cl $ 1=new Set(["position","raw"]);function Qn $ 3(Ra,qa,td){if((Ra.type==="front-matter"||Ra.type==="code"||Ra.type==="yaml"||Ra.type==="import"||Ra.type==="export"||Ra.type==="jsx")&&delete qa.value,Ra.type==="list"&&delete qa.isAligned,(Ra.type==="list"||Ra.type==="listItem")&&delete qa.spread,Ra.type==="text")return null;if(Ra.type==="inlineCode"&&(qa.value=N $ 3(!1,Ra.value, `
` ," ")),Ra.type==="wikiLink"&&(qa.value=N $ 3(!1,Ra.value.trim(),/[ \t \n ]+/gu," ")),(Ra.type==="definition"||Ra.type==="linkReference"||Ra.type==="imageReference")&&(qa.label=(0,Xn $ 3.default)(Ra.label)),(Ra.type==="link"||Ra.type==="image")&&Ra.url&&Ra.url.includes("("))for(let rd of"<>")qa.url=N $ 3(!1,Ra.url,rd,encodeURIComponent(rd));if((Ra.type==="definition"||Ra.type==="link"||Ra.type==="image")&&Ra.title&&(qa.title=N $ 3(!1,Ra.title,/ \\ (?=["')])/gu,"")),(td==null?void 0:td.type)==="root"&&td.children.length>0&&(td.children[0]===Ra||Hn $ 1(td.children[0])&&td.children[1]===Ra)&&Ra.type==="html"&&dt $ 2(Ra.value))return null}Qn $ 3.ignoredProperties=Cl $ 1;var Zn $ 2=Qn $ 3,ei $ 2=/(?:[ \u 02ea- \u 02eb \u 1100- \u 11ff \u 2e80- \u 2e99 \u 2e9b- \u 2ef3 \u 2f00- \u 2fd5 \u 2ff0- \u 303f \u 3041- \u 3096 \u 3099- \u 309f \u 30a1- \u 30fa \u 30fc- \u 30ff \u 3105- \u 312f \u 3131- \u 318e \u 3190- \u 4dbf \u 4e00- \u 9fff \u a700- \u a707 \u a960- \u a97c \u ac00- \u d7a3 \u d7b0- \u d7c6 \u d7cb- \u d7fb \u f900- \u fa6d \u fa70- \u fad9 \u fe10- \u fe1f \u fe30- \u fe6f \u ff00- \u ffef]|[ \u d840- \u d868 \u d86a- \u d86c \u d86f- \u d872 \u d874- \u d879 \u d880- \u d883 \u d885- \u d887][ \u dc00- \u dfff]| \u d81b[ \u dfe3]| \u d82b[ \u dff0- \u dff3 \u dff5- \u dffb \u dffd- \u dffe]| \u d82c[ \u dc00- \u dd22 \u dd32 \u dd50- \u dd52 \u dd55 \u dd64- \u dd67]| \u d83c[ \u de00 \u de50- \u de51]| \u d869[ \u dc00- \u dedf \u df00- \u dfff]| \u d86d[ \u dc00- \u df39 \u df40- \u dfff]| \u d86e[ \u dc00- \u dc1d \u dc20- \u dfff]| \u d873[ \u dc00- \u dea1 \u deb0- \u dfff]| \u d87a[ \u dc00- \u dfe0]| \u d87e[ \u dc00- \u de1d]| \u d884[ \u dc00- \u df4a \u df50- \u dfff]| \u d888[ \u dc00- \u dfaf])(?:[ \u fe00- \u fe0f]| \u db40[ \u dd00- \u ddef])?/u,Se $ 2=new RegExp("(?:[ \\ u0021- \\ u002f \\ u003a- \\ u0040 \\ u005b- \\ u0060 \\ u007b- \\ u007e]| \\ p{General_Category=Connector_Punctuation}| \\ p{General_Category=Dash_Punctuation}| \\ p{General_Category=Close_Punctuation}| \\ p{General_Category=Final_Punctuation}| \\ p{General_Category=Initial_Punctuation}| \\ p{General_Category=Other_Punctuation}| \\ p{General_Category=Open_Punctuation})","u");async function bl $ 1(Ra,qa){if(Ra.language==="yaml"){let td=Ra.value.trim(),rd=td?await qa(td,{parser:"yaml"}):"";return _e $ 2([Ra.startDelimiter,Ra.explicitLanguage,L $ 3,rd,rd?L $ 3:"",Ra.endDelimiter])}}var ri $ 3=bl $ 1,yl $ 1=Ra=>String(Ra).split(/[/ \\ ]/u).pop();function ti $ 3(Ra,qa){if(!qa)return;let td=yl $ 1(qa).toLowerCase();return Ra.find(({filenames:rd})=>rd==null?void 0:rd.some(nd=>nd.toLowerCase()===td))??Ra.find(({extensions:rd})=>rd==null?void 0:rd.some(nd=>td.endsWith(nd)))}function Al $ 2(Ra,qa){if(qa)return Ra.find(({name:td})=>td.toLowerCase()===qa)??Ra.find(({aliases:td})=>td==null?void 0:td.includes(qa))??Ra.find(({extensions:td})=>td==null?void 0:td.includes( ` . $ { qa } ` ))}function xl $ 2(Ra,qa){let td=Ra.plugins.flatMap(nd=>nd.languages??[]),rd=Al $ 2(td,qa.language)??ti $ 3(td,qa.physicalFile)??ti $ 3(td,qa.file)??(qa.physicalFile,void 0);return rd==null?void 0:rd.parsers[0]}var ni $ 3=xl $ 2,wl $ 1=new Proxy(()=>{},{get:()=>wl $ 1});function Oe $ 2(Ra){return Ra.position.start.offset}function Pe $ 2(Ra){return Ra.position.end.offset}var ht $ 2=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Or $ 1=new Set([...ht $ 2,"tableCell","paragraph","heading"]),Le $ 2="non-cjk",De $ 1="cj-letter",be $ 3="k-letter",ur $ 1="cjk-punctuation",kl $ 2=new RegExp(" \\ p{Script_Extensions=Hangul}","u");function Pr $ 1(Ra){let qa=[],td=Ra.split(/([ \t \n ]+)/u);for(let[nd,ad]of td.entries()){if(nd%2===1){qa.push({type:"whitespace",value:/ \n /u.test(ad)? `
` :" "});continue}if((nd===0||nd===td.length-1)&&ad==="")continue;let sd=ad.split(new RegExp( ` ( $ { ei$2 . source } ) ` ,"u"));for(let[ud,cd]of sd.entries())if(!((ud===0||ud===sd.length-1)&&cd==="")){if(ud%2===0){cd!==""&&rd({type:"word",value:cd,kind:Le $ 2,hasLeadingPunctuation:Se $ 2.test(cd[0]),hasTrailingPunctuation:Se $ 2.test(M $ 3(!1,cd,-1))});continue}rd(Se $ 2.test(cd)?{type:"word",value:cd,kind:ur $ 1,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:cd,kind:kl $ 2.test(cd)?be $ 3:De $ 1,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return qa;function rd(nd){let ad=M $ 3(!1,qa,-1);(ad==null?void 0:ad.type)==="word"&&!sd(Le $ 2,ur $ 1)&&![ad.value,nd.value].some(ud=>/ \u 3000/u.test(ud))&&qa.push({type:"whitespace",value:""}),qa.push(nd);function sd(ud,cd){return ad.kind===ud&&nd.kind===cd||ad.kind===cd&&nd.kind===ud}}}function Me $ 3(Ra,qa){let td=qa.originalText.slice(Ra.position.start.offset,Ra.position.end.offset),{numberText:rd,leadingSpaces:nd}=td.match(/^ \s *(?<numberText> \d +)( \. | \) )(?<leadingSpaces> \s *)/u).groups;return{number:Number(rd),leadingSpaces:nd}}function ii $ 3(Ra,qa){return!Ra.ordered||Ra.children.length<2||Me $ 3(Ra.children[1],qa).number!==1?!1:Me $ 3(Ra.children[0],qa).number!==0?!0:Ra.children.length>2&&Me $ 3(Ra.children[2],qa).number===1}function Lr $ 1(Ra,qa){let{value:td}=Ra;return Ra.position.end.offset===qa.length&&td.endsWith( `
2024-09-18 09:46:23 +08:00
` )&&qa.endsWith( `
2024-09-25 14:23:53 +08:00
` )?td.slice(0,-1):td}function ye $ 1(Ra,qa){return function td(rd,nd,ad){let sd={...qa(rd,nd,ad)};return sd.children&&(sd.children=sd.children.map((ud,cd)=>td(ud,cd,[sd,...ad]))),sd}(Ra,null,[])}function mt $ 2(Ra){if((Ra==null?void 0:Ra.type)!=="link"||Ra.children.length!==1)return!1;let[qa]=Ra.children;return Oe $ 2(Ra)===Oe $ 2(qa)&&Pe $ 2(Ra)===Pe $ 2(qa)}function Bl $ 1(Ra,qa){let{node:td}=Ra;if(td.type==="code"&&td.lang!==null){let rd=ni $ 3(qa,{language:td.lang});if(rd)return async nd=>{let ad=qa.__inJsTemplate?"~":" ` ",sd=ad.repeat(Math.max(3,_r$1(td.value,ad)+1)),ud={parser:rd};td.lang===" ts "||td.lang===" typescript "?ud.filepath=" dummy . ts ":td.lang===" tsx "&&(ud.filepath=" dummy . tsx ");let cd=await nd(Lr$1(td,qa.originalText),ud);return _e$2([sd,td.lang,td.meta?" "+td.meta:" ",L$3,Ce$1(cd),L$3,sd])}}switch(td.type){case" front - matter ":return rd=>ri$3(td,rd);case" import ":case" export ":return rd=>rd(td.value,{parser:" babel "});case" jsx ":return rd=>rd(`<$>${td.value}</$>`,{parser:" _ _js _expression ",rootMarker:" mdx "})}return null}var ui$3=Bl$1,ar$1=null;function or$1(Ra){if(ar$1!==null&&typeof ar$1.property){let qa=ar$1;return ar$1=or$1.prototype=null,qa}return ar$1=or$1.prototype=Ra??Object.create(null),new or$1}var ql$1=10;for(let Ra=0;Ra<=ql$1;Ra++)or$1();function Ft$3(Ra){return or$1(Ra)}function Tl$1(Ra,qa=" type "){Ft$3(Ra);function td(rd){let nd=rd[qa],ad=Ra[nd];if(!Array.isArray(ad))throw Object.assign(new Error(`Missing visitor keys for '${nd}'.`),{node:rd});return ad}return td}var ai$2=Tl$1,_l$1={" front - matter ":[],root:[" children "],paragraph:[" children "],sentence:[" children "],word:[],whitespace:[],emphasis:[" children "],strong:[" children "],delete:[" children "],inlineCode:[],wikiLink:[],link:[" children "],image:[],blockquote:[" children "],heading:[" children "],code:[],html:[],list:[" children "],thematicBreak:[],linkReference:[" children "],imageReference:[],definition:[],footnote:[" children "],footnoteReference:[],footnoteDefinition:[" children "],table:[" children "],tableCell:[" children "],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:[" children "],listItem:[" children "],text:[]},oi$3=_l$1,Sl$1=ai$2(oi$3),si$2=Sl$1;function ci$2(Ra){switch(Ra){case" cr ":return" \ r ";case" crlf " : return ` \r
2024-09-18 09:46:23 +08:00
` ;default:return `
2024-11-27 11:30:55 +08:00
` }}var li $ 3=()=>/[#*0-9] \u FE0F? \u 20E3|[ \x A9 \x AE \u 203C \u 2049 \u 2122 \u 2139 \u 2194- \u 2199 \u 21A9 \u 21AA \u 231A \u 231B \u 2328 \u 23CF \u 23ED- \u 23EF \u 23F1 \u 23F2 \u 23F8- \u 23FA \u 24C2 \u 25AA \u 25AB \u 25B6 \u 25C0 \u 25FB \u 25FC \u 25FE \u 2600- \u 2604 \u 260E \u 2611 \u 2614 \u 2615 \u 2618 \u 2620 \u 2622 \u 2623 \u 2626 \u 262A \u 262E \u 262F \u 2638- \u 263A \u 2640 \u 2642 \u 2648- \u 2653 \u 265F \u 2660 \u 2663 \u 2665 \u 2666 \u 2668 \u 267B \u 267E \u 267F \u 2692 \u 2694- \u 2697 \u 2699 \u 269B \u 269C \u 26A0 \u 26A7 \u 26AA \u 26B0 \u 26B1 \u 26BD \u 26BE \u 26C4 \u 26C8 \u 26CF \u 26D1 \u 26E9 \u 26F0- \u 26F5 \u 26F7 \u 26F8 \u 26FA \u 2702 \u 2708 \u 2709 \u 270F \u 2712 \u 2714 \u 2716 \u 271D \u 2721 \u 2733 \u 2734 \u 2744 \u 2747 \u 2757 \u 2763 \u 27A1 \u 2934 \u 2935 \u 2B05- \u 2B07 \u 2B1B \u 2B1C \u 2B55 \u 3030 \u 303D \u 3297 \u 3299] \u FE0F?|[ \u 261D \u 270C \u 270D](?: \u FE0F| \u D83C[ \u DFFB- \u DFFF])?|[ \u 270A \u 270B](?: \u D83C[ \u DFFB- \u DFFF])?|[ \u 23E9- \u 23EC \u 23F0 \u 23F3 \u 25FD \u 2693 \u 26A1 \u 26AB \u 26C5 \u 26CE \u 26D4 \u 26EA \u 26FD \u 2705 \u 2728 \u 274C \u 274E \u 2753- \u 2755 \u 2795- \u 2797 \u 27B0 \u 27BF \u 2B50]| \u 26D3 \u FE0F?(?: \u 200D \u D83D \u DCA5)?| \u 26F9(?: \u FE0F| \u D83C[ \u DFFB- \u DFFF])?(?: \u 200D[ \u 2640 \u 2642] \u FE0F?)?| \u 2764 \u FE0F?(?: \u 200D(?: \u D83D \u DD25| \u D83E \u DE79))?| \u D83C(?:[ \u DC04 \u DD70 \u DD71 \u DD7E \u DD7F \u DE02 \u DE37 \u DF21 \u DF24- \u DF2C \u DF36 \u DF7D \u DF96 \u DF97 \u DF99- \u DF9B \u DF9E \u DF9F \u DFCD \u DFCE \u DFD4- \u DFDF \u DFF5 \u DFF7] \u FE0F?|[ \u DF85 \u DFC2 \u DFC7](?: \u D83C[ \u DFFB- \u DFFF])?|[ \u DFC4 \u DFCA](?: \u D83C[ \u DFFB- \u DFFF])?(?: \u 200D[ \u 2640 \u 2642] \u FE0F?)?|[ \u DFCB \u DFCC](?: \u FE0F| \u D83C[ \u DFFB- \u DFFF])?(?: \u 200D[ \u 2640 \u 2642] \u FE0F?)?|[ \u DCCF \u DD8E \u DD91- \u DD9A \u DE01 \u DE1A \u DE2F \u DE32- \u DE36 \u DE38- \u DE3A \u DE50 \u DE51 \u DF00- \u DF20 \u DF2D- \u DF35 \u DF37- \u DF43 \u DF45- \u DF4A \u DF4C- \u DF7C \u DF7E- \u DF84 \u DF86- \u DF93 \u DFA0- \u DFC1 \u DFC5 \u DFC6 \u DFC8 \u DFC9 \u DFCF- \u DFD3 \u DFE0- \u DFF0 \u DFF8- \u DFFF]| \u DDE6 \u D83C[ \u DDE8- \u DDEC \u DDEE \u DDF1 \u DDF2 \u DDF4 \u DDF6- \u DDFA \u DDFC \u DDFD \u DDFF]| \u DDE7 \u D83C[ \u DDE6 \u DDE7 \u DDE9- \u DDEF \u DDF1- \u DDF4 \u DDF6- \u DDF9 \u DDFB \u DDFC \u DDFE \u DDFF]| \u DDE8 \u D83C[ \u DDE6 \u DDE8 \u DDE9 \u DDEB- \u DDEE \u DDF0- \u DDF5 \u DDF7 \u DDFA- \u DDFF]| \u DDE9 \u D83C[ \u DDEA \u DDEC \u DDEF \u DDF0 \u DDF2 \u DDF4 \u DDFF]| \u DDEA \u D83C[ \u DDE6 \u DDE8 \u DDEA \u DDEC \u DDED \u DDF7- \u DDFA]| \u DDEB \u D83C[ \u DDEE- \u DDF0 \u DDF2 \u DDF4 \u DDF7]| \u DDEC \u D83C[ \u DDE6 \u DDE7 \u DDE9- \u DDEE \u DDF1- \u DDF3 \u DDF5- \u DDFA \u DDFC \u DDFE]| \u DDED \u D83C[ \u DDF0 \u DDF2 \u DDF3 \u DDF7 \u DDF9 \u DDFA]| \u DDEE \u D83C[ \u DDE8- \u DDEA \u DDF1- \u DDF4 \u DDF6- \u DDF9]| \u DDEF \u D83C[ \u DDEA \u DDF2 \u DDF4 \u DDF5]| \u DDF0 \u D83C[ \u DDEA \u DDEC- \u DDEE \u DDF2 \u DDF3 \u DDF5 \u DDF7 \u DDFC \u DDFE \u DDFF]| \u DDF1 \u D83C[ \u DDE6- \u DDE8 \u DDEE \u DDF0 \u DDF7- \u DDFB \u DDFE]| \u DDF2 \u D83C[ \u DDE6 \u DDE8- \u DDED \u DDF0- \u DDFF]| \u DDF3 \u D83C[ \u DDE6 \u DDE8 \u DDEA- \u DDEC \u DDEE \u DDF1 \u DDF4 \u DDF5 \u DDF7 \u DDFA \u DDFF]| \u DDF4 \u D83C \u DDF2| \u DDF5 \u D83C[ \u DDE6 \u DDEA- \u DDED \u DDF0- \u DDF3 \u DDF7- \u DDF9 \u DDFC \u DDFE]| \u DDF6 \u D83C \u DDE6| \u DDF7 \u D83C[ \u DDEA \u DDF4 \u DDF8 \u DDFA \u DDFC]| \u DDF8 \u D83C[ \u DDE6- \u DDEA \u DDEC- \u DDF4 \u DDF7- \u DDF9 \u DDFB \u DDFD- \u DDFF]| \u DDF9 \u D83C[ \u DDE6 \u DDE8 \u DDE9 \u DDEB- \u DDED \u DDEF- \u DDF4 \u DDF7 \u DDF9 \u DDFB \u DDFC \u DDFF]| \u DDFA \u D83C[ \u DDE6 \u DDEC \u DDF2 \u DDF3 \u DDF8 \u DDFE \u DDFF]| \u DDFB \u D83C[ \u DDE6 \u DDE8 \u DDEA \u DDEC \u DDEE \u DDF3 \u DDFA]| \u DDFC \u D83C[ \u DDEB \u DDF8]| \u DDFD \u D83C \u DDF0| \u DDFE \u D83C[ \u DDEA \u DDF9]| \u DDFF \u D83C[ \u DDE6 \u DDF2 \u DDFC]| \u DF44(?: \u 200D \u D83D \u DFEB)?| \u DF4B(?: \u 200D \u D83D \u DFE9)?| \u DFC3(?: \u D83C[ \u DFFB- \u DFFF])?(?: \u 200D(?:[ \u 2640 \u 2642] \u FE0F?(?: \u 200D \u 27A1 \u FE0F?)?| \u 27A1 \u FE0F?))?| \u DFF3 \u FE0F?(?: \u 200D(?: \u 26A7 \u FE0F?| \u D83C \u DF08))?| \u DFF4(?: \u 200D \u 2620 \u FE0F?| \u DB40 \u DC67 \u DB40 \u DC62 \u DB40(?: \u DC65 \u DB40 \u DC6E \u DB40 \u DC67| \u DC73 \u DB40 \u DC63 \u DB40 \u DC74| \u DC77 \u DB40 \u DC6C \u DB40 \u DC73) \u DB40 \u DC7F)?)| \u D83D(?:[ \u DC3F \u DCFD \u DD49 \u DD4A \u DD6F \u DD70 \u DD73 \u DD76- \u DD79 \u DD87 \u DD8A- \u DD8D \u DDA5 \u DDA8 \u DDB1 \u DDB2 \u DDBC \u DDC2- \u DDC4 \u DDD1- \u DDD3 \u DDDC- \u DDDE \u DDE1 \u DDE3 \u DDE8 \u DDEF \u DDF3 \u DDFA \u DECB \u DECD- \u DECF \u DEE0- \u DEE5 \u DEE9 \u DEF0 \u DEF3] \u FE0F?|[ \u DC42 \u DC43 \u DC46- \u DC50 \u DC66 \u DC67 \u DC6B- \u DC6D \u DC72 \u DC74- \u DC76 \u DC78 \u DC7C \u DC83 \u DC85 \u DC8F \u DC91 \u DCAA \u DD7A \u DD95 \u DD96 \u DE4C \u DE4F \u DEC0 \u DECC](?: \u D83C[ \u DFFB- \u DFFF])?|[ \u DC6E \u DC70 \u DC71 \u DC73 \u DC77 \u DC81 \u DC82 \u DC86 \u DC87 \u DE45- \u DE47 \u DE4B \u DE4D \u DE4E \u DEA3 \u DEB4 \u DEB5](?: \u D83C[ \u
` ?N $ 3(!1,Ad, `
` ,nd):Ad;ud.push(Nd),sd.length>0&&(ad+=sr $ 1(Nd));break}case H $ 2:for(let Nd=Ad.length-1;Nd>=0;Nd--)sd.push({ind:Td,mode:Sd,doc:Ad[Nd]});break;case ge $ 2:if(pd>=2)throw new Error("There are too many 'cursor' in doc.");ud.push(cr $ 1),pd++;break;case ee $ 2:sd.push({ind:Ll $ 2(Td,qa),mode:Sd,doc:Ad.contents});break;case re $ 2:sd.push({ind:Il $ 1(Td,Ad.n,qa),mode:Sd,doc:Ad.contents});break;case oe $ 2:ad-=vt $ 1(ud);break;case K $ 2:switch(Sd){case ne $ 2:if(!cd){sd.push({ind:Td,mode:Ad.break?G $ 3:ne $ 2,doc:Ad.contents});break}case G $ 3:{cd=!1;let Nd={ind:Td,mode:ne $ 2,doc:Ad.contents},Ld=rd-ad,Rd=dd.length>0;if(!Ad.break&&Ir $ 1(Nd,sd,Ld,Rd,td))sd.push(Nd);else if(Ad.expandedStates){let Od=M $ 3(!1,Ad.expandedStates,-1);if(Ad.break){sd.push({ind:Td,mode:G $ 3,doc:Od});break}else for(let kd=1;kd<Ad.expandedStates.length+1;kd++)if(kd>=Ad.expandedStates.length){sd.push({ind:Td,mode:G $ 3,doc:Od});break}else{let Fd=Ad.expandedStates[kd],Ud={ind:Td,mode:ne $ 2,doc:Fd};if(Ir $ 1(Ud,sd,Ld,Rd,td)){sd.push(Ud);break}}}else sd.push({ind:Td,mode:G $ 3,doc:Ad.contents});break}}Ad.id&&(td[Ad.id]=M $ 3(!1,sd,-1).mode);break;case J $ 3:{let Nd=rd-ad,{parts:Ld}=Ad;if(Ld.length===0)break;let[Rd,Od]=Ld,kd={ind:Td,mode:ne $ 2,doc:Rd},Fd={ind:Td,mode:G $ 3,doc:Rd},Ud=Ir $ 1(kd,[],Nd,dd.length>0,td,!0);if(Ld.length===1){Ud?sd.push(kd):sd.push(Fd);break}let Hd={ind:Td,mode:ne $ 2,doc:Od},Vd={ind:Td,mode:G $ 3,doc:Od};if(Ld.length===2){Ud?sd.push(Hd,kd):sd.push(Vd,Fd);break}Ld.splice(0,2);let Zd={ind:Td,mode:Sd,doc:Ee $ 2(Ld)},zd=Ld[0];Ir $ 1({ind:Td,mode:ne $ 2,doc:[Rd,Od,zd]},[],Nd,dd.length>0,td,!0)?sd.push(Zd,Hd,kd):Ud?sd.push(Zd,Vd,kd):sd.push(Zd,Vd,Fd);break}case X $ 3:case se $ 1:{let Nd=Ad.groupId?td[Ad.groupId]:Sd;if(Nd===G $ 3){let Ld=Ad.type===X $ 3?Ad.breakContents:Ad.negate?Ad.contents:Ze $ 2(Ad.contents);Ld&&sd.push({ind:Td,mode:Sd,doc:Ld})}if(Nd===ne $ 2){let Ld=Ad.type===X $ 3?Ad.flatContents:Ad.negate?Ze $ 2(Ad.contents):Ad.contents;Ld&&sd.push({ind:Td,mode:Sd,doc:Ld})}break}case ce $ 2:dd.push({ind:Td,mode:Sd,doc:Ad.contents});break;case le $ 2:dd.length>0&&sd.push({ind:Td,mode:Sd,doc:rr $ 1});break;case W $ 3:switch(Sd){case ne $ 2:if(Ad.hard)cd=!0;else{Ad.soft||(ud.push(" "),ad+=1);break}case G $ 3:if(dd.length>0){sd.push({ind:Td,mode:Sd,doc:Ad},...dd.reverse()),dd.length=0;break}Ad.literal?Td.root?(ud.push(nd,Td.root.value),ad=Td.root.length):(ud.push(nd),ad=0):(ad-=vt $ 1(ud),ud.push(nd+Td.value),ad=Td.length);break}break;case fe $ 2:sd.push({ind:Td,mode:Sd,doc:Ad.contents});break;case te $ 2:break;default:throw new qe $ 3(Ad)}sd.length===0&&dd.length>0&&(sd.push(...dd.reverse()),dd.length=0)}let fd=ud.indexOf(cr $ 1);if(fd!==-1){let Td=ud.indexOf(cr $ 1,fd+1),Sd=ud.slice(0,fd).join(""),Ad=ud.slice(fd+1,Td).join(""),Nd=ud.slice(Td+1).join("");return{formatted:Sd+Ad+Nd,cursorNodeStart:Sd.length,cursorNodeText:Ad}}return{formatted:ud.join("")}}function mi(Ra,qa,td){let{node:rd}=Ra,nd=[],ad=Ra.map(()=>Ra.map(({index:fd})=>{let Td=hi $ 2(td(),qa).formatted,Sd=sr $ 1(Td);return nd[fd]=Math.max(nd[fd]??3,Sd),{text:Td,width:Sd}},"children"),"children"),sd=cd(!1);if(qa.proseWrap!=="never")return[er $ 1,sd];let ud=cd(!0);return[er $ 1,ze $ 2(zn $ 2(ud,sd))];function cd(fd){return Tr $ 1(rr $ 1,[pd(ad[0],fd),dd(fd),...ad.slice(1).map(Td=>pd(Td,fd))].map(Td=> ` | $ { Td . join ( " | " ) } | ` ))}function dd(fd){return nd.map((Td,Sd)=>{let Ad=rd.align[Sd],Nd=Ad==="center"||Ad==="left"?":":"-",Ld=Ad==="center"||Ad==="right"?":":"-",Rd=fd?"-":"-".repeat(Td-2);return ` $ { Nd } $ { Rd } $ { Ld } ` })}function pd(fd,Td){return fd.map(({text:Sd,width:Ad},Nd)=>{if(Td)return Sd;let Ld=nd[Nd]-Ad,Rd=rd.align[Nd],Od=0;Rd==="right"?Od=Ld:Rd==="center"&&(Od=Math.floor(Ld/2));let kd=Ld-Od;return ` $ { " " . repeat ( Od ) } $ { Sd } $ { " " . repeat ( kd ) } ` })}}function Fi(Ra,qa,td){let rd=Ra.map(td,"children");return Nl $ 1(rd)}function Nl $ 1(Ra){let qa=[""];return function td(rd){for(let nd of rd){let ad=Y $ 2(nd);if(ad===H $ 2){td(nd);continue}let sd=nd,ud=[];ad===J $ 3&&([sd,...ud]=nd.parts),qa.push([qa.pop(),sd],...ud)}}(Ra),Ee $ 2(qa)}var Rl $ 2=/^. $ /su;function Ul $ 1(Ra,qa){return Ra=zl $ 2(Ra,qa),Ra=Yl $ 2(Ra),Ra=Vl $ 1(Ra,qa),Ra=jl $ 2(Ra,qa),Ra=Gl $ 1(Ra),Ra}function zl $ 2(Ra,qa){return ye $ 1(Ra,td=>td.type!=="text"||td.va
2024-09-25 14:23:53 +08:00
` )return L $ 3;let nd=qa===" "||qa=== `
2024-11-27 11:30:55 +08:00
` &&Jl $ 2(Ra,rd);return Xl $ 2(Ra,qa,td,rd,nd)?nd?Br $ 2:qr $ 1:nd?" ":""}var Ql $ 2=new Set(["listItem","definition"]);function Zl $ 1(Ra,qa,td){var rd,nd;let{node:ad}=Ra;if(af(Ra)){let sd=[""],ud=Pr $ 1(qa.originalText.slice(ad.position.start.offset,ad.position.end.offset));for(let cd of ud){if(cd.type==="word"){sd.push([sd.pop(),cd.value]);continue}let dd=Et $ 2(Ra,cd.value,qa.proseWrap,!0);if(Y $ 2(dd)=== $ $ 1){sd.push([sd.pop(),dd]);continue}sd.push(dd)}return Ee $ 2(sd)}switch(ad.type){case"front-matter":return qa.originalText.slice(ad.position.start.offset,ad.position.end.offset);case"root":return ad.children.length===0?"":[tf(Ra,qa,td),L $ 3];case"paragraph":return Fi(Ra,qa,td);case"sentence":return vi $ 1(Ra,td);case"word":{let sd=N $ 3(!1,N $ 3(!1,ad.value,"*",String.raw ` \ * ` ),new RegExp([ ` ( ^ | $ { Se$2 . source } ) ( _ + ) ` , ` ( _ + ) ( $ { Se$2 . source } | $ ) ` ].join("|"),"gu"),(dd,pd,fd,Td,Sd)=>N $ 3(!1,fd? ` $ { pd } $ { fd } ` : ` $ { Td } $ { Sd } ` ,"_",String.raw ` \ _ ` )),ud=(dd,pd,fd)=>dd.type==="sentence"&&fd===0,cd=(dd,pd,fd)=>mt $ 2(dd.children[fd-1]);return sd!==ad.value&&(Ra.match(void 0,ud,cd)||Ra.match(void 0,ud,(dd,pd,fd)=>dd.type==="emphasis"&&fd===0,cd))&&(sd=sd.replace(/^( \\ ?[*_])+/u,dd=>N $ 3(!1,dd," \\ ",""))),sd}case"whitespace":{let{next:sd}=Ra,ud=sd&&/^>|^(?:[*+-]|#{1,6}| \d +[).]) $ /u.test(sd.value)?"never":qa.proseWrap;return Et $ 2(Ra,ad.value,ud)}case"emphasis":{let sd;if(mt $ 2(ad.children[0]))sd=qa.originalText[ad.position.start.offset];else{let{previous:ud,next:cd}=Ra;sd=(ud==null?void 0:ud.type)==="sentence"&&((rd=M $ 3(!1,ud.children,-1))==null?void 0:rd.type)==="word"&&!M $ 3(!1,ud.children,-1).hasTrailingPunctuation||(cd==null?void 0:cd.type)==="sentence"&&((nd=cd.children[0])==null?void 0:nd.type)==="word"&&!cd.children[0].hasLeadingPunctuation||Ra.hasAncestor(dd=>dd.type==="emphasis")?"*":"_"}return[sd,V $ 3(Ra,qa,td),sd]}case"strong":return["**",V $ 3(Ra,qa,td),"**"];case"delete":return["~~",V $ 3(Ra,qa,td),"~~"];case"inlineCode":{let sd=qa.proseWrap==="preserve"?ad.value:N $ 3(!1,ad.value, `
2024-09-25 14:23:53 +08:00
` ," "),ud=Gn $ 3(sd," ` "),cd=" ` ".repeat(ud||1),dd=sd.startsWith(" ` ")||sd.endsWith(" ` ")||/^[ \n ]/u.test(sd)&&/[ \n ] $ /u.test(sd)&&/[^ \n ]/u.test(sd)?" ":"";return[cd,dd,sd,dd,cd]}case"wikiLink":{let sd="";return qa.proseWrap==="preserve"?sd=ad.value:sd=N $ 3(!1,ad.value,/[ \t \n ]+/gu," "),["[[",sd,"]]"]}case"link":switch(qa.originalText[ad.position.start.offset]){case"<":{let sd="mailto:";return["<",ad.url.startsWith(sd)&&qa.originalText.slice(ad.position.start.offset+1,ad.position.start.offset+1+sd.length)!==sd?ad.url.slice(sd.length):ad.url,">"]}case"[":return["[",V $ 3(Ra,qa,td),"](",Ct $ 2(ad.url,")"),Nr $ 1(ad.title,qa),")"];default:return qa.originalText.slice(ad.position.start.offset,ad.position.end.offset)}case"image":return["![",ad.alt||"","](",Ct $ 2(ad.url,")"),Nr $ 1(ad.title,qa),")"];case"blockquote":return["> ",ve $ 2("> ",V $ 3(Ra,qa,td))];case"heading":return["#".repeat(ad.depth)+" ",V $ 3(Ra,qa,td)];case"code":{if(ad.isIndented){let cd=" ".repeat(4);return ve $ 2(cd,[cd,Ce $ 1(ad.value,L $ 3)])}let sd=qa.__inJsTemplate?"~":" ` ",ud=sd.repeat(Math.max(3,_r$1(ad.value,sd)+1));return[ud,ad.lang||" ",ad.meta?" "+ad.meta:" ",L$3,Ce$1(Lr$1(ad,qa.originalText),L$3),L$3,ud]}case" html ":{let{parent:sd,isLast:ud}=Ra,cd=sd.type===" root "&&ud?ad.value.trimEnd():ad.value,dd=/^<!--.*-->$/su.test(cd);return Ce$1(cd,dd?L$3:_e$2(tr$1))}case" list ":{let sd=Ai$1(ad,Ra.parent),ud=ii$3(ad,qa);return V$3(Ra,qa,td,{processor(cd){let dd=fd(),pd=cd.node;if(pd.children.length===2&&pd.children[1].type===" html "&&pd.children[0].position.start.column!==pd.children[1].position.start.column)return[dd,yi$1(cd,qa,td,dd)];return[dd,ve$2(" ".repeat(dd.length),yi$1(cd,qa,td,dd))];function fd(){let Td=ad.ordered?(cd.isFirst?ad.start:ud?1:ad.start+cd.index)+(sd%2===0?" . ":" ) "):sd%2===0?" - ":" * ";return ad.isAligned||ad.hasIndentedCodeblock?ef(Td,qa):Td}}})}case" thematicBreak ":{let{ancestors:sd}=Ra,ud=sd.findIndex(cd=>cd.type===" list ");return ud===-1?" -- - ":Ai$1(sd[ud],sd[ud+1])%2===0?" * * * ":" -- - "}case" linkReference ":return[" [ ",V$3(Ra,qa,td)," ] ",ad.referenceType===" full "?bt$3(ad):ad.referenceType===" collapsed "?" [ ] ":" "];case" imageReference ":switch(ad.referenceType){case" full ":return[" ! [ ",ad.alt||" "," ] ",bt$3(ad)];default:return[" ! [ ",ad.alt," ] ",ad.referenceType===" collapsed "?" [ ] ":" "]}case" definition ":{let sd=qa.proseWrap===" always "?Br$2:" ";return ze$2([bt$3(ad)," : ",Ze$2([sd,Ct$2(ad.url),ad.title===null?" ":[sd,Nr$1(ad.title,qa,!1)]])])}case" footnote ":return[" [ ^ ",V$3(Ra,qa,td)," ] "];case" footnoteReference ":return Bi$1(ad);case" footnoteDefinition ":{let sd=ad.children.length===1&&ad.children[0].type===" paragraph "&&(qa.proseWrap===" never "||qa.proseWrap===" preserve "&&ad.children[0].position.start.line===ad.children[0].position.end.line);return[Bi$1(ad)," : ",sd?V$3(Ra,qa,td):ze$2([ve$2(" ".repeat(4),V$3(Ra,qa,td,{processor:({isFirst:ud})=>ud?ze$2([qr$1,td()]):td()}))])]}case" table ":return mi(Ra,qa,td);case" tableCell ":return V$3(Ra,qa,td);case" break ":return/\s/u.test(qa.originalText[ad.position.start.offset])?[" ",_e$2(tr$1)]:[" \ \ ",L$3];case" liquidNode ":return Ce$1(ad.value,L$3);case" import ":case" export ":case" jsx ":return ad.value;case" esComment ":return[" { /* ",ad.value," */ } "];case" math ":return[" $$ ",L$3,ad.value?[Ce$1(ad.value,L$3),L$3]:" "," $$ "];case" inlineMath ":return qa.originalText.slice(Oe$2(ad),Pe$2(ad));case" tableRow ":case" listItem ":case" text ":default:throw new $n$3(ad," Markdown ")}}function yi$1(Ra,qa,td,rd){let{node:nd}=Ra,ad=nd.checked===null?" ":nd.checked?" [ x ] ":" [ ] ";return[ad,V$3(Ra,qa,td,{processor({node:sd,isFirst:ud}){if(ud&&sd.type!==" list ")return ve$2(" ".repeat(ad.length),td());let cd=" ".repeat(sf(qa.tabWidth-rd.length,0,3));return[cd,ve$2(cd,td())]}})]}function ef(Ra,qa){let td=rd();return Ra+" " . repeat ( td >= 4 ? 0 : td ) ; function rd ( ) { let nd = Ra . length % qa . tabWidth ; return nd === 0 ? 0 : qa . tabWidth - nd } } function Ai$1 ( Ra , qa ) { return rf ( Ra , qa , td => td . ordered === Ra . ordered ) } function rf ( Ra , qa , td ) { let rd = - 1 ; for ( let nd of qa . children ) if ( nd . type === Ra . type && td ( nd ) ? rd ++ : rd = - 1 , nd === Ra ) return rd } function tf ( Ra , qa , td ) { let rd = [ ] , nd = null , { children : ad } = Ra . node ; for ( let [ sd , ud ] of ad . entries ( ) ) switch ( yt$1 ( ud
` )}function uf({node:Ra,previous:qa,parent:td},rd){if(wi $ 1(qa,rd))return!0;let nd=qa.type===Ra.type&&Ql $ 2.has(Ra.type),ad=td.type==="listItem"&&!wi $ 1(td,rd),sd=yt $ 1(qa)==="next",ud=Ra.type==="html"&&qa.type==="html"&&qa.position.end.line+1===Ra.position.start.line,cd=Ra.type==="html"&&td.type==="listItem"&&qa.type==="paragraph"&&qa.position.end.line+1===Ra.position.start.line;return!(nd||ad||sd||ud||cd)}function ki $ 1({node:Ra,previous:qa}){let td=qa.type==="list",rd=Ra.type==="code"&&Ra.isIndented;return td&&rd}function af(Ra){let qa=Ra.findAncestor(td=>td.type==="linkReference"||td.type==="imageReference");return qa&&(qa.type!=="linkReference"||qa.referenceType!=="full")}var of=(Ra,qa)=>{for(let td of qa)Ra=N $ 3(!1,Ra,td,encodeURIComponent(td));return Ra};function Ct $ 2(Ra,qa=[]){let td=[" ",...Array.isArray(qa)?qa:[qa]];return new RegExp(td.map(rd=>Be $ 2(rd)).join("|"),"u").test(Ra)? ` < $ { of ( Ra , "<>" ) } > ` :Ra}function Nr $ 1(Ra,qa,td=!0){if(!Ra)return"";if(td)return" "+Nr $ 1(Ra,qa,!1);if(Ra=N $ 3(!1,Ra,/ \\ (?=["')])/gu,""),Ra.includes('"')&&Ra.includes("'")&&!Ra.includes(")"))return ` ( $ { Ra } ) ` ;let rd=jn $ 2(Ra,qa.singleQuote);return Ra=N $ 3(!1,Ra," \\ "," \\ \\ "),Ra=N $ 3(!1,Ra,rd, ` \ \ $ { rd } ` ), ` $ { rd } $ { Ra } $ { rd } ` }function sf(Ra,qa,td){return Ra<qa?qa:Ra>td?td:Ra}function cf(Ra){return Ra.index>0&&yt $ 1(Ra.previous)==="next"}function bt $ 3(Ra){return ` [ $ { ( 0 , qi$1 . default ) ( Ra . label ) } ] ` }function Bi $ 1(Ra){return ` [ ^ $ { Ra . label } ] ` }var lf={preprocess:gi,print:Zl $ 1,embed:ui $ 3,massageAstNode:Zn $ 2,hasPrettierIgnore:cf,insertPragma:Jn $ 3,getVisitorKeys:si $ 2},Ti $ 1=lf,_i $ 1=[{linguistLanguageId:222,name:"Markdown",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",parsers:["markdown"],vscodeLanguageIds:["markdown"]},{linguistLanguageId:222,name:"MDX",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".mdx"],filenames:[],tmScope:"text.md",parsers:["mdx"],vscodeLanguageIds:["mdx"]}],At $ 3={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},ff={proseWrap:At $ 3.proseWrap,singleQuote:At $ 3.singleQuote},Si $ 1=ff,On $ 2={};Ln $ 1(On $ 2,{markdown:()=>km,mdx:()=>Bm,remark:()=>km});var Wc=Ue $ 2(Pi $ 1()),Kc=Ue $ 2(Wi()),Jc=Ue $ 2(Gs()),Xc=Ue $ 2(Ic()),vm=/^import \s /u,Em=/^export \s /u,Nc=String.raw ` [ a - z ] [ a - z0 - 9 ] * ( \ . [ a - z ] [ a - z0 - 9 ] * ) * | ` ,Rc=/<!---->|<!---?[^>-](?:-?[^-])*-->/u,Cm=/^ \{ \s * \/ \* (.*) \* \/ \s * \} /u,bm $ 1= `
2024-11-27 11:30:55 +08:00
` ,Uc $ 1=Ra=>vm.test(Ra),Sn $ 2=Ra=>Em.test(Ra),zc=(Ra,qa)=>{let td=qa.indexOf(bm $ 1),rd=qa.slice(0,td);if(Sn $ 2(rd)||Uc $ 1(rd))return Ra(rd)({type:Sn $ 2(rd)?"export":"import",value:rd})},Mc=(Ra,qa)=>{let td=Cm.exec(qa);if(td)return Ra(td[0])({type:"esComment",value:td[1].trim()})};zc.locator=Ra=>Sn $ 2(Ra)||Uc $ 1(Ra)?-1:1;Mc.locator=(Ra,qa)=>Ra.indexOf("{",qa);var Yc=function(){let{Parser:Ra}=this,{blockTokenizers:qa,blockMethods:td,inlineTokenizers:rd,inlineMethods:nd}=Ra.prototype;qa.esSyntax=zc,rd.esComment=Mc,td.splice(td.indexOf("paragraph"),0,"esSyntax"),nd.splice(nd.indexOf("text"),0,"esComment")},ym=function(){let Ra=this.Parser.prototype;Ra.blockMethods=["frontMatter",...Ra.blockMethods],Ra.blockTokenizers.frontMatter=qa;function qa(td,rd){let nd=ir $ 2(rd);if(nd.frontMatter)return td(nd.frontMatter.raw)(nd.frontMatter)}qa.onlyAtStart=!0},Gc $ 1=ym;function Am(){return Ra=>ye $ 1(Ra,(qa,td,[rd])=>qa.type!=="html"||Rc.test(qa.value)||Or $ 1.has(rd.type)?qa:{...qa,type:"jsx"})}var Vc=Am,xm=function(){let Ra=this.Parser.prototype,qa=Ra.inlineMethods;qa.splice(qa.indexOf("text"),0,"liquid"),Ra.inlineTokenizers.liquid=td;function td(rd,nd){let ad=nd.match(/^( \{ %.*?% \} | \{ \{ .*? \} \} )/su);if(ad)return rd(ad[0])({type:"liquidNode",value:ad[0]})}td.locator=function(rd,nd){return rd.indexOf("{",nd)}},jc $ 1=xm,wm=function(){let Ra="wikiLink",qa=/^ \[ \[ (?<linkContents>.+?) \] \] /su,td=this.Parser.prototype,rd=td.inlineMethods;rd.splice(rd.indexOf("link"),0,Ra),td.inlineTokenizers.wikiLink=nd;function nd(ad,sd){let ud=qa.exec(sd);if(ud){let cd=ud.groups.linkContents.trim();return ad(ud[0])({type:Ra,value:cd})}}nd.locator=function(ad,sd){return ad.indexOf("[",sd)}}, $ c $ 1=wm;function Qc({isMDX:Ra}){return qa=>{let td=(0,Xc.default)().use(Jc.default,{commonmark:!0,...Ra&&{blocks:[Nc]}}).use(Wc.default).use(Gc $ 1).use(Kc.default).use(Ra?Yc:Hc).use(jc $ 1).use(Ra?Vc:Hc).use( $ c $ 1);return td.run(td.parse(qa))}}function Hc(){}var Zc={astFormat:"mdast",hasPragma:Kn $ 2,locStart:Oe $ 2,locEnd:Pe $ 2},km={...Zc,parse:Qc({isMDX:!1})},Bm={...Zc,parse:Qc({isMDX:!0})},qm={mdast:Ti $ 1},fC=Pn $ 3;const prettierPluginMarkdown=Object.freeze(Object.defineProperty({__proto__:null,default:fC,languages:_i $ 1,options:Si $ 1,parsers:On $ 2,printers:qm},Symbol.toStringTag,{value:"Module"}));var al=Object.create,Ur $ 1=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,ll=Object.getOwnPropertyNames,cl=Object.getPrototypeOf,fl=Object.prototype.hasOwnProperty,y $ 3=(Ra,qa)=>()=>(qa||Ra((qa={exports:{}}).exports,qa),qa.exports),Xs=(Ra,qa)=>{for(var td in qa)Ur $ 1(Ra,td,{get:qa[td],enumerable:!0})},pl=(Ra,qa,td,rd)=>{if(qa&&typeof qa=="object"||typeof qa=="function")for(let nd of ll(qa))!fl.call(Ra,nd)&&nd!==td&&Ur $ 1(Ra,nd,{get:()=>qa[nd],enumerable:!(rd=ul(qa,nd))||rd.enumerable});return Ra},ye=(Ra,qa,td)=>(td=Ra!=null?al(cl(Ra)):{},pl(Ur $ 1(td,"default",{value:Ra,enumerable:!0}),Ra)),Ut $ 1=y $ 3((Ra,qa)=>{qa.exports.isClean=Symbol("isClean"),qa.exports.my=Symbol("my")}),yi=y $ 3((Ra,qa)=>{var td=String,rd=function(){return{isColorSupported:!1,reset:td,bold:td,dim:td,italic:td,underline:td,inverse:td,hidden:td,strikethrough:td,black:td,red:td,green:td,yellow:td,blue:td,magenta:td,cyan:td,white:td,gray:td,bgBlack:td,bgRed:td,bgGreen:td,bgYellow:td,bgBlue:td,bgMagenta:td,bgCyan:td,bgWhite:td}};qa.exports=rd(),qa.exports.createColors=rd}),ss=y $ 3(()=>{}),Ft $ 2=y $ 3((Ra,qa)=>{var td=yi(),rd=ss(),nd=class aS extends Error{constructor(sd,ud,cd,dd,pd,fd){super(sd),this.name="CssSyntaxError",this.reason=sd,pd&&(this.file=pd),dd&&(this.source=dd),fd&&(this.plugin=fd),typeof ud<"u"&&typeof cd<"u"&&(typeof ud=="number"?(this.line=ud,this.column=cd):(this.line=ud.line,this.column=ud.column,this.endLine=cd.line,this.endColumn=cd.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,aS)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(sd){if(!this.source)return"";let ud=this.source;sd==null&&(sd=td.isColorSupported),rd&&s
` +Od+Td("^")}return" "+Sd(Rd)+Ad}).join( `
2024-09-25 14:23:53 +08:00
` )}toString(){let sd=this.showSourceCode();return sd&&(sd= `
` +sd+ `
` ),this.name+": "+this.message+sd}};qa.exports=nd,nd.default=nd}), $ t $ 2=y $ 3((Ra,qa)=>{var td={after: `
2024-09-18 09:46:23 +08:00
` ,beforeClose: `
` ,beforeComment: `
` ,beforeDecl: `
` ,beforeOpen:" ",beforeRule: `
2024-09-25 14:23:53 +08:00
` ,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function rd(ad){return ad[0].toUpperCase()+ad.slice(1)}var nd=class{constructor(ad){this.builder=ad}atrule(ad,sd){let ud="@"+ad.name,cd=ad.params?this.rawValue(ad,"params"):"";if(typeof ad.raws.afterName<"u"?ud+=ad.raws.afterName:cd&&(ud+=" "),ad.nodes)this.block(ad,ud+cd);else{let dd=(ad.raws.between||"")+(sd?";":"");this.builder(ud+cd+dd,ad)}}beforeAfter(ad,sd){let ud;ad.type==="decl"?ud=this.raw(ad,null,"beforeDecl"):ad.type==="comment"?ud=this.raw(ad,null,"beforeComment"):sd==="before"?ud=this.raw(ad,null,"beforeRule"):ud=this.raw(ad,null,"beforeClose");let cd=ad.parent,dd=0;for(;cd&&cd.type!=="root";)dd+=1,cd=cd.parent;if(ud.includes( `
` )){let pd=this.raw(ad,null,"indent");if(pd.length)for(let fd=0;fd<dd;fd++)ud+=pd}return ud}block(ad,sd){let ud=this.raw(ad,"between","beforeOpen");this.builder(sd+ud+"{",ad,"start");let cd;ad.nodes&&ad.nodes.length?(this.body(ad),cd=this.raw(ad,"after")):cd=this.raw(ad,"after","emptyBody"),cd&&this.builder(cd),this.builder("}",ad,"end")}body(ad){let sd=ad.nodes.length-1;for(;sd>0&&ad.nodes[sd].type==="comment";)sd-=1;let ud=this.raw(ad,"semicolon");for(let cd=0;cd<ad.nodes.length;cd++){let dd=ad.nodes[cd],pd=this.raw(dd,"before");pd&&this.builder(pd),this.stringify(dd,sd!==cd||ud)}}comment(ad){let sd=this.raw(ad,"left","commentLeft"),ud=this.raw(ad,"right","commentRight");this.builder("/*"+sd+ad.text+ud+"*/",ad)}decl(ad,sd){let ud=this.raw(ad,"between","colon"),cd=ad.prop+ud+this.rawValue(ad,"value");ad.important&&(cd+=ad.raws.important||" !important"),sd&&(cd+=";"),this.builder(cd,ad)}document(ad){this.body(ad)}raw(ad,sd,ud){let cd;if(ud||(ud=sd),sd&&(cd=ad.raws[sd],typeof cd<"u"))return cd;let dd=ad.parent;if(ud==="before"&&(!dd||dd.type==="root"&&dd.first===ad||dd&&dd.type==="document"))return"";if(!dd)return td[ud];let pd=ad.root();if(pd.rawCache||(pd.rawCache={}),typeof pd.rawCache[ud]<"u")return pd.rawCache[ud];if(ud==="before"||ud==="after")return this.beforeAfter(ad,ud);{let fd="raw"+rd(ud);this[fd]?cd=this[fd](pd,ad):pd.walk(Td=>{if(cd=Td.raws[sd],typeof cd<"u")return!1})}return typeof cd>"u"&&(cd=td[ud]),pd.rawCache[ud]=cd,cd}rawBeforeClose(ad){let sd;return ad.walk(ud=>{if(ud.nodes&&ud.nodes.length>0&&typeof ud.raws.after<"u")return sd=ud.raws.after,sd.includes( `
` )&&(sd=sd.replace(/[^ \n ]+ $ /,"")),!1}),sd&&(sd=sd.replace(/ \S /g,"")),sd}rawBeforeComment(ad,sd){let ud;return ad.walkComments(cd=>{if(typeof cd.raws.before<"u")return ud=cd.raws.before,ud.includes( `
` )&&(ud=ud.replace(/[^ \n ]+ $ /,"")),!1}),typeof ud>"u"?ud=this.raw(sd,null,"beforeDecl"):ud&&(ud=ud.replace(/ \S /g,"")),ud}rawBeforeDecl(ad,sd){let ud;return ad.walkDecls(cd=>{if(typeof cd.raws.before<"u")return ud=cd.raws.before,ud.includes( `
` )&&(ud=ud.replace(/[^ \n ]+ $ /,"")),!1}),typeof ud>"u"?ud=this.raw(sd,null,"beforeRule"):ud&&(ud=ud.replace(/ \S /g,"")),ud}rawBeforeOpen(ad){let sd;return ad.walk(ud=>{if(ud.type!=="decl"&&(sd=ud.raws.between,typeof sd<"u"))return!1}),sd}rawBeforeRule(ad){let sd;return ad.walk(ud=>{if(ud.nodes&&(ud.parent!==ad||ad.first!==ud)&&typeof ud.raws.before<"u")return sd=ud.raws.before,sd.includes( `
` )&&(sd=sd.replace(/[^ \n ]+ $ /,"")),!1}),sd&&(sd=sd.replace(/ \S /g,"")),sd}rawColon(ad){let sd;return ad.walkDecls(ud=>{if(typeof ud.raws.between<"u")return sd=ud.raws.between.replace(/[^ \s :]/g,""),!1}),sd}rawEmptyBody(ad){let sd;return ad.walk(ud=>{if(ud.nodes&&ud.nodes.length===0&&(sd=ud.raws.after,typeof sd<"u"))return!1}),sd}rawIndent(ad){if(ad.raws.indent)return ad.raws.indent;let sd;return ad.walk(ud=>{let cd=ud.parent;if(cd&&cd!==ad&&cd.parent&&cd.parent===ad&&typeof ud.raws.before<"u"){let dd=ud.raws.before.split( `
2024-11-27 11:30:55 +08:00
` );return sd=dd[dd.length-1],sd=sd.replace(/ \S /g,""),!1}}),sd}rawSemicolon(ad){let sd;return ad.walk(ud=>{if(ud.nodes&&ud.nodes.length&&ud.last.type==="decl"&&(sd=ud.raws.semicolon,typeof sd<"u"))return!1}),sd}rawValue(ad,sd){let ud=ad[sd],cd=ad.raws[sd];return cd&&cd.value===ud?cd.raw:ud}root(ad){this.body(ad),ad.raws.after&&this.builder(ad.raws.after)}rule(ad){this.block(ad,this.rawValue(ad,"selector")),ad.raws.ownSemicolon&&this.builder(ad.raws.ownSemicolon,ad,"end")}stringify(ad,sd){if(!this[ad.type])throw new Error("Unknown AST node type "+ad.type+". Maybe you need to change PostCSS stringifier.");this[ad.type](ad,sd)}};qa.exports=nd,nd.default=nd}),it $ 1=y $ 3((Ra,qa)=>{var td= $ t $ 2();function rd(nd,ad){new td(ad).stringify(nd)}qa.exports=rd,rd.default=rd}),at $ 3=y $ 3((Ra,qa)=>{var{isClean:td,my:rd}=Ut $ 1(),nd=Ft $ 2(),ad= $ t $ 2(),sd=it $ 1();function ud(dd,pd){let fd=new dd.constructor;for(let Td in dd){if(!Object.prototype.hasOwnProperty.call(dd,Td)||Td==="proxyCache")continue;let Sd=dd[Td],Ad=typeof Sd;Td==="parent"&&Ad==="object"?pd&&(fd[Td]=pd):Td==="source"?fd[Td]=Sd:Array.isArray(Sd)?fd[Td]=Sd.map(Nd=>ud(Nd,fd)):(Ad==="object"&&Sd!==null&&(Sd=ud(Sd)),fd[Td]=Sd)}return fd}var cd=class{constructor(dd={}){this.raws={},this[td]=!1,this[rd]=!0;for(let pd in dd)if(pd==="nodes"){this.nodes=[];for(let fd of dd[pd])typeof fd.clone=="function"?this.append(fd.clone()):this.append(fd)}else this[pd]=dd[pd]}addToError(dd){if(dd.postcssNode=this,dd.stack&&this.source&&/ \n \s {4}at /.test(dd.stack)){let pd=this.source;dd.stack=dd.stack.replace(/ \n \s {4}at /, ` $ & $ { pd . input . from } : $ { pd . start . line } : $ { pd . start . column } $ & ` )}return dd}after(dd){return this.parent.insertAfter(this,dd),this}assign(dd={}){for(let pd in dd)this[pd]=dd[pd];return this}before(dd){return this.parent.insertBefore(this,dd),this}cleanRaws(dd){delete this.raws.before,delete this.raws.after,dd||delete this.raws.between}clone(dd={}){let pd=ud(this);for(let fd in dd)pd[fd]=dd[fd];return pd}cloneAfter(dd={}){let pd=this.clone(dd);return this.parent.insertAfter(this,pd),pd}cloneBefore(dd={}){let pd=this.clone(dd);return this.parent.insertBefore(this,pd),pd}error(dd,pd={}){if(this.source){let{end:fd,start:Td}=this.rangeBy(pd);return this.source.input.error(dd,{column:Td.column,line:Td.line},{column:fd.column,line:fd.line},pd)}return new nd(dd)}getProxyProcessor(){return{get(dd,pd){return pd==="proxyOf"?dd:pd==="root"?()=>dd.root().toProxy():dd[pd]},set(dd,pd,fd){return dd[pd]===fd||(dd[pd]=fd,(pd==="prop"||pd==="value"||pd==="name"||pd==="params"||pd==="important"||pd==="text")&&dd.markDirty()),!0}}}markDirty(){if(this[td]){this[td]=!1;let dd=this;for(;dd=dd.parent;)dd[td]=!1}}next(){if(!this.parent)return;let dd=this.parent.index(this);return this.parent.nodes[dd+1]}positionBy(dd,pd){let fd=this.source.start;if(dd.index)fd=this.positionInside(dd.index,pd);else if(dd.word){pd=this.toString();let Td=pd.indexOf(dd.word);Td!==-1&&(fd=this.positionInside(Td,pd))}return fd}positionInside(dd,pd){let fd=pd||this.toString(),Td=this.source.start.column,Sd=this.source.start.line;for(let Ad=0;Ad<dd;Ad++)fd[Ad]=== `
` ?(Td=1,Sd+=1):Td+=1;return{column:Td,line:Sd}}prev(){if(!this.parent)return;let dd=this.parent.index(this);return this.parent.nodes[dd-1]}rangeBy(dd){let pd={column:this.source.start.column,line:this.source.start.line},fd=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:pd.column+1,line:pd.line};if(dd.word){let Td=this.toString(),Sd=Td.indexOf(dd.word);Sd!==-1&&(pd=this.positionInside(Sd,Td),fd=this.positionInside(Sd+dd.word.length,Td))}else dd.start?pd={column:dd.start.column,line:dd.start.line}:dd.index&&(pd=this.positionInside(dd.index)),dd.end?fd={column:dd.end.column,line:dd.end.line}:typeof dd.endIndex=="number"?fd=this.positionInside(dd.endIndex):dd.index&&(fd=this.positionInside(dd.index+1));return(fd.line<pd.line||fd.line===pd.line&&fd.column<=pd.column)&&(fd={column:pd.column+1,line:pd.line}),{end:fd,start:pd}}raw(dd,pd){return new ad().raw(this,dd,pd)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...dd){if(this.parent){let pd=this,fd=!1;for(let Td of dd)Td===this?fd=!0:fd?(this.parent.insertAfter(pd,Td),pd=Td):this.parent.insertBefore(pd,Td);fd||this.remove()}return this}root(){let dd=this;for(;dd.parent&&dd.parent.type!=="document";)dd=dd.parent;return dd}toJSON(dd,pd){let fd={},Td=pd==null;pd=pd||new Map;let Sd=0;for(let Ad in this){if(!Object.prototype.hasOwnProperty.call(this,Ad)||Ad==="parent"||Ad==="proxyCache")continue;let Nd=this[Ad];if(Array.isArray(Nd))fd[Ad]=Nd.map(Ld=>typeof Ld=="object"&&Ld.toJSON?Ld.toJSON(null,pd):Ld);else if(typeof Nd=="object"&&Nd.toJSON)fd[Ad]=Nd.toJSON(null,pd);else if(Ad==="source"){let Ld=pd.get(Nd.input);Ld==null&&(Ld=Sd,pd.set(Nd.input,Sd),Sd++),fd[Ad]={end:Nd.end,inputId:Ld,start:Nd.start}}else fd[Ad]=Nd}return Td&&(fd.inputs=[...pd.keys()].map(Ad=>Ad.toJSON())),fd}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(dd=sd){dd.stringify&&(dd=dd.stringify);let pd="";return dd(this,fd=>{pd+=fd}),pd}warn(dd,pd,fd){let Td={node:this};for(let Sd in fd)Td[Sd]=fd[Sd];return dd.warn(pd,Td)}get proxyOf(){return this}};qa.exports=cd,cd.default=cd}),lt $ 1=y $ 3((Ra,qa)=>{var td=at $ 3(),rd=class extends td{constructor(nd){nd&&typeof nd.value<"u"&&typeof nd.value!="string"&&(nd={...nd,value:String(nd.value)}),super(nd),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]===" $ "}};qa.exports=rd,rd.default=rd}),Oe $ 1=y $ 3((Ra,qa)=>{var td=at $ 3(),rd=class extends td{constructor(nd){super(nd),this.type="comment"}};qa.exports=rd,rd.default=rd}),re $ 1=y $ 3((Ra,qa)=>{var{isClean:td,my:rd}=Ut $ 1(),nd=lt $ 1(),ad=Oe $ 1(),sd=at $ 3(),ud,cd,dd,pd;function fd(Ad){return Ad.map(Nd=>(Nd.nodes&&(Nd.nodes=fd(Nd.nodes)),delete Nd.source,Nd))}function Td(Ad){if(Ad[td]=!1,Ad.proxyOf.nodes)for(let Nd of Ad.proxyOf.nodes)Td(Nd)}var Sd=class sS extends sd{append(...Nd){for(let Ld of Nd){let Rd=this.normalize(Ld,this.last);for(let Od of Rd)this.proxyOf.nodes.push(Od)}return this.markDirty(),this}cleanRaws(Nd){if(super.cleanRaws(Nd),this.nodes)for(let Ld of this.nodes)Ld.cleanRaws(Nd)}each(Nd){if(!this.proxyOf.nodes)return;let Ld=this.getIterator(),Rd,Od;for(;this.indexes[Ld]<this.proxyOf.nodes.length&&(Rd=this.indexes[Ld],Od=Nd(this.proxyOf.nodes[Rd],Rd),Od!==!1);)this.indexes[Ld]+=1;return delete this.indexes[Ld],Od}every(Nd){return this.nodes.every(Nd)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let Nd=this.lastEach;return this.indexes[Nd]=0,Nd}getProxyProcessor(){return{get(Nd,Ld){return Ld==="proxyOf"?Nd:Nd[Ld]?Ld==="each"||typeof Ld=="string"&&Ld.startsWith("walk")?(...Rd)=>Nd[Ld](...Rd.map(Od=>typeof Od=="function"?(kd,Fd)=>Od(kd.toProxy(),Fd):Od)):Ld==="every"||Ld==="some"?Rd=>Nd[Ld]((Od,...kd)=>Rd(Od.toProxy(),...kd)):Ld==="root"?()=>Nd.root().toProxy():Ld==="nodes"?Nd.nodes.map(Rd=>Rd.toProxy()):Ld==="first"||Ld==="last"?Nd[Ld].toProxy():Nd[Ld]:Nd[Ld]},set(Nd,Ld,Rd){return Nd[Ld]===Rd||(Nd[Ld]=Rd,(Ld==="name"||Ld==="params"||Ld==="selector")&&Nd.markDirty()),!0}}}index(Nd){return typeo
` ," "];return td.split(rd,nd)},split(rd,nd,ad){let sd=[],ud="",cd=!1,dd=0,pd=!1,fd="",Td=!1;for(let Sd of rd)Td?Td=!1:Sd===" \\ "?Td=!0:pd?Sd===fd&&(pd=!1):Sd==='"'||Sd==="'"?(pd=!0,fd=Sd):Sd==="("?dd+=1:Sd===")"?dd>0&&(dd-=1):dd===0&&nd.includes(Sd)&&(cd=!0),cd?(ud!==""&&sd.push(ud.trim()),ud="",cd=!1):ud+=Sd;return(ad||ud!=="")&&sd.push(ud.trim()),sd}};qa.exports=td,td.default=td}),jt $ 1=y $ 3((Ra,qa)=>{var td=re $ 1(),rd=us(),nd=class extends td{constructor(ad){super(ad),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return rd.comma(this.selector)}set selectors(ad){let sd=this.selector?this.selector.match(/, \s */):null,ud=sd?sd[0]:","+this.raw("between","beforeOpen");this.selector=ad.join(ud)}};qa.exports=nd,nd.default=nd,td.registerRule(nd)}),Ht $ 2=y $ 3((Ra,qa)=>{var td=lt $ 1(),rd=Vt $ 2(),nd=Oe $ 1(),ad=Gt $ 2(),sd=Ae $ 1(),ud=jt $ 1(),cd={empty:!0,space:!0};function dd(fd){for(let Td=fd.length-1;Td>=0;Td--){let Sd=fd[Td],Ad=Sd[3]||Sd[2];if(Ad)return Ad}}var pd=class{constructor(fd){this.input=fd,this.root=new sd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:fd,start:{column:1,line:1,offset:0}}}atrule(fd){let Td=new ad;Td.name=fd[1].slice(1),Td.name===""&&this.unnamedAtrule(Td,fd),this.init(Td,fd[2]);let Sd,Ad,Nd,Ld=!1,Rd=!1,Od=[],kd=[];for(;!this.tokenizer.endOfFile();){if(fd=this.tokenizer.nextToken(),Sd=fd[0],Sd==="("||Sd==="["?kd.push(Sd==="("?")":"]"):Sd==="{"&&kd.length>0?kd.push("}"):Sd===kd[kd.length-1]&&kd.pop(),kd.length===0)if(Sd===";"){Td.source.end=this.getPosition(fd[2]),Td.source.end.offset++,this.semicolon=!0;break}else if(Sd==="{"){Rd=!0;break}else if(Sd==="}"){if(Od.length>0){for(Nd=Od.length-1,Ad=Od[Nd];Ad&&Ad[0]==="space";)Ad=Od[--Nd];Ad&&(Td.source.end=this.getPosition(Ad[3]||Ad[2]),Td.source.end.offset++)}this.end(fd);break}else Od.push(fd);else Od.push(fd);if(this.tokenizer.endOfFile()){Ld=!0;break}}Td.raws.between=this.spacesAndCommentsFromEnd(Od),Od.length?(Td.raws.afterName=this.spacesAndCommentsFromStart(Od),this.raw(Td,"params",Od),Ld&&(fd=Od[Od.length-1],Td.source.end=this.getPosition(fd[3]||fd[2]),Td.source.end.offset++,this.spaces=Td.raws.between,Td.raws.between="")):(Td.raws.afterName="",Td.params=""),Rd&&(Td.nodes=[],this.current=Td)}checkMissedSemicolon(fd){let Td=this.colon(fd);if(Td===!1)return;let Sd=0,Ad;for(let Nd=Td-1;Nd>=0&&(Ad=fd[Nd],!(Ad[0]!=="space"&&(Sd+=1,Sd===2)));Nd--);throw this.input.error("Missed semicolon",Ad[0]==="word"?Ad[3]+1:Ad[2])}colon(fd){let Td=0,Sd,Ad,Nd;for(let[Ld,Rd]of fd.entries()){if(Sd=Rd,Ad=Sd[0],Ad==="("&&(Td+=1),Ad===")"&&(Td-=1),Td===0&&Ad===":")if(!Nd)this.doubleColon(Sd);else{if(Nd[0]==="word"&&Nd[1]==="progid")continue;return Ld}Nd=Sd}return!1}comment(fd){let Td=new nd;this.init(Td,fd[2]),Td.source.end=this.getPosition(fd[3]||fd[2]),Td.source.end.offset++;let Sd=fd[1].slice(2,-2);if(/^ \s * $ /.test(Sd))Td.text="",Td.raws.left=Sd,Td.raws.right="";else{let Ad=Sd.match(/^( \s *)([^]* \S )( \s *) $ /);Td.text=Ad[2],Td.raws.left=Ad[1],Td.raws.right=Ad[3]}}createTokenizer(){this.tokenizer=rd(this.input)}decl(fd,Td){let Sd=new td;this.init(Sd,fd[0][2]);let Ad=fd[fd.length-1];for(Ad[0]===";"&&(this.semicolon=!0,fd.pop()),Sd.source.end=this.getPosition(Ad[3]||Ad[2]||dd(fd)),Sd.source.end.offset++;fd[0][0]!=="word";)fd.length===1&&this.unknownWord(fd),Sd.raws.before+=fd.shift()[1];for(Sd.source.start=this.getPosition(fd[0][2]),Sd.prop="";fd.length;){let Od=fd[0][0];if(Od===":"||Od==="space"||Od==="comment")break;Sd.prop+=fd.shift()[1]}Sd.raws.between="";let Nd;for(;fd.length;)if(Nd=fd.shift(),Nd[0]===":"){Sd.raws.between+=Nd[1];break}else Nd[0]==="word"&&/ \w /.test(Nd[1])&&this.unknownWord([Nd]),Sd.raws.between+=Nd[1];(Sd.prop[0]==="_"||Sd.prop[0]==="*")&&(Sd.raws.before+=Sd.prop[0],Sd.prop=Sd.prop.slice(1));let Ld=[],Rd;for(;fd.length&&(Rd=fd[0][0],!(Rd!=="space"&&Rd!=="comment"));)Ld.push(fd.shift());this.precheckMissedSemicolon(fd);for(let Od=fd.length-1;Od>=0;Od--){if(Nd=fd[Od],Nd[1].toLowerCase()==="!important"){Sd.important=!0;let kd=this.stringFrom(fd,Od);kd=this.spacesFromEnd(fd)+kd,kd!==" !important"&&(Sd.r
` );Od=new Array(Fd.length);let Ud=0;for(let Hd=0,Vd=Fd.length;Hd<Vd;Hd++)Od[Hd]=Ud,Ud+=Fd[Hd].length+1;this[Td]=Od}Rd=Od[Od.length-1];let kd=0;if(Ld>=Rd)kd=Od.length-1;else{let Fd=Od.length-2,Ud;for(;kd<Fd;)if(Ud=kd+(Fd-kd>>1),Ld<Od[Ud])Fd=Ud-1;else if(Ld>=Od[Ud+1])kd=Ud+1;else{kd=Ud;break}}return{col:Ld-Od[kd]+1,line:kd+1}}mapResolve(Ld){return/^ \w +: \/ \/ /.test(Ld)?Ld:ud(this.map.consumer().sourceRoot||this.map.root||".",Ld)}origin(Ld,Rd,Od,kd){if(!this.map)return!1;let Fd=this.map.consumer(),Ud=Fd.originalPositionFor({column:Rd,line:Ld});if(!Ud.source)return!1;let Hd;typeof Od=="number"&&(Hd=Fd.originalPositionFor({column:kd,line:Od}));let Vd;sd(Ud.source)?Vd=ad(Ud.source):Vd=new URL(Ud.source,this.map.consumer().sourceRoot||ad(this.map.mapFile));let Zd={column:Ud.column,endColumn:Hd&&Hd.column,endLine:Hd&&Hd.line,line:Ud.line,url:Vd.toString()};if(Vd.protocol==="file:")if(nd)Zd.file=nd(Vd);else throw new Error("file: protocol is not available in this PostCSS build");let zd=Fd.sourceContentFor(Ud.source);return zd&&(Zd.source=zd),Zd}toJSON(){let Ld={};for(let Rd of["hasBOM","css","file","id"])this[Rd]!=null&&(Ld[Rd]=this[Rd]);return this.map&&(Ld.map={...this.map},Ld.map.consumerCache&&(Ld.map.consumerCache=void 0)),Ld}get from(){return this.file||this.id}};qa.exports=Nd,Nd.default=Nd,dd&&dd.registerInput&&dd.registerInput(Nd)}),pt $ 1=y $ 3((Ra,qa)=>{var td=re $ 1(),rd=Ht $ 2(),nd=Re $ 2();function ad(sd,ud){let cd=new nd(sd,ud),dd=new rd(cd);try{dd.parse()}catch(pd){throw pd}return dd.root}qa.exports=ad,ad.default=ad,td.registerParse(ad)}),no $ 1=y $ 3((Ra,qa)=>{var td=Vt $ 2(),rd=Re $ 2();qa.exports={isInlineComment(nd){if(nd[0]==="word"&&nd[1].slice(0,2)==="//"){let ad=nd,sd=[],ud,cd;for(;nd;){if(/ \r ? \n /.test(nd[1])){if(/['"].* \r ? \n /.test(nd[1])){sd.push(nd[1].substring(0,nd[1].indexOf( `
2024-09-25 14:23:53 +08:00
` ))),cd=nd[1].substring(nd[1].indexOf( `
2024-11-27 11:30:55 +08:00
` ));let pd=this.input.css.valueOf().substring(this.tokenizer.position());cd+=pd,ud=nd[3]+pd.length-cd.length}else this.tokenizer.back(nd);break}sd.push(nd[1]),ud=nd[2],nd=this.tokenizer.nextToken({ignoreUnclosed:!0})}let dd=["comment",sd.join(""),ad[2],ud];return this.inlineComment(dd),cd&&(this.input=new rd(cd),this.tokenizer=td(this.input)),!0}else if(nd[1]==="/"){let ad=this.tokenizer.nextToken({ignoreUnclosed:!0});if(ad[0]==="comment"&&/^ \/ \* /.test(ad[1]))return ad[0]="word",ad[1]=ad[1].slice(1),nd[1]="//",this.tokenizer.back(ad),qa.exports.isInlineComment.bind(this)(nd)}return!1}}}),oo $ 2=y $ 3((Ra,qa)=>{qa.exports={interpolation(td){let rd=[td,this.tokenizer.nextToken()],nd=["word","}"];if(rd[0][1].length>1||rd[1][0]!=="{")return this.tokenizer.back(rd[1]),!1;for(td=this.tokenizer.nextToken();td&&nd.includes(td[0]);)rd.push(td),td=this.tokenizer.nextToken();let ad=rd.map(dd=>dd[1]),[sd]=rd,ud=rd.pop(),cd=["word",ad.join(""),sd[2],ud[2]];return this.tokenizer.back(td),this.tokenizer.back(cd),!0}}}),uo $ 2=y $ 3((Ra,qa)=>{var td=/^#[0-9a-fA-F]{6} $ |^#[0-9a-fA-F]{3} $ /,rd=/ \. [0-9]/,nd=ad=>{let[,sd]=ad,[ud]=sd;return(ud==="."||ud==="#")&&td.test(sd)===!1&&rd.test(sd)===!1};qa.exports={isMixinToken:nd}}),co $ 1=y $ 3((Ra,qa)=>{var td=Vt $ 2(),rd=/^url \( (.+) \) /;qa.exports=nd=>{let{name:ad,params:sd=""}=nd;if(ad==="import"&&sd.length){nd.import=!0;let ud=td({css:sd});for(nd.filename=sd.replace(rd," $ 1");!ud.endOfFile();){let[cd,dd]=ud.nextToken();if(cd==="word"&&dd==="url")return;if(cd==="brackets"){nd.options=dd,nd.filename=sd.replace(dd,"").trim();break}}}}}),mo $ 2=y $ 3((Ra,qa)=>{var td=/: $ /,rd=/^:( \s +)?/;qa.exports=nd=>{let{name:ad,params:sd=""}=nd;if(nd.name.slice(-1)===":"){if(td.test(ad)){let[ud]=ad.match(td);nd.name=ad.replace(ud,""),nd.raws.afterName=ud+(nd.raws.afterName||""),nd.variable=!0,nd.value=nd.params}if(rd.test(sd)){let[ud]=sd.match(rd);nd.value=sd.replace(ud,""),nd.raws.afterName=(nd.raws.afterName||"")+ud,nd.variable=!0}}}}),go $ 2=y $ 3((Ra,qa)=>{var td=Oe $ 1(),rd=Ht $ 2(),{isInlineComment:nd}=no $ 1(),{interpolation:ad}=oo $ 2(),{isMixinToken:sd}=uo $ 2(),ud=co $ 1(),cd=mo $ 2(),dd=/(! \s *important) $ /i;qa.exports=class extends rd{constructor(...pd){super(...pd),this.lastNode=null}atrule(pd){ad.bind(this)(pd)||(super.atrule(pd),ud(this.lastNode),cd(this.lastNode))}decl(...pd){super.decl(...pd),/extend \( .+ \) /i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(pd){pd[0][1]= ` $ { pd [ 0 ] [ 1 ] } ` ;let fd=pd.findIndex(Nd=>Nd[0]==="("),Td=pd.reverse().find(Nd=>Nd[0]===")"),Sd=pd.reverse().indexOf(Td),Ad=pd.splice(fd,Sd).map(Nd=>Nd[1]).join("");for(let Nd of pd.reverse())this.tokenizer.back(Nd);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=Ad}init(pd,fd,Td){super.init(pd,fd,Td),this.lastNode=pd}inlineComment(pd){let fd=new td,Td=pd[1].slice(2);if(this.init(fd,pd[2]),fd.source.end=this.getPosition(pd[3]||pd[2]),fd.inline=!0,fd.raws.begin="//",/^ \s * $ /.test(Td))fd.text="",fd.raws.left=Td,fd.raws.right="";else{let Sd=Td.match(/^( \s *)([^]*[^ \s ])( \s *) $ /);[,fd.raws.left,fd.text,fd.raws.right]=Sd}}mixin(pd){let[fd]=pd,Td=fd[1].slice(0,1),Sd=pd.findIndex(Od=>Od[0]==="brackets"),Ad=pd.findIndex(Od=>Od[0]==="("),Nd="";if((Sd<0||Sd>3)&&Ad>0){let Od=pd.reduce((Qd,hf,bf)=>hf[0]===")"?bf:Qd),kd=pd.slice(Ad,Od+Ad).map(Qd=>Qd[1]).join(""),[Fd]=pd.slice(Ad),Ud=[Fd[2],Fd[3]],[Hd]=pd.slice(Od,Od+1),Vd=[Hd[2],Hd[3]],Zd=["brackets",kd].concat(Ud,Vd),zd=pd.slice(0,Ad),Xd=pd.slice(Od+1);pd=zd,pd.push(Zd),pd=pd.concat(Xd)}let Ld=[];for(let Od of pd)if((Od[1]==="!"||Ld.length)&&Ld.push(Od),Od[1]==="important")break;if(Ld.length){let[Od]=Ld,kd=pd.indexOf(Od),Fd=Ld[Ld.length-1],Ud=[Od[2],Od[3]],Hd=[Fd[4],Fd[5]],Vd=["word",Ld.map(Zd=>Zd[1]).join("")].concat(Ud,Hd);pd.splice(kd,Ld.length,Vd)}let Rd=pd.findIndex(Od=>dd.test(Od[1]));Rd>0&&([,Nd]=pd[Rd],pd.splice(Rd,1));for(let Od of pd.reverse())this.tokenizer.back(Od);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=Td,Nd&&(this.lastNode.important=!0,this.lastNode.raws.important=Nd)}other(pd){nd.bind(this)(pd)||super.other(pd)}rule(pd){let
https : //evilmartians.com/chronicles/postcss-8-plugin-migration`));let Qd=Hd(...Xd);return Qd.postcssPlugin=Ud,Qd.postcssVersion=new sd().version,Qd}let zd;return Object.defineProperty(Zd,"postcss",{get(){return zd||(zd=Zd()),zd}}),Zd.process=function(Xd,Qd,hf){return Fd([Zd(hf)]).process(Xd,Qd)},Zd},Fd.stringify=ud,Fd.parse=Nd,Fd.fromJSON=cd,Fd.list=Ld,Fd.comment=Ud=>new fd(Ud),Fd.atRule=Ud=>new Td(Ud),Fd.decl=Ud=>new rd(Ud),Fd.rule=Ud=>new Rd(Ud),Fd.root=Ud=>new Od(Ud),Fd.document=Ud=>new dd(Ud),Fd.CssSyntaxError=td,Fd.Declaration=rd,Fd.Container=ad,Fd.Processor=sd,Fd.Document=dd,Fd.Comment=fd,Fd.Warning=pd,Fd.AtRule=Td,Fd.Result=Sd,Fd.Input=Ad,Fd.Rule=Rd,Fd.Root=Od,Fd.Node=kd,nd.registerPostcss(Fd),qa.exports=Fd,Fd.default=Fd}),Ho$2=y$3((Ra,qa)=>{var{Container:td}=Zt$1(),rd=class extends td{constructor(nd){super(nd),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};qa.exports=rd}),Jo$1=y$3((Ra,qa)=>{var td=/[\t\n\f\r "#'()/;[\\\]{}]/g,rd=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,nd=/.[\r\n"'(/\\]/,ad=/[\da-f]/i,sd=/[\n\f\r]/g;qa.exports=function(ud,cd={}){let dd=ud.css.valueOf(),pd=cd.ignoreErrors,fd,Td,Sd,Ad,Nd,Ld,Rd,Od,kd,Fd=dd.length,Ud=0,Hd=[],Vd=[],Zd;function zd(){return Ud}function Xd(_f){throw ud.error("Unclosed "+_f,Ud)}function Qd(){return Vd.length===0&&Ud>=Fd}function hf(){let _f=1,gf=!1,xf=!1;for(;_f>0;)Td+=1,dd.length<=Td&&Xd("interpolation"),fd=dd.charCodeAt(Td),Od=dd.charCodeAt(Td+1),gf?!xf&&fd===gf?(gf=!1,xf=!1):fd===92?xf=!xf:xf&&(xf=!1):fd===39||fd===34?gf=fd:fd===125?_f-=1:fd===35&&Od===123&&(_f+=1)}function bf(_f){if(Vd.length)return Vd.pop();if(Ud>=Fd)return;let gf=_f?_f.ignoreUnclosed:!1;switch(fd=dd.charCodeAt(Ud),fd){case 10:case 32:case 9:case 13:case 12:{Td=Ud;do Td+=1,fd=dd.charCodeAt(Td);while(fd===32||fd===10||fd===9||fd===13||fd===12);kd=["space",dd.slice(Ud,Td)],Ud=Td-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let xf=String.fromCharCode(fd);kd=[xf,xf,Ud];break}case 44:{kd=["word",",",Ud,Ud+1];break}case 40:{if(Rd=Hd.length?Hd.pop()[1]:"",Od=dd.charCodeAt(Ud+1),Rd==="url"&&Od!==39&&Od!==34){for(Zd=1,Ld=!1,Td=Ud+1;Td<=dd.length-1;){if(Od=dd.charCodeAt(Td),Od===92)Ld=!Ld;else if(Od===40)Zd+=1;else if(Od===41&&(Zd-=1,Zd===0))break;Td+=1}Ad=dd.slice(Ud,Td+1),kd=["brackets",Ad,Ud,Td],Ud=Td}else Td=dd.indexOf(")",Ud+1),Ad=dd.slice(Ud,Td+1),Td===-1||nd.test(Ad)?kd=["(","(",Ud]:(kd=["brackets",Ad,Ud,Td],Ud=Td);break}case 39:case 34:{for(Sd=fd,Td=Ud,Ld=!1;Td<Fd&&(Td++,Td===Fd&&Xd("string"),fd=dd.charCodeAt(Td),Od=dd.charCodeAt(Td+1),!(!Ld&&fd===Sd));)fd===92?Ld=!Ld:Ld?Ld=!1:fd===35&&Od===123&&hf();kd=["string",dd.slice(Ud,Td+1),Ud,Td],Ud=Td;break}case 64:{td.lastIndex=Ud+1,td.test(dd),td.lastIndex===0?Td=dd.length-1:Td=td.lastIndex-2,kd=["at-word",dd.slice(Ud,Td+1),Ud,Td],Ud=Td;break}case 92:{for(Td=Ud,Nd=!0;dd.charCodeAt(Td+1)===92;)Td+=1,Nd=!Nd;if(fd=dd.charCodeAt(Td+1),Nd&&fd!==47&&fd!==32&&fd!==10&&fd!==9&&fd!==13&&fd!==12&&(Td+=1,ad.test(dd.charAt(Td)))){for(;ad.test(dd.charAt(Td+1));)Td+=1;dd.charCodeAt(Td+1)===32&&(Td+=1)}kd=["word",dd.slice(Ud,Td+1),Ud,Td],Ud=Td;break}default:Od=dd.charCodeAt(Ud+1),fd===35&&Od===123?(Td=Ud,hf(),Ad=dd.slice(Ud,Td+1),kd=["word",Ad,Ud,Td],Ud=Td):fd===47&&Od===42?(Td=dd.indexOf("*/",Ud+2)+1,Td===0&&(pd||gf?Td=dd.length:Xd("comment")),kd=["comment",dd.slice(Ud,Td+1),Ud,Td],Ud=Td):fd===47&&Od===47?(sd.lastIndex=Ud+1,sd.test(dd),sd.lastIndex===0?Td=dd.length-1:Td=sd.lastIndex-2,Ad=dd.slice(Ud,Td+1),kd=["comment",Ad,Ud,Td,"inline"],Ud=Td):(rd.lastIndex=Ud+1,rd.test(dd),rd.lastIndex===0?Td=dd.length-1:Td=rd.lastIndex-2,kd=["word",dd.slice(Ud,Td+1),Ud,Td],Hd.push(kd),Ud=Td);break}return Ud++,kd}function yf(_f){Vd.push(_f)}return{back:yf,endOfFile:Qd,nextToken:bf,position:zd}}}),Zo$1=y$3((Ra,qa)=>{var{Comment:td}=Zt$1(),rd=Ht$2(),nd=Ho$2(),ad=Jo$1(),sd=class extends rd{atrule(ud){let cd=ud[1],dd=ud;for(;!this.tokenizer.endOfFile();){let pd=this.tokenizer.nextToken();if(pd[0]==="word"&&pd[2]===dd[3]+1)cd+=pd[1],dd=pd;else{this.tokenizer.back(pd);break}}super.atrule(["at-word",cd,ud[2],dd[3]])}comment(ud){if(ud[4]==="inline"){let c
` ))break;fd[0]==="("?dd+=1:fd[0]===")"?dd-=1:dd===0&&fd[0]===":"&&(cd=!0)}if(!cd||pd.trim()===""||/^[#:A-Za-z-]/.test(pd))super.rule(ud);else{ud.pop();let fd=new nd;this.init(fd,ud[0][2]);let Td;for(let Ad=ud.length-1;Ad>=0;Ad--)if(ud[Ad][0]!=="space"){Td=ud[Ad];break}if(Td[3]){let Ad=this.input.fromOffset(Td[3]);fd.source.end={column:Ad.col,line:Ad.line,offset:Td[3]+1}}else{let Ad=this.input.fromOffset(Td[2]);fd.source.end={column:Ad.col,line:Ad.line,offset:Td[2]+1}}for(;ud[0][0]!=="word";)fd.raws.before+=ud.shift()[1];if(ud[0][2]){let Ad=this.input.fromOffset(ud[0][2]);fd.source.start={column:Ad.col,line:Ad.line,offset:ud[0][2]}}for(fd.prop="";ud.length;){let Ad=ud[0][0];if(Ad===":"||Ad==="space"||Ad==="comment")break;fd.prop+=ud.shift()[1]}fd.raws.between="";let Sd;for(;ud.length;)if(Sd=ud.shift(),Sd[0]===":"){fd.raws.between+=Sd[1];break}else fd.raws.between+=Sd[1];(fd.prop[0]==="_"||fd.prop[0]==="*")&&(fd.raws.before+=fd.prop[0],fd.prop=fd.prop.slice(1)),fd.raws.between+=this.spacesAndCommentsFromStart(ud),this.precheckMissedSemicolon(ud);for(let Ad=ud.length-1;Ad>0;Ad--){if(Sd=ud[Ad],Sd[1]==="!important"){fd.important=!0;let Nd=this.stringFrom(ud,Ad);Nd=this.spacesFromEnd(ud)+Nd,Nd!==" !important"&&(fd.raws.important=Nd);break}else if(Sd[1]==="important"){let Nd=ud.slice(0),Ld="";for(let Rd=Ad;Rd>0;Rd--){let Od=Nd[Rd][0];if(Ld.trim().indexOf("!")===0&&Od!=="space")break;Ld=Nd.pop()[1]+Ld}Ld.trim().indexOf("!")===0&&(fd.important=!0,fd.raws.important=Ld,ud=Nd)}if(Sd[0]!=="space"&&Sd[0]!=="comment")break}this.raw(fd,"value",ud),fd.value.includes(":")&&this.checkMissedSemicolon(ud),this.current=fd}}};qa.exports=sd}),ta=y $ 3((Ra,qa)=>{var{Input:td}=Zt $ 1(),rd=Zo $ 1();qa.exports=function(nd,ad){let sd=new td(nd,ad),ud=new rd(sd);return ud.parse(),ud.root}}),Os=y $ 3(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0});function qa(td){this.after=td.after,this.before=td.before,this.type=td.type,this.value=td.value,this.sourceIndex=td.sourceIndex}Ra.default=qa}),As=y $ 3(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0});var qa=Os(),td=rd(qa);function rd(ad){return ad&&ad.__esModule?ad:{default:ad}}function nd(ad){var sd=this;this.constructor(ad),this.nodes=ad.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(ud){ud.parent=sd})}nd.prototype=Object.create(td.default.prototype),nd.constructor=td.default,nd.prototype.walk=function(ad,sd){for(var ud=typeof ad=="string"||ad instanceof RegExp,cd=ud?sd:ad,dd=typeof ad=="string"?new RegExp(ad):ad,pd=0;pd<this.nodes.length;pd++){var fd=this.nodes[pd],Td=ud?dd.test(fd.type):!0;if(Td&&cd&&cd(fd,pd,this.nodes)===!1||fd.nodes&&fd.walk(ad,sd)===!1)return!1}return!0},nd.prototype.each=function(){for(var ad=arguments.length<=0||arguments[0]===void 0?function(){}:arguments[0],sd=0;sd<this.nodes.length;sd++){var ud=this.nodes[sd];if(ad(ud,sd,this.nodes)===!1)return!1}return!0},Ra.default=nd}),aa $ 1=y $ 3(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.parseMediaFeature=sd,Ra.parseMediaQuery=ud,Ra.parseMediaList=cd;var qa=Os(),td=ad(qa),rd=As(),nd=ad(rd);function ad(dd){return dd&&dd.__esModule?dd:{default:dd}}function sd(dd){var pd=arguments.length<=1||arguments[1]===void 0?0:arguments[1],fd=[{mode:"normal",character:null}],Td=[],Sd=0,Ad="",Nd=null,Ld=null,Rd=pd,Od=dd;dd[0]==="("&&dd[dd.length-1]===")"&&(Od=dd.substring(1,dd.length-1),Rd++);for(var kd=0;kd<Od.length;kd++){var Fd=Od[kd];if((Fd==="'"||Fd==='"')&&(fd[Sd].isCalculationEnabled===!0?(fd.push({mode:"string",isCalculationEnabled:!1,character:Fd}),Sd++):fd[Sd].mode==="string"&&fd[Sd].character===Fd&&Od[kd-1]!==" \\ "&&(fd.pop(),Sd--)),Fd==="{"?(fd.push({mode:"interpolation",isCalculationEnabled:!0}),Sd++):Fd==="}"&&(fd.pop(),Sd--),fd[Sd].mode==="normal"&&Fd===":"){var Ud=Od.substring(kd+1);Ld={type:"value",before:/^( \s *)/.exec(Ud)[1],after:/( \s *) $ /.exec(Ud)[1],value:Ud.trim()},Ld.sourceIndex=Ld.before.length
` ),Yf=Mf.length-1,Yf>0?(Bf=vf+Yf,Df=gf-Mf[Yf].length):(Bf=vf,Df=Tf),bf.push(["comment",Qf,vf,Pf-Tf,Bf,gf-Df,Pf]),Tf=Df,vf=Bf,Pf=gf):(Xd.lastIndex=Pf+1,Xd.test(yf),Xd.lastIndex===0?gf=yf.length-1:gf=Xd.lastIndex-2,bf.push(["word",yf.slice(Pf,gf+1),vf,Pf-Tf,vf,gf-Tf,Pf]),Pf=gf);break}Pf++}return bf}qa.exports=Ra.default}),tu $ 2=y $ 3((Ra,qa)=>{Ra.__esModule=!0;var td=function(){function Tf(vf,Pf){for(var Gf=0;Gf<Pf.length;Gf++){var ah=Pf[Gf];ah.enumerable=ah.enumerable||!1,ah.configurable=!0,"value"in ah&&(ah.writable=!0),Object.defineProperty(vf,ah.key,ah)}}return function(vf,Pf,Gf){return Pf&&Tf(vf.prototype,Pf),Gf&&Tf(vf,Gf),vf}}(),rd=qs(),nd= $ f(rd),ad=Ls(),sd= $ f(ad),ud=Ds $ 1(),cd= $ f(ud),dd=ga $ 1(),pd= $ f(dd),fd=xa(),Td= $ f(fd),Sd=ka(),Ad= $ f(Sd),Nd=Sa(),Ld= $ f(Nd),Rd=Oa $ 1(),Od= $ f(Rd),kd=Aa(),Fd= $ f(kd),Ud=Pa $ 1(),Hd= $ f(Ud),Vd=Ia(),Zd= $ f(Vd),zd=La(),Xd= $ f(zd),Qd=Ma(),hf= $ f(Qd),bf=Ua $ 1(),yf= $ f(bf),_f= $ a $ 1(),gf= $ f(_f),xf=Ya $ 1(),Mf= $ f(xf),Yf=Xa $ 1(),Qf= $ f(Yf),qf=D $ 1(),Bf=Df(qf);function Df(Tf){if(Tf&&Tf.__esModule)return Tf;var vf={};if(Tf!=null)for(var Pf in Tf)Object.prototype.hasOwnProperty.call(Tf,Pf)&&(vf[Pf]=Tf[Pf]);return vf.default=Tf,vf}function $ f(Tf){return Tf&&Tf.__esModule?Tf:{default:Tf}}function Zf(Tf,vf){if(!(Tf instanceof vf))throw new TypeError("Cannot call a class as a function")}var Xf=function(){function Tf(vf){Zf(this,Tf),this.input=vf,this.lossy=vf.options.lossless===!1,this.position=0,this.root=new pd.default;var Pf=new Td.default;return this.root.append(Pf),this.current=Pf,this.lossy?this.tokens=(0,Qf.default)({safe:vf.safe,css:vf.css.trim()}):this.tokens=(0,Qf.default)(vf),this.loop()}return Tf.prototype.attribute=function(){var vf="",Pf=void 0,Gf=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[0]!=="]";)vf+=this.tokens[this.position][1],this.position++;this.position===this.tokens.length&&!~vf.indexOf("]")&&this.error("Expected a closing square bracket.");var ah=vf.split(/((?:[*~^ $ |]?=))([^]*)/),Wf=ah[0].split(/( \| )/g),Rf={operator:ah[1],value:ah[2],source:{start:{line:Gf[2],column:Gf[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:Gf[4]};if(Wf.length>1?(Wf[0]===""&&(Wf[0]=!0),Rf.attribute=this.parseValue(Wf[2]),Rf.namespace=this.parseNamespace(Wf[0])):Rf.attribute=this.parseValue(ah[0]),Pf=new Xd.default(Rf),ah[2]){var Vf=ah[2].split(/( \s +i \s *?) $ /),lh=Vf[0].trim();Pf.value=this.lossy?lh:Vf[0],Vf[1]&&(Pf.insensitive=!0,this.lossy||(Pf.raws.insensitive=Vf[1])),Pf.quoted=lh[0]==="'"||lh[0]==='"',Pf.raws.unquoted=Pf.quoted?lh.slice(1,-1):lh}this.newNode(Pf),this.position++},Tf.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var vf=new yf.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position<this.tokens.length&&this.currToken&&(this.currToken[0]==="space"||this.currToken[0]==="combinator");)this.nextToken&&this.nextToken[0]==="combinator"?(vf.spaces.before=this.parseSpace(this.currToken[1]),vf.source.start.line=this.nextToken[2],vf.source.start.column=this.nextToken[3],vf.source.end.column=this.nextToken[3],vf.source.end.line=this.nextToken[2],vf.sourceIndex=this.nextToken[4]):this.prevToken&&this.prevToken[0]==="combinator"?vf.spaces.after=this.parseSpace(this.currToken[1]):this.currToken[0]==="combinator"?vf.value=this.currToken[1]:this.currToken[0]==="space"&&(vf.value=this.parseSpace(this.currToken[1]," ")),this.position++;return this.newNode(vf)},Tf.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}var vf=new Td.default;this.current.parent.append(vf),this.current=vf,this.position++},Tf.prototype.comment=function(){var vf=new Ld.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]});this.newNode(vf),this.position++},Tf.prototype.error=function(vf){throw new this.input.error(vf)},Tf.prototype.
` ?(ad=1,sd+=1):ad+=1;return{line:sd,column:ad}}positionBy(rd){let nd=this.source.start;if(Object(rd).index)nd=this.positionInside(rd.index);else if(Object(rd).word){let ad=this.toString().indexOf(rd.word);ad!==-1&&(nd=this.positionInside(ad))}return nd}}}),U $ 2=y $ 3((Ra,qa)=>{var td=z $ 2(),rd=class extends td{constructor(nd){super(nd),this.nodes||(this.nodes=[])}push(nd){return nd.parent=this,this.nodes.push(nd),this}each(nd){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let ad=this.lastEach,sd,ud;if(this.indexes[ad]=0,!!this.nodes){for(;this.indexes[ad]<this.nodes.length&&(sd=this.indexes[ad],ud=nd(this.nodes[sd],sd),ud!==!1);)this.indexes[ad]+=1;return delete this.indexes[ad],ud}}walk(nd){return this.each((ad,sd)=>{let ud=nd(ad,sd);return ud!==!1&&ad.walk&&(ud=ad.walk(nd)),ud})}walkType(nd,ad){if(!nd||!ad)throw new Error("Parameters {type} and {callback} are required.");let sd=typeof nd=="function";return this.walk((ud,cd)=>{if(sd&&ud instanceof nd||!sd&&ud.type===nd)return ad.call(this,ud,cd)})}append(nd){return nd.parent=this,this.nodes.push(nd),this}prepend(nd){return nd.parent=this,this.nodes.unshift(nd),this}cleanRaws(nd){if(super.cleanRaws(nd),this.nodes)for(let ad of this.nodes)ad.cleanRaws(nd)}insertAfter(nd,ad){let sd=this.index(nd),ud;this.nodes.splice(sd+1,0,ad);for(let cd in this.indexes)ud=this.indexes[cd],sd<=ud&&(this.indexes[cd]=ud+this.nodes.length);return this}insertBefore(nd,ad){let sd=this.index(nd),ud;this.nodes.splice(sd,0,ad);for(let cd in this.indexes)ud=this.indexes[cd],sd<=ud&&(this.indexes[cd]=ud+this.nodes.length);return this}removeChild(nd){nd=this.index(nd),this.nodes[nd].parent=void 0,this.nodes.splice(nd,1);let ad;for(let sd in this.indexes)ad=this.indexes[sd],ad>=nd&&(this.indexes[sd]=ad-1);return this}removeAll(){for(let nd of this.nodes)nd.parent=void 0;return this.nodes=[],this}every(nd){return this.nodes.every(nd)}some(nd){return this.nodes.some(nd)}index(nd){return typeof nd=="number"?nd:this.nodes.indexOf(nd)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let nd=this.nodes.map(String).join("");return this.value&&(nd=this.value+nd),this.raws.before&&(nd=this.raws.before+nd),this.raws.after&&(nd+=this.raws.after),nd}};rd.registerWalker=nd=>{let ad="walk"+nd.name;ad.lastIndexOf("s")!==ad.length-1&&(ad+="s"),!rd.prototype[ad]&&(rd.prototype[ad]=function(sd){return this.walkType(nd,sd)})},qa.exports=rd}),uu $ 2=y $ 3((Ra,qa)=>{var td=U $ 2();qa.exports=class extends td{constructor(rd){super(rd),this.type="root"}}}),cu $ 2=y $ 3((Ra,qa)=>{var td=U $ 2();qa.exports=class extends td{constructor(rd){super(rd),this.type="value",this.unbalanced=0}}}),hu $ 2=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=class extends td{constructor(nd){super(nd),this.type="atword"}toString(){return this.quoted&&this.raws.quote,[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};td.registerWalker(rd),qa.exports=rd}),mu $ 1=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=z $ 2(),nd=class extends rd{constructor(ad){super(ad),this.type="colon"}};td.registerWalker(nd),qa.exports=nd}),wu $ 2=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=z $ 2(),nd=class extends rd{constructor(ad){super(ad),this.type="comma"}};td.registerWalker(nd),qa.exports=nd}),vu $ 1=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=z $ 2(),nd=class extends rd{constructor(ad){super(ad),this.type="comment",this.inline=Object(ad).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};td.registerWalker(nd),qa.exports=nd}),_u $ 1=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=class extends td{constructor(nd){super(nd),this.type="func",this.unbalanced=-1}};td.registerWalker(rd),qa.exports=rd}),Eu $ 1=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=z $ 2(),nd=class extends rd{constructor(ad){super(ad),this.type="number",this.unit=Object(ad).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};td.registerWalker(nd),qa.exports=nd}),Tu $ 1=y $ 3((Ra,qa)=>{var td=U $ 2(),rd=z $ 2(),nd=class extends rd{constructor(ad){super(a
` ,Nd+2);kd=yf!==-1?yf-1:Td}Vd=fd.slice(Nd,kd+1),Ud=Vd.split( `
` ),Hd=Ud.length-1,Hd>0?(Zd=Ad+Hd,zd=kd-Ud[Hd].length):(Zd=Ad,zd=Sd),pd.push(["comment",Vd,Ad,Nd-Sd,Zd,kd-zd,Nd]),Sd=zd,Ad=Zd,Nd=kd}else if(Od===35&&!ad.test(fd.slice(Nd+1,Nd+2)))kd=Nd+1,pd.push(["#",fd.slice(Nd,kd),Ad,Nd-Sd,Ad,kd-Sd,Nd]),Nd=kd-1;else if((Od===117||Od===85)&&fd.charCodeAt(Nd+1)===43){kd=Nd+2;do kd+=1,Od=fd.charCodeAt(kd);while(kd<Td&&sd.test(fd.slice(kd,kd+1)));pd.push(["unicoderange",fd.slice(Nd,kd),Ad,Nd-Sd,Ad,kd-Sd,Nd]),Nd=kd-1}else if(Od===47)kd=Nd+1,pd.push(["operator",fd.slice(Nd,kd),Ad,Nd-Sd,Ad,kd-Sd,Nd]),Nd=kd-1;else{let yf=rd;if(Od>=48&&Od<=57&&(yf=nd),yf.lastIndex=Nd+1,yf.test(fd),yf.lastIndex===0?kd=fd.length-1:kd=yf.lastIndex-2,yf===nd||Od===46){let _f=fd.charCodeAt(kd),gf=fd.charCodeAt(kd+1),xf=fd.charCodeAt(kd+2);(_f===101||_f===69)&&(gf===45||gf===43)&&xf>=48&&xf<=57&&(nd.lastIndex=kd+2,nd.test(fd),nd.lastIndex===0?kd=fd.length-1:kd=nd.lastIndex-2)}pd.push(["word",fd.slice(Nd,kd+1),Ad,Nd-Sd,Ad,kd-Sd,Nd]),Nd=kd}break}Nd++}return pd}}), $ u $ 1=y $ 3((Ra,qa)=>{var td=class extends Error{constructor(rd){super(rd),this.name=this.constructor.name,this.message=rd||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(rd).stack}};qa.exports=td}),Vu $ 1=y $ 3((Ra,qa)=>{var td=uu $ 2(),rd=cu $ 2(),nd=hu $ 2(),ad=mu $ 1(),sd=wu $ 2(),ud=vu $ 1(),cd=_u $ 1(),dd=Eu $ 1(),pd=Tu $ 1(),fd=Cu $ 2(),Td=Nu $ 1(),Sd=Ru $ 1(),Ad=qu $ 1(),Nd=Uu $ 1(),Ld=qs(),Rd=Ls(),Od=Ds $ 1(),kd= $ u $ 1();function Fd(Ud){return Ud.sort((Hd,Vd)=>Hd-Vd)}qa.exports=class{constructor(Ud,Hd){let Vd={loose:!1};this.cache=[],this.input=Ud,this.options=Object.assign({},Vd,Hd),this.position=0,this.unbalanced=0,this.root=new td;let Zd=new rd;this.root.append(Zd),this.current=Zd,this.tokens=Nd(Ud,this.options)}parse(){return this.loop()}colon(){let Ud=this.currToken;this.newNode(new ad({value:Ud[1],source:{start:{line:Ud[2],column:Ud[3]},end:{line:Ud[4],column:Ud[5]}},sourceIndex:Ud[6]})),this.position++}comma(){let Ud=this.currToken;this.newNode(new sd({value:Ud[1],source:{start:{line:Ud[2],column:Ud[3]},end:{line:Ud[4],column:Ud[5]}},sourceIndex:Ud[6]})),this.position++}comment(){let Ud=!1,Hd=this.currToken[1].replace(/ \/ \* | \* \/ /g,""),Vd;this.options.loose&&Hd.startsWith("//")&&(Hd=Hd.substring(2),Ud=!0),Vd=new ud({value:Hd,inline:Ud,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(Vd),this.position++}error(Ud,Hd){throw new kd(Ud+ ` at line : $ { Hd [ 2 ] } , column $ { Hd [ 3 ] } ` )}loop(){for(;this.position<this.tokens.length;)this.parseTokens();return!this.current.last&&this.spaces?this.current.raws.before+=this.spaces:this.spaces&&(this.current.last.raws.after+=this.spaces),this.spaces="",this.root}operator(){let Ud=this.currToken[1],Hd;if(Ud==="+"||Ud==="-"){if(this.options.loose||this.position>0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return Hd=new pd({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(Hd)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"
2024-09-25 14:23:53 +08:00
Expected it to be 'string' or 'object' . ` ;if(Ve $ 1(Ra))throw new Error("doc is valid.");let td=Object.prototype.toString.call(Ra);if(td!=="[object Object]")return ` Unexpected doc '${td}' . ` ;let rd=ml([...bt $ 2].map(nd=> ` '${nd}' ` ));return ` Unexpected doc . type '${Ra.type}' .
Expected it to be $ { rd } . ` }var Fr $ 1=class extends Error{constructor(td){super(yl(td));Qm(this,"name","InvalidDocError");this.doc=td}}, $ r $ 1=Fr $ 1,Zs=()=>{},_t $ 1=Zs;function q $ 2(Ra){return{type:we $ 1,contents:Ra}}function en $ 1(Ra,qa){return{type:ge $ 1,contents:qa,n:Ra}}function L $ 2(Ra,qa={}){return _t $ 1(qa.expandedStates),{type:ve $ 1,id:qa.id,contents:Ra,break:!!qa.shouldBreak,expandedStates:qa.expandedStates}}function tn $ 1(Ra){return en $ 1({type:"root"},Ra)}function ue $ 1(Ra){return en $ 1(-1,Ra)}function Ge $ 1(Ra){return{type:xe $ 2,parts:Ra}}function kt $ 2(Ra,qa="",td={}){return{type:oe $ 1,breakContents:Ra,flatContents:qa,groupId:td.groupId}}var je $ 2={type:be $ 2},wl={type:K $ 1,hard:!0},A $ 1={type:K $ 1},M $ 2={type:K $ 1,soft:!0},E $ 1=[wl,je $ 2];function V $ 2(Ra,qa){let td=[];for(let rd=0;rd<qa.length;rd++)rd!==0&&td.push(Ra),td.push(qa[rd]);return td}var gl=(Ra,qa,td)=>{if(!(Ra&&qa==null))return Array.isArray(qa)||typeof qa=="string"?qa[td<0?qa.length+td:td]:qa.at(td)},G $ 2=gl;function vl(Ra,qa){if(typeof Ra=="string")return qa(Ra);let td=new Map;return rd(Ra);function rd(ad){if(td.has(ad))return td.get(ad);let sd=nd(ad);return td.set(ad,sd),sd}function nd(ad){switch(Ve $ 1(ad)){case Be $ 1:return qa(ad.map(rd));case xe $ 2:return qa({...ad,parts:ad.parts.map(rd)});case oe $ 1:return qa({...ad,breakContents:rd(ad.breakContents),flatContents:rd(ad.flatContents)});case ve $ 1:{let{expandedStates:sd,contents:ud}=ad;return sd?(sd=sd.map(rd),ud=sd[0]):ud=rd(ud),qa({...ad,contents:ud,expandedStates:sd})}case ge $ 1:case we $ 1:case $ e $ 2:case ze $ 1:case We $ 1:return qa({...ad,contents:rd(ad.contents)});case Me $ 2:case Ue $ 1:case Fe $ 1:case Ye $ 1:case K $ 1:case be $ 2:return qa(ad);default:throw new $ r $ 1(ad)}}}function xl $ 1(Ra){return Ra.type===K $ 1&&!Ra.hard?Ra.soft?"":" ":Ra.type===oe $ 1?Ra.flatContents:Ra}function rn $ 1(Ra){return vl(Ra,xl $ 1)}function bl(Ra){return Array.isArray(Ra)&&Ra.length>0}var ee $ 1=bl,Et $ 1="'",sn='"';function _l(Ra,qa){let td=qa===!0||qa===Et $ 1?Et $ 1:sn,rd=td===Et $ 1?sn:Et $ 1,nd=0,ad=0;for(let sd of Ra)sd===td?nd++:sd===rd&&ad++;return nd>ad?rd:td}var nn $ 1=_l;function kl $ 1(Ra,qa,td){let rd=qa==='"'?"'":'"',nd=_ $ 3(!1,Ra,/ \\ (.)|(["'])/gsu,(ad,sd,ud)=>sd===rd?sd:ud===qa?" \\ "+ud:ud||(td&&/^[^ \n \r "'0-7 \\ bfnrt-vx \u 2028 \u 2029] $ /u.test(sd)?sd:" \\ "+sd));return qa+nd+qa}var on=kl $ 1;function El $ 1(Ra,qa){let td=Ra.slice(1,-1),rd=qa.parser==="json"||qa.parser==="jsonc"||qa.parser==="json5"&&qa.quoteProps==="preserve"&&!qa.singleQuote?'"':qa.__isInHtmlAttribute?"'":nn $ 1(td,qa.singleQuote);return on(td,rd,!(qa.parser==="css"||qa.parser==="less"||qa.parser==="scss"||qa.__embeddedInHtml))}var St $ 1=El $ 1,Wr $ 1=class extends Error{constructor(td,rd,nd="type"){super( ` Unexpected $ { rd } node $ { nd } : $ { JSON . stringify ( td [ nd ] ) } . ` );Qm(this,"name","UnexpectedNodeError");this.node=td}},an $ 1=Wr $ 1;function Sl(Ra){return(Ra==null?void 0:Ra.type)==="front-matter"}var _e $ 1=Sl,Tl=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function un $ 1(Ra,qa,td){if(_e $ 1(Ra)&&Ra.language==="yaml"&&delete qa.value,Ra.type==="css-comment"&&td.type==="css-root"&&td.nodes.length>0&&((td.nodes[0]===Ra||_e $ 1(td.nodes[0])&&td.nodes[1]===Ra)&&(delete qa.text,/^ \* \s *@(?:format|prettier) \s * $ /u.test(Ra.text))||td.type==="css-root"&&G $ 2(!1,td.nodes,-1)===Ra))return null;if(Ra.type==="value-root"&&delete qa.text,(Ra.type==="media-query"||Ra.type==="media-query-list"||Ra.type==="media-feature-expression")&&delete qa.value,Ra.type==="css-rule"&&delete qa.params,(Ra.type==="media-feature"||Ra.type==="media-keyword"||Ra.type==="media-type"||Ra.type==="media-unknown"||Ra.type==="media-url"||Ra.type==="media-value"||Ra.type==="selector-attribute"||Ra.type==="selector-string"||Ra.type==="selector-class"||Ra.type==="selector-combinator"||Ra.type==="value-string")&&Ra.value&&(qa.value=Ol $ 1(Ra.value)),Ra.type==="selector-combinator"&&(qa.value=_ $ 3(!1,qa.value,/ \s +/gu," ")),Ra.type==="media-feature"&&(qa.value=_ $ 3(!1,qa.value," ","")),(Ra.type==="value-word"&&(Ra.isColor&&Ra.isHex||["initial","inherit","unset","revert"].includes(Ra.value.toLowerCase()))||Ra.type==="media-feature"||Ra.type
` ,td)+1;return td+Ra.column}var zr $ 1=Il;function Tt $ 2(Ra){return(qa,td,rd)=>{let nd=!!(rd!=null&&rd.backwards);if(td===!1)return!1;let{length:ad}=qa,sd=td;for(;sd>=0&&sd<ad;){let ud=qa.charAt(sd);if(Ra instanceof RegExp){if(!Ra.test(ud))return sd}else if(!Ra.includes(ud))return sd;nd?sd--:sd++}return sd===-1||sd===ad?sd:!1}}var Ot $ 2=Tt $ 2(" "),yn $ 1=Tt $ 2(",; "),Ct $ 1=Tt $ 2(/[^ \n \r ]/u);function wn $ 2(Ra,qa){var td,rd,nd;if(typeof((rd=(td=Ra.source)==null?void 0:td.start)==null?void 0:rd.offset)=="number")return Ra.source.start.offset;if(typeof Ra.sourceIndex=="number")return Ra.sourceIndex;if((nd=Ra.source)!=null&&nd.start)return zr $ 1(Ra.source.start,qa);throw Object.assign(new Error("Can not locate node."),{node:Ra})}function Vr $ 1(Ra,qa){var td,rd;if(Ra.type==="css-comment"&&Ra.inline)return Ct $ 1(qa,Ra.source.startOffset);if(typeof((rd=(td=Ra.source)==null?void 0:td.end)==null?void 0:rd.offset)=="number")return Ra.source.end.offset;if(Ra.source){if(Ra.source.end)return zr $ 1(Ra.source.end,qa);if(ee $ 1(Ra.nodes))return Vr $ 1(G $ 2(!1,Ra.nodes,-1),qa)}return null}function Gr $ 1(Ra,qa){Ra.source&&(Ra.source.startOffset=wn $ 2(Ra,qa),Ra.source.endOffset=Vr $ 1(Ra,qa));for(let td in Ra){let rd=Ra[td];td==="source"||!rd||typeof rd!="object"||(rd.type==="value-root"||rd.type==="value-unknown"?gn $ 2(rd,ql(Ra),rd.text||rd.value):Gr $ 1(rd,qa))}}function gn $ 2(Ra,qa,td){Ra.source&&(Ra.source.startOffset=wn $ 2(Ra,td)+qa,Ra.source.endOffset=Vr $ 1(Ra,td)+qa);for(let rd in Ra){let nd=Ra[rd];rd==="source"||!nd||typeof nd!="object"||gn $ 2(nd,qa,td)}}function ql(Ra){var qa;let td=Ra.source.startOffset;return typeof Ra.prop=="string"&&(td+=Ra.prop.length),Ra.type==="css-atrule"&&typeof Ra.name=="string"&&(td+=1+Ra.name.length+Ra.raws.afterName.match(/^ \s *:? \s */u)[0].length),Ra.type!=="css-atrule"&&typeof((qa=Ra.raws)==null?void 0:qa.between)=="string"&&(td+=Ra.raws.between.length),td}function vn $ 1(Ra){let qa="initial",td="initial",rd,nd=!1,ad=[];for(let sd=0;sd<Ra.length;sd++){let ud=Ra[sd];switch(qa){case"initial":if(ud==="'"){qa="single-quotes";continue}if(ud==='"'){qa="double-quotes";continue}if((ud==="u"||ud==="U")&&Ra.slice(sd,sd+4).toLowerCase()==="url("){qa="url",sd+=3;continue}if(ud==="*"&&Ra[sd-1]==="/"){qa="comment-block";continue}if(ud==="/"&&Ra[sd-1]==="/"){qa="comment-inline",rd=sd-1;continue}continue;case"single-quotes":if(ud==="'"&&Ra[sd-1]!==" \\ "&&(qa=td,td="initial"),ud=== `
` ||ud===" \r ")return Ra;continue;case"double-quotes":if(ud==='"'&&Ra[sd-1]!==" \\ "&&(qa=td,td="initial"),ud=== `
` ||ud===" \r ")return Ra;continue;case"url":if(ud===")"&&(qa="initial"),ud=== `
` ||ud===" \r ")return Ra;if(ud==="'"){qa="single-quotes",td="url";continue}if(ud==='"'){qa="double-quotes",td="url";continue}continue;case"comment-block":ud==="/"&&Ra[sd-1]==="*"&&(qa="initial");continue;case"comment-inline":(ud==='"'||ud==="'"||ud==="*")&&(nd=!0),(ud=== `
` ||ud===" \r ")&&(nd&&ad.push([rd,sd]),qa="initial",nd=!1);continue}}for(let[sd,ud]of ad)Ra=Ra.slice(0,sd)+_ $ 3(!1,Ra.slice(sd,ud),/["'*]/gu," ")+Ra.slice(ud);return Ra}function N $ 2(Ra){var qa;return(qa=Ra.source)==null?void 0:qa.startOffset}function P $ 2(Ra){var qa;return(qa=Ra.source)==null?void 0:qa.endOffset}var Ll $ 1=/ \* \/ $ /,Dl $ 1=/^ \/ \* \* ?/,kn $ 1=/^ \s *( \/ \* \* ?(.| \r ? \n )*? \* \/ )/,Ml $ 1=/(^| \s +) \/ \/ ([^ \n \r ]*)/g,xn $ 1=/^( \r ? \n )+/,Bl=/(?:^| \r ? \n ) *(@[^ \n \r ]*?) * \r ? \n *(?![^ \n \r @]* \/ \/ [^]*)([^ \s @][^ \n \r @]+?) * \r ? \n /g,bn $ 2=/(?:^| \r ? \n ) *@( \S +) *([^ \n \r ]*)/g,Ul=/( \r ? \n |^) * \* ?/g,En $ 1=[];function Sn $ 1(Ra){let qa=Ra.match(kn $ 1);return qa?qa[0].trimStart():""}function Tn $ 2(Ra){let qa=Ra.match(kn $ 1),td=qa==null?void 0:qa[0];return td==null?Ra:Ra.slice(td.length)}function On $ 1(Ra){let qa= `
` ;Ra=_ $ 3(!1,Ra.replace(Dl $ 1,"").replace(Ll $ 1,""),Ul," $ 1");let td="";for(;td!==Ra;)td=Ra,Ra=_ $ 3(!1,Ra,Bl, ` $ { qa } $1 $2$ { qa } ` );Ra=Ra.replace(xn $ 1,"").trimEnd();let rd=Object.create(null),nd=_ $ 3(!1,Ra,bn $ 2,"").replace(xn $ 1,"").trimEnd(),ad;for(;ad=bn $ 2.exec(Ra);){let sd=_ $ 3(!1,ad[2],Ml $ 1,"");if(typeof rd[ad[1]]=="string"||Array.isArray(rd[ad[1]])){let ud=rd[ad[1]];rd[ad[1]]=[...En $ 1,...Array.isArray(ud)?ud:[ud],sd]}else rd[ad[1]]=sd}return{comments:nd,pragmas:rd}}function Cn $ 2({comments:Ra="",pragmas:qa={}}){let td= `
` ,rd="/**",nd=" *",ad=" */",sd=Object.keys(qa),ud=sd.flatMap(dd=>_n $ 2(dd,qa[dd])).map(dd=> ` $ { nd } $ { dd } $ { td } ` ).join("");if(!Ra){if(sd.length===0)return"";if(sd.length===1&&!Array.isArray(qa[sd[0]])){let dd=qa[sd[0]];return ` $ { rd } $ { _n$2 ( sd [ 0 ] , dd ) [ 0 ] } $ { ad } ` }}let cd=Ra.split(td).map(dd=> ` $ { nd } $ { dd } ` ).join(td)+td;return rd+td+(Ra?cd:"")+(Ra&&sd.length>0?nd+td:"")+ud+ad}function _n $ 2(Ra,qa){return[...En $ 1,...Array.isArray(qa)?qa:[qa]].map(td=> ` @ $ { Ra } $ { td } ` .trim())}function Fl(Ra){if(!Ra.startsWith("#!"))return"";let qa=Ra.indexOf( `
` );return qa===-1?Ra:Ra.slice(0,qa)}var An $ 1=Fl;function Nn $ 1(Ra){let qa=An $ 1(Ra);qa&&(Ra=Ra.slice(qa.length+1));let td=Sn $ 1(Ra),{pragmas:rd,comments:nd}=On $ 1(td);return{shebang:qa,text:Ra,pragmas:rd,comments:nd}}function Pn $ 2(Ra){let{pragmas:qa}=Nn $ 1(Ra);return Object.prototype.hasOwnProperty.call(qa,"prettier")||Object.prototype.hasOwnProperty.call(qa,"format")}function Rn(Ra){let{shebang:qa,text:td,pragmas:rd,comments:nd}=Nn $ 1(Ra),ad=Tn $ 2(td),sd=Cn $ 2({pragmas:{format:"",...rd},comments:nd.trimStart()});return(qa? ` $ { qa }
` :"")+sd+(ad.startsWith( `
2024-09-18 09:46:23 +08:00
` )? `
` : `
2024-09-25 14:23:53 +08:00
` )+ad}var Qe $ 1=3;function $ l(Ra){let qa=Ra.slice(0,Qe $ 1);if(qa!=="---"&&qa!=="+++")return;let td=Ra.indexOf( `
` ,Qe $ 1);if(td===-1)return;let rd=Ra.slice(Qe $ 1,td).trim(),nd=Ra.indexOf( `
$ { qa } ` ,td),ad=rd;if(ad||(ad=qa==="+++"?"toml":"yaml"),nd===-1&&qa==="---"&&ad==="yaml"&&(nd=Ra.indexOf( `
... ` ,td)),nd===-1)return;let sd=nd+1+Qe $ 1,ud=Ra.charAt(sd+1);if(!/ \s ?/u.test(ud))return;let cd=Ra.slice(0,sd);return{type:"front-matter",language:ad,explicitLanguage:rd,value:Ra.slice(td+1,nd),startDelimiter:qa,endDelimiter:cd.slice(-Qe $ 1),raw:cd}}function Wl $ 1(Ra){let qa= $ l(Ra);if(!qa)return{content:Ra};let{raw:td}=qa;return{frontMatter:qa,content:_ $ 3(!1,td,/[^ \n ]/gu," ")+Ra.slice(td.length)}}var Je $ 2=Wl $ 1;function In(Ra){return Pn $ 2(Je $ 2(Ra).content)}function qn $ 2(Ra){let{frontMatter:qa,content:td}=Je $ 2(Ra);return(qa?qa.raw+ `
2024-11-27 11:30:55 +08:00
` :"")+Rn(td)}var Yl $ 1=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function Ln(Ra){var qa,td;return(td=(qa=Ra.findAncestor(rd=>rd.type==="css-decl"))==null?void 0:qa.prop)==null?void 0:td.toLowerCase()}var zl $ 1=new Set(["initial","inherit","unset","revert"]);function Dn $ 2(Ra){return zl $ 1.has(Ra.toLowerCase())}function Mn(Ra,qa){var td;let rd=Ra.findAncestor(nd=>nd.type==="css-atrule");return((td=rd==null?void 0:rd.name)==null?void 0:td.toLowerCase().endsWith("keyframes"))&&["from","to"].includes(qa.toLowerCase())}function te $ 1(Ra){return Ra.includes(" $ ")||Ra.includes("@")||Ra.includes("#")||Ra.startsWith("%")||Ra.startsWith("--")||Ra.startsWith(":--")||Ra.includes("(")&&Ra.includes(")")?Ra:Ra.toLowerCase()}function ke $ 2(Ra,qa){var td;let rd=Ra.findAncestor(nd=>nd.type==="value-func");return((td=rd==null?void 0:rd.value)==null?void 0:td.toLowerCase())===qa}function Bn $ 2(Ra){var qa;let td=Ra.findAncestor(nd=>nd.type==="css-rule"),rd=(qa=td==null?void 0:td.raws)==null?void 0:qa.selector;return rd&&(rd.startsWith(":import")||rd.startsWith(":export"))}function Ee $ 1(Ra,qa){let td=Array.isArray(qa)?qa:[qa],rd=Ra.findAncestor(nd=>nd.type==="css-atrule");return rd&&td.includes(rd.name.toLowerCase())}function Un $ 1(Ra){var qa;let{node:td}=Ra;return td.groups[0].value==="url"&&td.groups.length===2&&((qa=Ra.findAncestor(rd=>rd.type==="css-atrule"))==null?void 0:qa.name)==="import"}function Fn $ 1(Ra){return Ra.type==="value-func"&&Ra.value.toLowerCase()==="url"}function $ n $ 2(Ra){return Ra.type==="value-func"&&Ra.value.toLowerCase()==="var"}function Wn(Ra){let{selector:qa}=Ra;return qa?typeof qa=="string"&&/^@.+:.* $ /u.test(qa)||qa.value&&/^@.+:.* $ /u.test(qa.value):!1}function Yn $ 1(Ra){return Ra.type==="value-word"&&["from","through","end"].includes(Ra.value)}function zn $ 1(Ra){return Ra.type==="value-word"&&["and","or","not"].includes(Ra.value)}function Vn $ 1(Ra){return Ra.type==="value-word"&&Ra.value==="in"}function At $ 2(Ra){return Ra.type==="value-operator"&&Ra.value==="*"}function Xe $ 1(Ra){return Ra.type==="value-operator"&&Ra.value==="/"}function Q $ 3(Ra){return Ra.type==="value-operator"&&Ra.value==="+"}function le $ 1(Ra){return Ra.type==="value-operator"&&Ra.value==="-"}function Vl(Ra){return Ra.type==="value-operator"&&Ra.value==="%"}function Nt $ 1(Ra){return At $ 2(Ra)||Xe $ 1(Ra)||Q $ 3(Ra)||le $ 1(Ra)||Vl(Ra)}function Gn $ 2(Ra){return Ra.type==="value-word"&&["==","!="].includes(Ra.value)}function jn $ 1(Ra){return Ra.type==="value-word"&&["<",">","<=",">="].includes(Ra.value)}function Ze $ 1(Ra,qa){return qa.parser==="scss"&&Ra.type==="css-atrule"&&["if","else","for","each","while"].includes(Ra.name)}function Hr $ 1(Ra){var qa;return((qa=Ra.raws)==null?void 0:qa.params)&&/^ \( \s * \) $ /u.test(Ra.raws.params)}function Pt $ 1(Ra){return Ra.name.startsWith("prettier-placeholder")}function Hn(Ra){return Ra.prop.startsWith("@prettier-placeholder")}function Kn $ 1(Ra,qa){return Ra.value===" $ $ "&&Ra.type==="value-func"&&(qa==null?void 0:qa.type)==="value-word"&&!qa.raws.before}function Qn $ 2(Ra){var qa,td;return((qa=Ra.value)==null?void 0:qa.type)==="value-root"&&((td=Ra.value.group)==null?void 0:td.type)==="value-value"&&Ra.prop.toLowerCase()==="composes"}function Jn $ 2(Ra){var qa,td,rd;return((rd=(td=(qa=Ra.value)==null?void 0:qa.group)==null?void 0:td.group)==null?void 0:rd.type)==="value-paren_group"&&Ra.value.group.group.open!==null&&Ra.value.group.group.close!==null}function ce $ 1(Ra){var qa;return((qa=Ra.raws)==null?void 0:qa.before)===""}function Rt $ 2(Ra){var qa,td;return Ra.type==="value-comma_group"&&((td=(qa=Ra.groups)==null?void 0:qa[1])==null?void 0:td.type)==="value-colon"}function jr $ 1(Ra){var qa;return Ra.type==="value-paren_group"&&((qa=Ra.groups)==null?void 0:qa[0])&&Rt $ 2(Ra.groups[0])}function Kr $ 1(Ra,qa){var td;if(qa.parser!=="scss")return!1;let{node:rd}=Ra;if(rd.groups.length===0)return!1;let nd=Ra.grandparent;if(!jr $ 1(rd)&&!(nd&&jr $ 1(nd)))return!1;let ad=Ra.findAncestor(sd=>sd.type==="css-decl"
2024-09-25 14:23:53 +08:00
` )return qa-2;if(nd=== `
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa-1}else{if(nd===" \r "&&Ra.charAt(qa+1)=== `
` )return qa+2;if(nd=== `
2024-11-27 11:30:55 +08:00
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa+1}return qa}var Dt $ 2=Xl $ 1;function Zl(Ra,qa,td={}){let rd=Ot $ 2(Ra,td.backwards?qa-1:qa,td),nd=Dt $ 2(Ra,rd,td);return rd!==nd}var Mt $ 1=Zl;function ec(Ra,qa){if(qa===!1)return!1;if(Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="*"){for(let td=qa+2;td<Ra.length;++td)if(Ra.charAt(td)==="*"&&Ra.charAt(td+1)==="/")return td+2}return qa}var ui $ 2=ec;function tc(Ra,qa){return qa===!1?!1:Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="/"?Ct $ 1(Ra,qa):qa}var li $ 2=tc;function rc $ 1(Ra,qa){let td=null,rd=qa;for(;rd!==td;)td=rd,rd=yn $ 1(Ra,rd),rd=ui $ 2(Ra,rd),rd=Ot $ 2(Ra,rd);return rd=li $ 2(Ra,rd),rd=Dt $ 2(Ra,rd),rd!==!1&&Mt $ 1(Ra,rd)}var Bt $ 2=rc $ 1;function sc $ 1({node:Ra,parent:qa},td){return!!(Ra.source&&td.originalText.slice(N $ 2(Ra),N $ 2(qa.close)).trimEnd().endsWith(","))}function nc(Ra,qa){return $ n $ 2(Ra.grandparent)&&sc $ 1(Ra,qa)?",":Ra.node.type!=="value-comment"&&!(Ra.node.type==="value-comma_group"&&Ra.node.groups.every(td=>td.type==="value-comment"))&&ai $ 1(qa)&&Ra.callParent(()=>Kr $ 1(Ra,qa))?kt $ 2(","):""}function ci $ 1(Ra,qa,td){let{node:rd,parent:nd}=Ra,ad=Ra.map(({node:Sd})=>typeof Sd=="string"?Sd:td(),"groups");if(nd&&Fn $ 1(nd)&&(rd.groups.length===1||rd.groups.length>0&&rd.groups[0].type==="value-comma_group"&&rd.groups[0].groups.length>0&&rd.groups[0].groups[0].type==="value-word"&&rd.groups[0].groups[0].value.startsWith("data:")))return[rd.open?td("open"):"",V $ 2(",",ad),rd.close?td("close"):""];if(!rd.open){let Sd=es $ 1(Ra),Ad=V $ 2([",",Sd?E $ 1:A $ 1],ad);return q $ 2(Sd?[E $ 1,Ad]:L $ 2(Ge $ 1(Ad)))}let sd=Ra.map(({node:Sd,isLast:Ad,index:Nd})=>{var Ld;let Rd=ad[Nd];if(Rt $ 2(Sd)&&Sd.type==="value-comma_group"&&Sd.groups&&Sd.groups[0].type!=="value-paren_group"&&((Ld=Sd.groups[2])==null?void 0:Ld.type)==="value-paren_group"){let{parts:kd}=Rd.contents.contents;kd[1]=L $ 2(kd[1]),Rd=L $ 2(ue $ 1(Rd))}let Od=[Rd,Ad?nc(Ra,qa):","];if(!Ad&&Sd.type==="value-comma_group"&&ee $ 1(Sd.groups)){let kd=G $ 2(!1,Sd.groups,-1);!kd.source&&kd.close&&(kd=kd.close),kd.source&&Bt $ 2(qa.originalText,P $ 2(kd))&&Od.push(E $ 1)}return Od},"groups"),ud=Xn $ 2(rd,nd),cd=ti $ 2(rd,nd),dd=Kr $ 1(Ra,qa),pd=cd||dd&&!ud,fd=cd||ud,Td=L $ 2([rd.open?td("open"):"",q $ 2([M $ 2,V $ 2(A $ 1,sd)]),M $ 2,rd.close?td("close"):""],{shouldBreak:pd});return fd?ue $ 1(Td):Td}function es $ 1(Ra){return Ra.match(qa=>qa.type==="value-paren_group"&&!qa.open&&qa.groups.some(td=>td.type==="value-comma_group"),(qa,td)=>td==="group"&&qa.type==="value-value",(qa,td)=>td==="group"&&qa.type==="value-root",(qa,td)=>td==="value"&&(qa.type==="css-decl"&&!qa.prop.startsWith("--")||qa.type==="css-atrule"&&qa.variable))}function ic(Ra,qa,td){let rd=[];return Ra.each(()=>{let{node:nd,previous:ad}=Ra;if((ad==null?void 0:ad.type)==="css-comment"&&ad.text.trim()==="prettier-ignore"?rd.push(qa.originalText.slice(N $ 2(nd),P $ 2(nd))):rd.push(td()),Ra.isLast)return;let{next:sd}=Ra;sd.type==="css-comment"&&!Mt $ 1(qa.originalText,N $ 2(sd),{backwards:!0})&&!_e $ 1(nd)||sd.type==="css-atrule"&&sd.name==="else"&&nd.type!=="css-comment"?rd.push(" "):(rd.push(qa.__isHTMLStyleAttribute?A $ 1:E $ 1),Bt $ 2(qa.originalText,P $ 2(nd))&&!_e $ 1(nd)&&rd.push(E $ 1))},"nodes"),rd}var Te $ 1=ic;function oc(Ra,qa,td){var rd,nd,ad,sd,ud,cd;let{node:dd}=Ra;switch(dd.type){case"front-matter":return[dd.raw,E $ 1];case"css-root":{let pd=Te $ 1(Ra,qa,td),fd=dd.raws.after.trim();return fd.startsWith(";")&&(fd=fd.slice(1).trim()),[dd.frontMatter?[td("frontMatter"),E $ 1]:"",pd,fd? ` $ { fd } ` :"",dd.nodes.length>0?E $ 1:""]}case"css-comment":{let pd=dd.inline||dd.raws.inline,fd=qa.originalText.slice(N $ 2(dd),P $ 2(dd));return pd?fd.trimEnd():fd}case"css-rule":return[td("selector"),dd.important?" !important":"",dd.nodes?[((rd=dd.selector)==null?void 0:rd.type)==="selector-unknown"&&Se $ 1(dd.selector.value)?A $ 1:dd.selector?" ":"","{",dd.nodes.length>0?q $ 2([E $ 1,Te $ 1(Ra,qa,td)]):"",E $ 1,"}",Wn(dd)?";":""]:";"];case"css-decl":{let pd=Ra.parent,{between:fd}=dd.raws,Td=fd.trim(),Sd=Td===":",Ad=typeof dd.value=="string"&&/^ * $ /u.test(dd.value),Nd=typeof dd.value=="string"?dd.value:td("value");return Nd=Qn $ 2(dd)?rn $ 1(Nd):Nd,!Sd&&Se $ 1(Td)&&!((ad=(nd=dd.value)==null?void 0:nd.gro
` ,Ud(Fd.gutter,gf.replace(/ \d /g," "))," ",Qf,Ud(Fd.marker,"^").repeat(qf)].join(""),Mf&&Rd.message&&(Yf+=" "+Ud(Fd.message,Rd.message))}return[Ud(Fd.marker,">"),Ud(Fd.gutter,gf),bf.length>0? ` $ { bf } ` :"",Yf].join("")}else return ` $ { Ud ( Fd . gutter , gf ) } $ { bf . length > 0 ? ` ${ bf } ` : "" } ` }).join( `
` );return Rd.message&&!Xd&&(hf= ` $ { " " . repeat ( Qd + 1 ) } $ { Rd . message }
$ { hf } ` ),Od?kd.reset(hf):hf}function Ad(Nd,Ld,Rd,Od={}){if(!dd){dd=!0;let kd="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use ` codeFrameColumns ` .";{let Fd=new Error(kd);Fd.name="DeprecationWarning",console.warn(new Error(kd))}}return Rd=Math.max(Rd,0),Sd(Nd,{start:{column:Rd,line:Ld}},Od)}}),ir={};We(ir,{__debug:()=>di $ 1,check:()=>fi,doc:()=>nr,format:()=>gu $ 1,formatWithCursor:()=>Cu $ 1,getSupportInfo:()=>pi $ 2,util:()=>or,version:()=>fu});var Ou=(Ra,qa,td,rd)=>{if(!(Ra&&qa==null))return qa.replaceAll?qa.replaceAll(td,rd):td.global?qa.replace(td,rd):qa.split(td).join(rd)},ne $ 1=Ou;function Z $ 1(){}Z $ 1.prototype={diff:function(Ra,qa){var td,rd=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},nd=rd.callback;typeof rd=="function"&&(nd=rd,rd={}),this.options=rd;var ad=this;function sd(kd){return nd?(setTimeout(function(){nd(void 0,kd)},0),!0):kd}Ra=this.castInput(Ra),qa=this.castInput(qa),Ra=this.removeEmpty(this.tokenize(Ra)),qa=this.removeEmpty(this.tokenize(qa));var ud=qa.length,cd=Ra.length,dd=1,pd=ud+cd;rd.maxEditLength&&(pd=Math.min(pd,rd.maxEditLength));var fd=(td=rd.timeout)!==null&&td!==void 0?td:1/0,Td=Date.now()+fd,Sd=[{oldPos:-1,lastComponent:void 0}],Ad=this.extractCommon(Sd[0],qa,Ra,0);if(Sd[0].oldPos+1>=cd&&Ad+1>=ud)return sd([{value:this.join(qa),count:qa.length}]);var Nd=-1/0,Ld=1/0;function Rd(){for(var kd=Math.max(Nd,-dd);kd<=Math.min(Ld,dd);kd+=2){var Fd=void 0,Ud=Sd[kd-1],Hd=Sd[kd+1];Ud&&(Sd[kd-1]=void 0);var Vd=!1;if(Hd){var Zd=Hd.oldPos-kd;Vd=Hd&&0<=Zd&&Zd<ud}var zd=Ud&&Ud.oldPos+1<cd;if(!Vd&&!zd){Sd[kd]=void 0;continue}if(!zd||Vd&&Ud.oldPos+1<Hd.oldPos?Fd=ad.addToPath(Hd,!0,void 0,0):Fd=ad.addToPath(Ud,void 0,!0,1),Ad=ad.extractCommon(Fd,qa,Ra,kd),Fd.oldPos+1>=cd&&Ad+1>=ud)return sd(Su(ad,Fd.lastComponent,qa,Ra,ad.useLongestToken));Sd[kd]=Fd,Fd.oldPos+1>=cd&&(Ld=Math.min(Ld,kd-1)),Ad+1>=ud&&(Nd=Math.max(Nd,kd+1))}dd++}if(nd)(function kd(){setTimeout(function(){if(dd>pd||Date.now()>Td)return nd();Rd()||kd()},0)})();else for(;dd<=pd&&Date.now()<=Td;){var Od=Rd();if(Od)return Od}},addToPath:function(Ra,qa,td,rd){var nd=Ra.lastComponent;return nd&&nd.added===qa&&nd.removed===td?{oldPos:Ra.oldPos+rd,lastComponent:{count:nd.count+1,added:qa,removed:td,previousComponent:nd.previousComponent}}:{oldPos:Ra.oldPos+rd,lastComponent:{count:1,added:qa,removed:td,previousComponent:nd}}},extractCommon:function(Ra,qa,td,rd){for(var nd=qa.length,ad=td.length,sd=Ra.oldPos,ud=sd-rd,cd=0;ud+1<nd&&sd+1<ad&&this.equals(qa[ud+1],td[sd+1]);)ud++,sd++,cd++;return cd&&(Ra.lastComponent={count:cd,previousComponent:Ra.lastComponent}),Ra.oldPos=sd,ud},equals:function(Ra,qa){return this.options.comparator?this.options.comparator(Ra,qa):Ra===qa||this.options.ignoreCase&&Ra.toLowerCase()===qa.toLowerCase()},removeEmpty:function(Ra){for(var qa=[],td=0;td<Ra.length;td++)Ra[td]&&qa.push(Ra[td]);return qa},castInput:function(Ra){return Ra},tokenize:function(Ra){return Ra.split("")},join:function(Ra){return Ra.join("")}};function Su(Ra,qa,td,rd,nd){for(var ad=[],sd;qa;)ad.push(qa),sd=qa.previousComponent,delete qa.previousComponent,qa=sd;ad.reverse();for(var ud=0,cd=ad.length,dd=0,pd=0;ud<cd;ud++){var fd=ad[ud];if(fd.removed){if(fd.value=Ra.join(rd.slice(pd,pd+fd.count)),pd+=fd.count,ud&&ad[ud-1].added){var Td=ad[ud-1];ad[ud-1]=ad[ud],ad[ud]=Td}}else{if(!fd.added&&nd){var Sd=td.slice(dd,dd+fd.count);Sd=Sd.map(function(Nd,Ld){var Rd=rd[pd+Ld];return Rd.length>Nd.length?Rd:Nd}),fd.value=Ra.join(Sd)}else fd.value=Ra.join(td.slice(dd,dd+fd.count));dd+=fd.count,fd.added||(pd+=fd.count)}}var Ad=ad[cd-1];return cd>1&&typeof Ad.value=="string"&&(Ad.added||Ad.removed)&&Ra.equals("",Ad.value)&&(ad[cd-2].value+=Ad.value,ad.pop()),ad}var lr=/^[A-Za-z \x C0- \u 02C6 \u 02C8- \u 02D7 \u 02DE- \u 02FF \u 1E00- \u 1EFF]+ $ /,cr=/ \S /,fr=new Z $ 1;fr.equals=function(Ra,qa){return this.options.ignoreCase&&(Ra=Ra.toLowerCase(),qa=qa.toLowerCase()),Ra===qa||this.options.ignoreWhitespace&&!cr.test(Ra)&&!cr.test(qa)};fr.tokenize=function(Ra){for(var qa=Ra.split(/([^ \S \r \n ]+|[()[ \] {}'" \r \n ]| \b )/),td=0;td<qa.length-1;td++)!qa[td+1]&&qa[td+2]&&lr.
2024-09-25 14:23:53 +08:00
` ));var qa=[],td=Ra.split(/( \n | \r \n )/);td[td.length-1]||td.pop();for(var rd=0;rd<td.length;rd++){var nd=td[rd];rd%2&&!this.options.newlineIsToken?qa[qa.length-1]+=nd:(this.options.ignoreWhitespace&&(nd=nd.trim()),qa.push(nd))}return qa};var Nu=new Z $ 1;Nu.tokenize=function(Ra){return Ra.split(/( \S .+?[.!?])(?= \s +| $ )/)};var Tu=new Z $ 1;Tu.tokenize=function(Ra){return Ra.split(/([{}:;,]| \s +)/)};function $ e $ 1(Ra){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"? $ e $ 1=function(qa){return typeof qa}: $ e $ 1=function(qa){return qa&&typeof Symbol=="function"&&qa.constructor===Symbol&&qa!==Symbol.prototype?"symbol":typeof qa}, $ e $ 1(Ra)}var ku=Object.prototype.toString,Ae=new Z $ 1;Ae.useLongestToken=!0;Ae.tokenize=pr.tokenize;Ae.castInput=function(Ra){var qa=this.options,td=qa.undefinedReplacement,rd=qa.stringifyReplacer,nd=rd===void 0?function(ad,sd){return typeof sd>"u"?td:sd}:rd;return typeof Ra=="string"?Ra:JSON.stringify(Bt $ 1(Ra,null,null,nd),nd," ")};Ae.equals=function(Ra,qa){return Z $ 1.prototype.equals.call(Ae,Ra.replace(/,([ \r \n ])/g," $ 1"),qa.replace(/,([ \r \n ])/g," $ 1"))};function Bt $ 1(Ra,qa,td,rd,nd){qa=qa||[],td=td||[],rd&&(Ra=rd(nd,Ra));var ad;for(ad=0;ad<qa.length;ad+=1)if(qa[ad]===Ra)return td[ad];var sd;if(ku.call(Ra)==="[object Array]"){for(qa.push(Ra),sd=new Array(Ra.length),td.push(sd),ad=0;ad<Ra.length;ad+=1)sd[ad]=Bt $ 1(Ra[ad],qa,td,rd,nd);return qa.pop(),td.pop(),sd}if(Ra&&Ra.toJSON&&(Ra=Ra.toJSON()), $ e $ 1(Ra)==="object"&&Ra!==null){qa.push(Ra),sd={},td.push(sd);var ud=[],cd;for(cd in Ra)Ra.hasOwnProperty(cd)&&ud.push(cd);for(ud.sort(),ad=0;ad<ud.length;ad+=1)cd=ud[ad],sd[cd]=Bt $ 1(Ra[cd],qa,td,rd,cd);qa.pop(),td.pop()}else sd=Ra;return sd}var Ve=new Z $ 1;Ve.tokenize=function(Ra){return Ra.slice()};Ve.join=Ve.removeEmpty=function(Ra){return Ra};function dr(Ra,qa,td){return Ve.diff(Ra,qa,td)}function Fr(Ra){let qa=Ra.indexOf(" \r ");return qa>=0?Ra.charAt(qa+1)=== `
2024-09-18 09:46:23 +08:00
` ?"crlf":"cr":"lf"}function Be(Ra){switch(Ra){case"cr":return" \r ";case"crlf":return ` \ r
` ;default:return `
2024-09-25 14:23:53 +08:00
` }}function wt(Ra,qa){let td;switch(qa){case `
` :td=/ \n /gu;break;case" \r ":td=/ \r /gu;break;case ` \ r
` :td=/ \r \n /gu;break;default:throw new Error( ` Unexpected "eol" $ { JSON . stringify ( qa ) } . ` )}let rd=Ra.match(td);return rd?rd.length:0}function mr(Ra){return ne $ 1(!1,Ra,/ \r \n ?/gu, `
` )}var U $ 1="string",W $ 1="array",z $ 1="cursor",L $ 1="indent",P $ 1="align",I $ 1="trim",x $ 2="group",S $ 1="fill",_ $ 2="if-break",R $ 3="indent-if-break",Y $ 1="line-suffix",j $ 1="line-suffix-boundary",B $ 1="line",N $ 1="label",b $ 1="break-parent",Ue=new Set([z $ 1,L $ 1,P $ 1,I $ 1,x $ 2,S $ 1,_ $ 2,R $ 3,Y $ 1,j $ 1,B $ 1,N $ 1,b $ 1]);function Lu(Ra){if(typeof Ra=="string")return U $ 1;if(Array.isArray(Ra))return W $ 1;if(!Ra)return;let{type:qa}=Ra;if(Ue.has(qa))return qa}var G $ 1=Lu,Pu=Ra=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(Ra);function Iu(Ra){let qa=Ra===null?"null":typeof Ra;if(qa!=="string"&&qa!=="object")return ` Unexpected doc '${qa}' ,
Expected it to be 'string' or 'object' . ` ;if(G $ 1(Ra))throw new Error("doc is valid.");let td=Object.prototype.toString.call(Ra);if(td!=="[object Object]")return ` Unexpected doc '${td}' . ` ;let rd=Pu([...Ue].map(nd=> ` '${nd}' ` ));return ` Unexpected doc . type '${Ra.type}' .
Expected it to be $ { rd } . ` }var xt=class extends Error{constructor(qa){super(Iu(qa));Qm(this,"name","InvalidDocError");this.doc=qa}},Q $ 2=xt,Er={};function Ru(Ra,qa,td,rd){let nd=[Ra];for(;nd.length>0;){let ad=nd.pop();if(ad===Er){td(nd.pop());continue}td&&nd.push(ad,Er);let sd=G $ 1(ad);if(!sd)throw new Q $ 2(ad);if((qa==null?void 0:qa(ad))!==!1)switch(sd){case W $ 1:case S $ 1:{let ud=sd===W $ 1?ad:ad.parts;for(let cd=ud.length,dd=cd-1;dd>=0;--dd)nd.push(ud[dd]);break}case _ $ 2:nd.push(ad.flatContents,ad.breakContents);break;case x $ 2:if(rd&&ad.expandedStates)for(let ud=ad.expandedStates.length,cd=ud-1;cd>=0;--cd)nd.push(ad.expandedStates[cd]);else nd.push(ad.contents);break;case P $ 1:case L $ 1:case R $ 3:case N $ 1:case Y $ 1:nd.push(ad.contents);break;case U $ 1:case z $ 1:case I $ 1:case j $ 1:case B $ 1:case b $ 1:break;default:throw new Q $ 2(ad)}}}var we=Ru,hr $ 2=()=>{},ze=hr $ 2;function De(Ra){return{type:L $ 1,contents:Ra}}function ae(Ra,qa){return{type:P $ 1,contents:qa,n:Ra}}function _t(Ra,qa={}){return ze(qa.expandedStates),{type:x $ 2,id:qa.id,contents:Ra,break:!!qa.shouldBreak,expandedStates:qa.expandedStates}}function Cr(Ra){return ae(Number.NEGATIVE_INFINITY,Ra)}function gr(Ra){return ae({type:"root"},Ra)}function yr(Ra){return ae(-1,Ra)}function Ar(Ra,qa){return _t(Ra[0],{...qa,expandedStates:Ra})}function Ge(Ra){return{type:S $ 1,parts:Ra}}function Br(Ra,qa="",td={}){return{type:_ $ 2,breakContents:Ra,flatContents:qa,groupId:td.groupId}}function wr(Ra,qa){return{type:R $ 3,contents:Ra,groupId:qa.groupId,negate:qa.negate}}function xe $ 1(Ra){return{type:Y $ 1,contents:Ra}}var xr={type:j $ 1},de={type:b $ 1},_r={type:I $ 1},_e={type:B $ 1,hard:!0},vt={type:B $ 1,hard:!0,literal:!0},Ke $ 1={type:B $ 1},vr={type:B $ 1,soft:!0},q $ 1=[_e,de],qe $ 1=[vt,de],ve={type:z $ 1};function be $ 1(Ra,qa){let td=[];for(let rd=0;rd<qa.length;rd++)rd!==0&&td.push(Ra),td.push(qa[rd]);return td}function Je $ 1(Ra,qa,td){let rd=Ra;if(qa>0){for(let nd=0;nd<Math.floor(qa/td);++nd)rd=De(rd);rd=ae(qa%td,rd),rd=ae(Number.NEGATIVE_INFINITY,rd)}return rd}function br $ 2(Ra,qa){return Ra?{type:N $ 1,label:Ra,contents:qa}:qa}function ee(Ra){var qa;if(!Ra)return"";if(Array.isArray(Ra)){let td=[];for(let rd of Ra)if(Array.isArray(rd))td.push(...ee(rd));else{let nd=ee(rd);nd!==""&&td.push(nd)}return td}return Ra.type===_ $ 2?{...Ra,breakContents:ee(Ra.breakContents),flatContents:ee(Ra.flatContents)}:Ra.type===x $ 2?{...Ra,contents:ee(Ra.contents),expandedStates:(qa=Ra.expandedStates)==null?void 0:qa.map(ee)}:Ra.type===S $ 1?{type:"fill",parts:Ra.parts.map(ee)}:Ra.contents?{...Ra,contents:ee(Ra.contents)}:Ra}function Or(Ra){let qa=Object.create(null),td=new Set;return rd(ee(Ra));function rd(ad,sd,ud){var cd,dd;if(typeof ad=="string")return JSON.stringify(ad);if(Array.isArray(ad)){let pd=ad.map(rd).filter(Boolean);return pd.length===1?pd[0]: ` [ $ { pd . join ( ", " ) } ] ` }if(ad.type===B $ 1){let pd=((cd=ud==null?void 0:ud[sd+1])==null?void 0:cd.type)===b $ 1;return ad.literal?pd?"literalline":"literallineWithoutBreakParent":ad.hard?pd?"hardline":"hardlineWithoutBreakParent":ad.soft?"softline":"line"}if(ad.type===b $ 1)return((dd=ud==null?void 0:ud[sd-1])==null?void 0:dd.type)===B $ 1&&ud[sd-1].hard?void 0:"breakParent";if(ad.type===I $ 1)return"trim";if(ad.type===L $ 1)return"indent("+rd(ad.contents)+")";if(ad.type===P $ 1)return ad.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+rd(ad.contents)+")":ad.n<0?"dedent("+rd(ad.contents)+")":ad.n.type==="root"?"markAsRoot("+rd(ad.contents)+")":"align("+JSON.stringify(ad.n)+", "+rd(ad.contents)+")";if(ad.type===_ $ 2)return"ifBreak("+rd(ad.breakContents)+(ad.flatContents?", "+rd(ad.flatContents):"")+(ad.groupId?(ad.flatContents?"":', ""')+ ` , { groupId : $ { nd ( ad . groupId ) } } ` :"")+")";if(ad.type===R $ 3){let pd=[];ad.negate&&pd.push("negate: true"),ad.groupId&&pd.push( ` groupId : $ { nd ( ad . groupId ) } ` );let fd=pd.length>0? ` , { $ { pd . join ( ", " ) } } ` :"";return ` indentIfBreak ( $ { rd ( ad . contents ) } $ { fd } ) ` }if(ad.type===x $ 2){let pd=[];ad.break&&ad.break!=="propagated"&&pd.push("shouldBreak: true"),ad.id&&pd.push( ` id : $ { nd ( ad . id ) } ` );let fd=pd.length>0? ` , { $ { pd . join ( ", " ) } } ` :"";return ad.expandedStates? ` conditionalGroup ( [ $ { ad . expanded
2024-11-27 11:30:55 +08:00
` )):td)}function Uu(Ra){if(Ra.type===B $ 1)return!0}function Hr(Ra){return Xe(Ra,Uu,!1)}function Qe(Ra,qa){return Ra.type===N $ 1?{...Ra,contents:qa(Ra.contents)}:qa(Ra)}var H $ 1=Symbol("MODE_BREAK"),J $ 1=Symbol("MODE_FLAT"),Te=Symbol("cursor");function Wr(){return{value:"",length:0,queue:[]}}function zu(Ra,qa){return bt $ 1(Ra,{type:"indent"},qa)}function Gu(Ra,qa,td){return qa===Number.NEGATIVE_INFINITY?Ra.root||Wr():qa<0?bt $ 1(Ra,{type:"dedent"},td):qa?qa.type==="root"?{...Ra,root:Ra}:bt $ 1(Ra,{type:typeof qa=="string"?"stringAlign":"numberAlign",n:qa},td):Ra}function bt $ 1(Ra,qa,td){let rd=qa.type==="dedent"?Ra.queue.slice(0,-1):[...Ra.queue,qa],nd="",ad=0,sd=0,ud=0;for(let Ad of rd)switch(Ad.type){case"indent":pd(),td.useTabs?cd(1):dd(td.tabWidth);break;case"stringAlign":pd(),nd+=Ad.n,ad+=Ad.n.length;break;case"numberAlign":sd+=1,ud+=Ad.n;break;default:throw new Error( ` Unexpected type '${Ad.type}' ` )}return Td(),{...Ra,value:nd,length:ad,queue:rd};function cd(Ad){nd+=" ".repeat(Ad),ad+=td.tabWidth*Ad}function dd(Ad){nd+=" ".repeat(Ad),ad+=Ad}function pd(){td.useTabs?fd():Td()}function fd(){sd>0&&cd(sd),Sd()}function Td(){ud>0&&dd(ud),Sd()}function Sd(){sd=0,ud=0}}function Ot $ 1(Ra){let qa=0,td=0,rd=Ra.length;e:for(;rd--;){let nd=Ra[rd];if(nd===Te){td++;continue}for(let ad=nd.length-1;ad>=0;ad--){let sd=nd[ad];if(sd===" "||sd===" ")qa++;else{Ra[rd]=nd.slice(0,ad+1);break e}}}if(qa>0||td>0)for(Ra.length=rd+1;td-- >0;)Ra.push(Te);return qa}function et $ 2(Ra,qa,td,rd,nd,ad){if(td===Number.POSITIVE_INFINITY)return!0;let sd=qa.length,ud=[Ra],cd=[];for(;td>=0;){if(ud.length===0){if(sd===0)return!0;ud.push(qa[--sd]);continue}let{mode:dd,doc:pd}=ud.pop(),fd=G $ 1(pd);switch(fd){case U $ 1:cd.push(pd),td-=Oe(pd);break;case W $ 1:case S $ 1:{let Td=fd===W $ 1?pd:pd.parts;for(let Sd=Td.length-1;Sd>=0;Sd--)ud.push({mode:dd,doc:Td[Sd]});break}case L $ 1:case P $ 1:case R $ 3:case N $ 1:ud.push({mode:dd,doc:pd.contents});break;case I $ 1:td+=Ot $ 1(cd);break;case x $ 2:{if(ad&&pd.break)return!1;let Td=pd.break?H $ 1:dd,Sd=pd.expandedStates&&Td===H $ 1?y $ 2(!1,pd.expandedStates,-1):pd.contents;ud.push({mode:Td,doc:Sd});break}case _ $ 2:{let Td=(pd.groupId?nd[pd.groupId]||J $ 1:dd)===H $ 1?pd.breakContents:pd.flatContents;Td&&ud.push({mode:dd,doc:Td});break}case B $ 1:if(dd===H $ 1||pd.hard)return!0;pd.soft||(cd.push(" "),td--);break;case Y $ 1:rd=!0;break;case j $ 1:if(rd)return!1;break}}return!1}function Fe(Ra,qa){let td={},rd=qa.printWidth,nd=Be(qa.endOfLine),ad=0,sd=[{ind:Wr(),mode:H $ 1,doc:Ra}],ud=[],cd=!1,dd=[],pd=0;for(Rr(Ra);sd.length>0;){let{ind:Td,mode:Sd,doc:Ad}=sd.pop();switch(G $ 1(Ad)){case U $ 1:{let Nd=nd!== `
` ?ne $ 1(!1,Ad, `
` ,nd):Ad;ud.push(Nd),sd.length>0&&(ad+=Oe(Nd));break}case W $ 1:for(let Nd=Ad.length-1;Nd>=0;Nd--)sd.push({ind:Td,mode:Sd,doc:Ad[Nd]});break;case z $ 1:if(pd>=2)throw new Error("There are too many 'cursor' in doc.");ud.push(Te),pd++;break;case L $ 1:sd.push({ind:zu(Td,qa),mode:Sd,doc:Ad.contents});break;case P $ 1:sd.push({ind:Gu(Td,Ad.n,qa),mode:Sd,doc:Ad.contents});break;case I $ 1:ad-=Ot $ 1(ud);break;case x $ 2:switch(Sd){case J $ 1:if(!cd){sd.push({ind:Td,mode:Ad.break?H $ 1:J $ 1,doc:Ad.contents});break}case H $ 1:{cd=!1;let Nd={ind:Td,mode:J $ 1,doc:Ad.contents},Ld=rd-ad,Rd=dd.length>0;if(!Ad.break&&et $ 2(Nd,sd,Ld,Rd,td))sd.push(Nd);else if(Ad.expandedStates){let Od=y $ 2(!1,Ad.expandedStates,-1);if(Ad.break){sd.push({ind:Td,mode:H $ 1,doc:Od});break}else for(let kd=1;kd<Ad.expandedStates.length+1;kd++)if(kd>=Ad.expandedStates.length){sd.push({ind:Td,mode:H $ 1,doc:Od});break}else{let Fd=Ad.expandedStates[kd],Ud={ind:Td,mode:J $ 1,doc:Fd};if(et $ 2(Ud,sd,Ld,Rd,td)){sd.push(Ud);break}}}else sd.push({ind:Td,mode:H $ 1,doc:Ad.contents});break}}Ad.id&&(td[Ad.id]=y $ 2(!1,sd,-1).mode);break;case S $ 1:{let Nd=rd-ad,{parts:Ld}=Ad;if(Ld.length===0)break;let[Rd,Od]=Ld,kd={ind:Td,mode:J $ 1,doc:Rd},Fd={ind:Td,mode:H $ 1,doc:Rd},Ud=et $ 2(kd,[],Nd,dd.length>0,td,!0);if(Ld.length===1){Ud?sd.push(kd):sd.push(Fd);break}let Hd={ind:Td,mode:J $ 1,doc:Od},Vd={ind:Td,mode:H $ 1,doc:Od};if(Ld.length===2){Ud?sd.push(Hd,kd):sd.push(Vd,Fd);break}Ld.splice(0,2);let Zd={ind:Td,mode:Sd,doc:Ge(Ld)},zd=Ld[0];et $ 2({ind:Td,mode:J $ 1,doc:[Rd,Od,zd]},[],Nd,dd.length>0,td,!0)?sd.push(Zd,Hd,kd):Ud?sd.push(Zd,Vd,kd):sd.push(Zd,Vd,Fd);break}case _ $ 2:case R $ 3:{let Nd=Ad.groupId?td[Ad.groupId]:Sd;if(Nd===H $ 1){let Ld=Ad.type===_ $ 2?Ad.breakContents:Ad.negate?Ad.contents:De(Ad.contents);Ld&&sd.push({ind:Td,mode:Sd,doc:Ld})}if(Nd===J $ 1){let Ld=Ad.type===_ $ 2?Ad.flatContents:Ad.negate?De(Ad.contents):Ad.contents;Ld&&sd.push({ind:Td,mode:Sd,doc:Ld})}break}case Y $ 1:dd.push({ind:Td,mode:Sd,doc:Ad.contents});break;case j $ 1:dd.length>0&&sd.push({ind:Td,mode:Sd,doc:_e});break;case B $ 1:switch(Sd){case J $ 1:if(Ad.hard)cd=!0;else{Ad.soft||(ud.push(" "),ad+=1);break}case H $ 1:if(dd.length>0){sd.push({ind:Td,mode:Sd,doc:Ad},...dd.reverse()),dd.length=0;break}Ad.literal?Td.root?(ud.push(nd,Td.root.value),ad=Td.root.length):(ud.push(nd),ad=0):(ad-=Ot $ 1(ud),ud.push(nd+Td.value),ad=Td.length);break}break;case N $ 1:sd.push({ind:Td,mode:Sd,doc:Ad.contents});break;case b $ 1:break;default:throw new Q $ 2(Ad)}sd.length===0&&dd.length>0&&(sd.push(...dd.reverse()),dd.length=0)}let fd=ud.indexOf(Te);if(fd!==-1){let Td=ud.indexOf(Te,fd+1),Sd=ud.slice(0,fd).join(""),Ad=ud.slice(fd+1,Td).join(""),Nd=ud.slice(Td+1).join("");return{formatted:Sd+Ad+Nd,cursorNodeStart:Sd.length,cursorNodeText:Ad}}return{formatted:ud.join("")}}function Ku(Ra,qa,td=0){let rd=0;for(let nd=td;nd<Ra.length;++nd)Ra[nd]===" "?rd=rd+qa-rd%qa:rd++;return rd}var me=Ku,te,Nt,tt $ 1,St=class{constructor(Ra){Dr(this,te),this.stack=[Ra]}get key(){let{stack:Ra,siblings:qa}=this;return y $ 2(!1,Ra,qa===null?-2:-4)??null}get index(){return this.siblings===null?null:y $ 2(!1,this.stack,-2)}get node(){return y $ 2(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:Ra}=this,qa=y $ 2(!1,Ra,-3);return Array.isArray(qa)?qa:null}get next(){let{siblings:Ra}=this;return Ra===null?null:Ra[this.index+1]}get previous(){let{siblings:Ra}=this;return Ra===null?null:Ra[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:Ra,index:qa}=this;return Ra!==null&&qa===Ra.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...pe(this,te,tt $ 1).call(this)]}getName(){let{stack:Ra}=this,{length:qa}=Ra;return qa>1?y $ 2(!1,Ra,-2):null}getValue(){return y $ 2(!1,this.stack,-1)}getNode(Ra=0){let qa=pe(this,te,Nt).call(this,Ra);return qa===-1?null:this.stack[qa]}getParentNode(Ra=0){return this.getNode(Ra+1)}call(Ra,...qa){let{stack:td}=this,{length:rd}=td,nd=y $ 2(!1,td,-1);for(let ad of qa)nd=nd[ad],td.push(ad,nd);try{return Ra(this)
2024-09-25 14:23:53 +08:00
` )return qa-2;if(nd=== `
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa-1}else{if(nd===" \r "&&Ra.charAt(qa+1)=== `
` )return qa+2;if(nd=== `
2024-11-27 11:30:55 +08:00
` ||nd===" \r "||nd===" \u 2028"||nd===" \u 2029")return qa+1}return qa}var M $ 1=Ju $ 1;function Xu $ 1(Ra,qa,td={}){let rd=T $ 1(Ra,td.backwards?qa-1:qa,td),nd=M $ 1(Ra,rd,td);return rd!==nd}var V $ 1=Xu $ 1;function Zu $ 1(Ra){return Array.isArray(Ra)&&Ra.length>0}var kt $ 1=Zu $ 1,Gr=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Qu $ 1=Ra=>Object.keys(Ra).filter(qa=>!Gr.has(qa));function eo(Ra){return Ra?qa=>Ra(qa,Gr):Qu $ 1}var X $ 2=eo;function to(Ra){let qa=Ra.type||Ra.kind||"(unknown type)",td=String(Ra.name||Ra.id&&(typeof Ra.id=="object"?Ra.id.name:Ra.id)||Ra.key&&(typeof Ra.key=="object"?Ra.key.name:Ra.key)||Ra.value&&(typeof Ra.value=="object"?"":String(Ra.value))||Ra.operator||"");return td.length>20&&(td=td.slice(0,19)+"…"),qa+(td?" "+td:"")}function Lt(Ra,qa){(Ra.comments??(Ra.comments=[])).push(qa),qa.printed=!1,qa.nodeDescription=to(Ra)}function ue(Ra,qa){qa.leading=!0,qa.trailing=!1,Lt(Ra,qa)}function re(Ra,qa,td){qa.leading=!1,qa.trailing=!1,td&&(qa.marker=td),Lt(Ra,qa)}function oe(Ra,qa){qa.leading=!1,qa.trailing=!0,Lt(Ra,qa)}var Pt=new WeakMap;function ut(Ra,qa){if(Pt.has(Ra))return Pt.get(Ra);let{printer:{getCommentChildNodes:td,canAttachComment:rd,getVisitorKeys:nd},locStart:ad,locEnd:sd}=qa;if(!rd)return[];let ud=((td==null?void 0:td(Ra,qa))??[...Tt $ 1(Ra,{getVisitorKeys:X $ 2(nd)})]).flatMap(cd=>rd(cd)?[cd]:ut(cd,qa));return ud.sort((cd,dd)=>ad(cd)-ad(dd)||sd(cd)-sd(dd)),Pt.set(Ra,ud),ud}function qr(Ra,qa,td,rd){let{locStart:nd,locEnd:ad}=td,sd=nd(qa),ud=ad(qa),cd=ut(Ra,td),dd,pd,fd=0,Td=cd.length;for(;fd<Td;){let Sd=fd+Td>>1,Ad=cd[Sd],Nd=nd(Ad),Ld=ad(Ad);if(Nd<=sd&&ud<=Ld)return qr(Ad,qa,td,Ad);if(Ld<=sd){dd=Ad,fd=Sd+1;continue}if(ud<=Nd){pd=Ad,Td=Sd;continue}throw new Error("Comment location overlaps with node location")}if((rd==null?void 0:rd.type)==="TemplateLiteral"){let{quasis:Sd}=rd,Ad=Rt $ 1(Sd,qa,td);dd&&Rt $ 1(Sd,dd,td)!==Ad&&(dd=null),pd&&Rt $ 1(Sd,pd,td)!==Ad&&(pd=null)}return{enclosingNode:rd,precedingNode:dd,followingNode:pd}}var It $ 1=()=>!1;function Jr(Ra,qa){let{comments:td}=Ra;if(delete Ra.comments,!kt $ 1(td)||!qa.printer.canAttachComment)return;let rd=[],{locStart:nd,locEnd:ad,printer:{experimentalFeatures:{avoidAstMutation:sd=!1}={},handleComments:ud={}},originalText:cd}=qa,{ownLine:dd=It $ 1,endOfLine:pd=It $ 1,remaining:fd=It $ 1}=ud,Td=td.map((Sd,Ad)=>({...qr(Ra,Sd,qa),comment:Sd,text:cd,options:qa,ast:Ra,isLastComment:td.length-1===Ad}));for(let[Sd,Ad]of Td.entries()){let{comment:Nd,precedingNode:Ld,enclosingNode:Rd,followingNode:Od,text:kd,options:Fd,ast:Ud,isLastComment:Hd}=Ad;if(Fd.parser==="json"||Fd.parser==="json5"||Fd.parser==="jsonc"||Fd.parser==="__js_expression"||Fd.parser==="__ts_expression"||Fd.parser==="__vue_expression"||Fd.parser==="__vue_ts_expression"){if(nd(Nd)-nd(Ud)<=0){ue(Ud,Nd);continue}if(ad(Nd)-ad(Ud)>=0){oe(Ud,Nd);continue}}let Vd;if(sd?Vd=[Ad]:(Nd.enclosingNode=Rd,Nd.precedingNode=Ld,Nd.followingNode=Od,Vd=[Nd,kd,Fd,Ud,Hd]),ro(kd,Fd,Td,Sd))Nd.placement="ownLine",dd(...Vd)||(Od?ue(Od,Nd):Ld?oe(Ld,Nd):re(Rd||Ud,Nd));else if(no(kd,Fd,Td,Sd))Nd.placement="endOfLine",pd(...Vd)||(Ld?oe(Ld,Nd):Od?ue(Od,Nd):re(Rd||Ud,Nd));else if(Nd.placement="remaining",!fd(...Vd))if(Ld&&Od){let Zd=rd.length;Zd>0&&rd[Zd-1].followingNode!==Od&&Kr(rd,Fd),rd.push(Ad)}else Ld?oe(Ld,Nd):Od?ue(Od,Nd):re(Rd||Ud,Nd)}if(Kr(rd,qa),!sd)for(let Sd of td)delete Sd.precedingNode,delete Sd.enclosingNode,delete Sd.followingNode}var Xr=Ra=>!/[ \S \n \u 2028 \u 2029]/u.test(Ra);function ro(Ra,qa,td,rd){let{comment:nd,precedingNode:ad}=td[rd],{locStart:sd,locEnd:ud}=qa,cd=sd(nd);if(ad)for(let dd=rd-1;dd>=0;dd--){let{comment:pd,precedingNode:fd}=td[dd];if(fd!==ad||!Xr(Ra.slice(ud(pd),cd)))break;cd=sd(pd)}return V $ 1(Ra,cd,{backwards:!0})}function no(Ra,qa,td,rd){let{comment:nd,followingNode:ad}=td[rd],{locStart:sd,locEnd:ud}=qa,cd=ud(nd);if(ad)for(let dd=rd+1;dd<td.length;dd++){let{comment:pd,followingNode:fd}=td[dd];if(fd!==ad||!Xr(Ra.slice(cd,sd(pd))))break;cd=ud(pd)}return V $ 1(Ra,cd)}function Kr(Ra,qa){var td,rd;let nd=Ra.length;if(nd===0)return;let{precedingNode:ad,followingNode:sd}=Ra[0],ud=qa.loc
2024-09-18 09:46:23 +08:00
( mixed values within one file are normalised by looking at what 's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file' s first docblock comment . ",cliCategory:" Other "},parser:{category:" Global ",type:" choice ",default:void 0,description:" Which parser to use . ",exception:Ra=>typeof Ra==" string "||typeof Ra==" function ",choices:[{value:" flow ",description:" Flow "},{value:" babel ",description:" JavaScript "},{value:" babel - flow ",description:" Flow "},{value:" babel - ts ",description:" TypeScript "},{value:" typescript ",description:" TypeScript "},{value:" acorn ",description:" JavaScript "},{value:" espree ",description:" JavaScript "},{value:" meriyah ",description:" JavaScript "},{value:" css ",description:" CSS "},{value:" less ",description:" Less "},{value:" scss ",description:" SCSS "},{value:" json ",description:" JSON "},{value:" json5 ",description:" JSON5 "},{value:" jsonc ",description:" JSON with Comments "},{value:" json - stringify ",description:" JSON . stringify "},{value:" graphql ",description:" GraphQL "},{value:" markdown ",description:" Markdown "},{value:" mdx ",description:" MDX "},{value:" vue ",description:" Vue "},{value:" yaml ",description:" YAML "},{value:" glimmer ",description:" Ember / Handlebars "},{value:" html ",description:" HTML "},{value:" angular ",description:" Angular "},{value:" lwc ",description:" Lightning Web Components "}]},plugins:{type:" path ",array:!0,default:[{value:[]}],category:" Global ",description:" Add a plugin . Multiple plugins can be passed as separate ` --plugin ` s . ",exception:Ra=>typeof Ra==" string "||typeof Ra==" object ",cliName:" plugin ",cliCategory:" Config "},printWidth:{category:" Global ",type:" int ",default:80,description:" The line length where Prettier will try wrap . ",range:{start:0,end:1/0,step:1}},rangeEnd:{category:" Special ",type:" int " , default : 1 / 0 , range : { start : 0 , end : 1 / 0 , step : 1 } , description : ` Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement . ` ,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description: ` Format code starting at a given character offset .
The range will extend backwards to the start of the first line containing the selected statement . ` ,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description: ` Require either '@prettier' or '@format' to be present in the file ' s first docblock comment
2024-09-25 14:23:53 +08:00
in order for it to be formatted . ` ,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function ot $ 1({plugins:Ra=[],showDeprecated:qa=!1}={}){let td=Ra.flatMap(nd=>nd.languages??[]),rd=[];for(let nd of lo $ 1(Object.assign({},...Ra.map(({options:ad})=>ad),rn)))!qa&&nd.deprecated||(Array.isArray(nd.choices)&&(qa||(nd.choices=nd.choices.filter(ad=>!ad.deprecated)),nd.name==="parser"&&(nd.choices=[...nd.choices,...Do(nd.choices,td,Ra)])),nd.pluginDefaults=Object.fromEntries(Ra.filter(ad=>{var sd;return((sd=ad.defaultOptions)==null?void 0:sd[nd.name])!==void 0}).map(ad=>[ad.name,ad.defaultOptions[nd.name]])),rd.push(nd));return{languages:td,options:rd}}function*Do(Ra,qa,td){let rd=new Set(Ra.map(nd=>nd.value));for(let nd of qa)if(nd.parsers){for(let ad of nd.parsers)if(!rd.has(ad)){rd.add(ad);let sd=td.find(cd=>cd.parsers&&Object.prototype.hasOwnProperty.call(cd.parsers,ad)),ud=nd.name;sd!=null&&sd.name&&(ud+= ` ( plugin : $ { sd . name } ) ` ),yield{value:ad,description:ud}}}}function lo $ 1(Ra){let qa=[];for(let[td,rd]of Object.entries(Ra)){let nd={name:td,...rd};Array.isArray(nd.default)&&(nd.default=y $ 2(!1,nd.default,-1).value),qa.push(nd)}return qa}var co=Ra=>String(Ra).split(/[/ \\ ]/u).pop();function nn(Ra,qa){if(!qa)return;let td=co(qa).toLowerCase();return Ra.find(({filenames:rd})=>rd==null?void 0:rd.some(nd=>nd.toLowerCase()===td))??Ra.find(({extensions:rd})=>rd==null?void 0:rd.some(nd=>td.endsWith(nd)))}function fo(Ra,qa){if(qa)return Ra.find(({name:td})=>td.toLowerCase()===qa)??Ra.find(({aliases:td})=>td==null?void 0:td.includes(qa))??Ra.find(({extensions:td})=>td==null?void 0:td.includes( ` . $ { qa } ` ))}function po $ 1(Ra,qa){let td=Ra.plugins.flatMap(nd=>nd.languages??[]),rd=fo(td,qa.language)??nn(td,qa.physicalFile)??nn(td,qa.file)??(qa.physicalFile,void 0);return rd==null?void 0:rd.parsers[0]}var un=po $ 1,ie={key:Ra=>/^[ $ _a-zA-Z][ $ _a-zA-Z0-9]* $ /.test(Ra)?Ra:JSON.stringify(Ra),value(Ra){if(Ra===null||typeof Ra!="object")return JSON.stringify(Ra);if(Array.isArray(Ra))return ` [ $ { Ra . map ( td => ie . value ( td ) ) . join ( ", " ) } ] ` ;let qa=Object.keys(Ra);return qa.length===0?"{}": ` { $ { qa . map ( td => ` ${ ie . key ( td ) } : ${ ie . value ( Ra [ td ] ) } ` ) . join ( ", " ) } } ` },pair:({key:Ra,value:qa})=>ie.value({[Ra]:qa})},Yt=Me $ 1(it()),an=(Ra,qa,{descriptor:td})=>{let rd=[ ` $ { Yt . default . yellow ( typeof Ra == "string" ? td . key ( Ra ) : td . pair ( Ra ) ) } is deprecated ` ];return qa&&rd.push( ` we now treat it as $ { Yt . default . blue ( typeof qa == "string" ? td . key ( qa ) : td . pair ( qa ) ) } ` ),rd.join("; ")+"."},le=Me $ 1(it()),st $ 1=Symbol.for("vnopts.VALUE_NOT_EXIST"),he $ 1=Symbol.for("vnopts.VALUE_UNCHANGED"),Dn $ 1=" ".repeat(2),cn $ 1=(Ra,qa,td)=>{let{text:rd,list:nd}=td.normalizeExpectedResult(td.schemas[Ra].expected(td)),ad=[];return rd&&ad.push(ln(Ra,qa,rd,td.descriptor)),nd&&ad.push([ln(Ra,qa,nd.title,td.descriptor)].concat(nd.values.map(sd=>fn(sd,td.loggerPrintWidth))).join( `
` )),pn(ad,td.loggerPrintWidth)};function ln(Ra,qa,td,rd){return[ ` Invalid $ { le . default . red ( rd . key ( Ra ) ) } value . ` , ` Expected $ { le . default . blue ( td ) } , ` , ` but received $ { qa === st$1 ? le . default . gray ( "nothing" ) : le . default . red ( rd . value ( qa ) ) } . ` ].join(" ")}function fn({text:Ra,list:qa},td){let rd=[];return Ra&&rd.push( ` - $ { le . default . blue ( Ra ) } ` ),qa&&rd.push([ ` - $ { le . default . blue ( qa . title ) } : ` ].concat(qa.values.map(nd=>fn(nd,td-Dn $ 1.length).replace(/^| \n /g, ` $ & $ { Dn$1 } ` ))).join( `
` )),pn(rd,td)}function pn(Ra,qa){if(Ra.length===1)return Ra[0];let[td,rd]=Ra,[nd,ad]=Ra.map(sd=>sd.split( `
2024-11-27 11:30:55 +08:00
` ,1)[0].length);return nd>qa&&nd>ad?rd:td}var Wt=Me $ 1(it()),jt=[],dn=[];function Ht $ 1(Ra,qa){if(Ra===qa)return 0;let td=Ra;Ra.length>qa.length&&(Ra=qa,qa=td);let rd=Ra.length,nd=qa.length;for(;rd>0&&Ra.charCodeAt(~-rd)===qa.charCodeAt(~-nd);)rd--,nd--;let ad=0;for(;ad<rd&&Ra.charCodeAt(ad)===qa.charCodeAt(ad);)ad++;if(rd-=ad,nd-=ad,rd===0)return nd;let sd,ud,cd,dd,pd=0,fd=0;for(;pd<rd;)dn[pd]=Ra.charCodeAt(ad+pd),jt[pd]=++pd;for(;fd<nd;)for(sd=qa.charCodeAt(ad+fd),cd=fd++,ud=fd,pd=0;pd<rd;pd++)dd=sd===dn[pd]?cd:cd+1,cd=jt[pd],ud=jt[pd]=cd>ud?dd>ud?ud+1:dd:dd>cd?cd+1:dd;return ud}var at $ 2=(Ra,qa,{descriptor:td,logger:rd,schemas:nd})=>{let ad=[ ` Ignored unknown option $ { Wt . default . yellow ( td . pair ( { key : Ra , value : qa } ) ) } . ` ],sd=Object.keys(nd).sort().find(ud=>Ht $ 1(Ra,ud)<3);sd&&ad.push( ` Did you mean $ { Wt . default . blue ( td . key ( sd ) ) } ? ` ),rd.warn(ad.join(" "))},Fo=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function mo $ 1(Ra,qa){let td=new Ra(qa),rd=Object.create(td);for(let nd of Fo)nd in qa&&(rd[nd]=Eo(qa[nd],td,O $ 2.prototype[nd].length));return rd}var O $ 2=class{static create(qa){return mo $ 1(this,qa)}constructor(qa){this.name=qa.name}default(qa){}expected(qa){return"nothing"}validate(qa,td){return!1}deprecated(qa,td){return!1}forward(qa,td){}redirect(qa,td){}overlap(qa,td,rd){return qa}preprocess(qa,td){return qa}postprocess(qa,td){return he $ 1}};function Eo(Ra,qa,td){return typeof Ra=="function"?(...rd)=>Ra(...rd.slice(0,td-1),qa,...rd.slice(td-1)):()=>Ra}var Dt $ 1=class extends O $ 2{constructor(qa){super(qa),this._sourceName=qa.sourceName}expected(qa){return qa.schemas[this._sourceName].expected(qa)}validate(qa,td){return td.schemas[this._sourceName].validate(qa,td)}redirect(qa,td){return this._sourceName}},lt=class extends O $ 2{expected(){return"anything"}validate(){return!0}},ct=class extends O $ 2{constructor({valueSchema:Ra,name:qa=Ra.name,...td}){super({...td,name:qa}),this._valueSchema=Ra}expected(Ra){let{text:qa,list:td}=Ra.normalizeExpectedResult(this._valueSchema.expected(Ra));return{text:qa&& ` an array of $ { qa } ` ,list:td&&{title:"an array of the following values",values:[{list:td}]}}}validate(Ra,qa){if(!Array.isArray(Ra))return!1;let td=[];for(let rd of Ra){let nd=qa.normalizeValidateResult(this._valueSchema.validate(rd,qa),rd);nd!==!0&&td.push(nd.value)}return td.length===0?!0:{value:td}}deprecated(Ra,qa){let td=[];for(let rd of Ra){let nd=qa.normalizeDeprecatedResult(this._valueSchema.deprecated(rd,qa),rd);nd!==!1&&td.push(...nd.map(({value:ad})=>({value:[ad]})))}return td}forward(Ra,qa){let td=[];for(let rd of Ra){let nd=qa.normalizeForwardResult(this._valueSchema.forward(rd,qa),rd);td.push(...nd.map(Fn))}return td}redirect(Ra,qa){let td=[],rd=[];for(let nd of Ra){let ad=qa.normalizeRedirectResult(this._valueSchema.redirect(nd,qa),nd);"remain"in ad&&td.push(ad.remain),rd.push(...ad.redirect.map(Fn))}return td.length===0?{redirect:rd}:{redirect:rd,remain:td}}overlap(Ra,qa){return Ra.concat(qa)}};function Fn({from:Ra,to:qa}){return{from:[Ra],to:qa}}var ft=class extends O $ 2{expected(){return"true or false"}validate(Ra){return typeof Ra=="boolean"}};function En(Ra,qa){let td=Object.create(null);for(let rd of Ra){let nd=rd[qa];if(td[nd])throw new Error( ` Duplicate $ { qa } $ { JSON . stringify ( nd ) } ` );td[nd]=rd}return td}function hn(Ra,qa){let td=new Map;for(let rd of Ra){let nd=rd[qa];if(td.has(nd))throw new Error( ` Duplicate $ { qa } $ { JSON . stringify ( nd ) } ` );td.set(nd,rd)}return td}function Cn $ 1(){let Ra=Object.create(null);return qa=>{let td=JSON.stringify(qa);return Ra[td]?!0:(Ra[td]=!0,!1)}}function gn $ 1(Ra,qa){let td=[],rd=[];for(let nd of Ra)qa(nd)?td.push(nd):rd.push(nd);return[td,rd]}function yn(Ra){return Ra===Math.floor(Ra)}function An(Ra,qa){if(Ra===qa)return 0;let td=typeof Ra,rd=typeof qa,nd=["undefined","object","boolean","number","string"];return td!==rd?nd.indexOf(td)-nd.indexOf(rd):td!=="string"?Number(Ra)-Number(qa):Ra.localeCompare(qa)}function Bn $ 1(Ra){return(...qa)=>{let td=Ra(...qa);return typeof td=="string"?new Error(td):td}}function Mt(Ra){return Ra===void 0?{
` +rd,Ra.codeFrame=rd,Ra}throw Ra}var ce=ko;async function Un(Ra,qa,td,rd,nd){let{embeddedLanguageFormatting:ad,printer:{embed:sd,hasPrettierIgnore:ud=()=>!1,getVisitorKeys:cd}}=td;if(!sd||ad!=="auto")return;if(sd.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let dd=X $ 2(sd.getVisitorKeys??cd),pd=[];Sd();let fd=Ra.stack;for(let{print:Ad,node:Nd,pathStack:Ld}of pd)try{Ra.stack=Ld;let Rd=await Ad(Td,qa,Ra,td);Rd&&nd.set(Nd,Rd)}catch(Rd){if(globalThis.PRETTIER_DEBUG)throw Rd}Ra.stack=fd;function Td(Ad,Nd){return Po(Ad,Nd,td,rd)}function Sd(){let{node:Ad}=Ra;if(Ad===null||typeof Ad!="object"||ud(Ra))return;for(let Ld of dd(Ad))Array.isArray(Ad[Ld])?Ra.each(Sd,Ld):Ra.call(Sd,Ld);let Nd=sd(Ra,td);if(Nd){if(typeof Nd=="function"){pd.push({print:Nd,node:Ad,pathStack:[...Ra.stack]});return}nd.set(Ad,Nd)}}}async function Po(Ra,qa,td,rd){let nd=await se({...td,...qa,parentParser:td.parser,originalText:Ra},{passThrough:!0}),{ast:ad}=await ce(Ra,nd),sd=await rd(ad,nd);return Ze(sd)}function Io(Ra,qa){let{originalText:td,[Symbol.for("comments")]:rd,locStart:nd,locEnd:ad,[Symbol.for("printedComments")]:sd}=qa,{node:ud}=Ra,cd=nd(ud),dd=ad(ud);for(let pd of rd)nd(pd)>=cd&&ad(pd)<=dd&&sd.add(pd);return td.slice(cd,dd)}var zn=Io;async function Ye(Ra,qa){({ast:Ra}=await Qt(Ra,qa));let td=new Map,rd=new Mr(Ra),nd=new Map;await Un(rd,sd,qa,Ye,nd);let ad=await Gn $ 1(rd,qa,sd,void 0,nd);return en(qa),ad;function sd(cd,dd){return cd===void 0||cd===rd?ud(dd):Array.isArray(cd)?rd.call(()=>ud(dd),...cd):rd.call(()=>ud(dd),cd)}function ud(cd){let dd=rd.node;if(dd==null)return"";let pd=dd&&typeof dd=="object"&&cd===void 0;if(pd&&td.has(dd))return td.get(dd);let fd=Gn $ 1(rd,qa,sd,cd,nd);return pd&&td.set(dd,fd),fd}}function Gn $ 1(Ra,qa,td,rd,nd){var ad;let{node:sd}=Ra,{printer:ud}=qa,cd;return(ad=ud.hasPrettierIgnore)!=null&&ad.call(ud,Ra)?cd=zn(Ra,qa):nd.has(sd)?cd=nd.get(sd):cd=ud.print(Ra,qa,td,rd),sd===qa.cursorNode&&(cd=Qe(cd,dd=>[ve,dd,ve])),ud.printComment&&(!ud.willPrintOwnComments||!ud.willPrintOwnComments(Ra,qa))&&(cd=Qr $ 1(Ra,cd,qa)),cd}async function Qt(Ra,qa){let td=Ra.comments??[];qa[Symbol.for("comments")]=td,qa[Symbol.for("tokens")]=Ra.tokens??[],qa[Symbol.for("printedComments")]=new Set,Jr(Ra,qa);let{printer:{preprocess:rd}}=qa;return Ra=rd?await rd(Ra,qa):Ra,{ast:Ra,comments:td}}function Ro(Ra,qa){let{cursorOffset:td,locStart:rd,locEnd:nd}=qa,ad=X $ 2(qa.printer.getVisitorKeys),sd=cd=>rd(cd)<=td&&nd(cd)>=td,ud=Ra;for(let cd of Ur(Ra,{getVisitorKeys:ad,filter:sd}))ud=cd;return ud}var Kn=Ro;function Yo(Ra,qa){let{printer:{massageAstNode:td,getVisitorKeys:rd}}=qa;if(!td)return Ra;let nd=X $ 2(rd),ad=td.ignoredProperties??new Set;return sd(Ra);function sd(ud,cd){if(!(ud!==null&&typeof ud=="object"))return ud;if(Array.isArray(ud))return ud.map(Td=>sd(Td,cd)).filter(Boolean);let dd={},pd=new Set(nd(ud));for(let Td in ud)!Object.prototype.hasOwnProperty.call(ud,Td)||ad.has(Td)||(pd.has(Td)?dd[Td]=sd(ud[Td],ud):dd[Td]=ud[Td]);let fd=td(ud,dd,cd);if(fd!==null)return fd??dd}}var qn $ 1=Yo,jo $ 1=(Ra,qa,td)=>{if(!(Ra&&qa==null)){if(qa.findLastIndex)return qa.findLastIndex(td);for(let rd=qa.length-1;rd>=0;rd--){let nd=qa[rd];if(td(nd,rd,qa))return rd}return-1}},Jn $ 1=jo $ 1,Ho $ 1=({parser:Ra})=>Ra==="json"||Ra==="json5"||Ra==="jsonc"||Ra==="json-stringify";function Wo $ 1(Ra,qa){let td=[Ra.node,...Ra.parentNodes],rd=new Set([qa.node,...qa.parentNodes]);return td.find(nd=>Qn $ 1.has(nd.type)&&rd.has(nd))}function Xn $ 1(Ra){let qa=Jn $ 1(!1,Ra,td=>td.type!=="Program"&&td.type!=="File");return qa===-1?Ra:Ra.slice(0,qa+1)}function Mo(Ra,qa,{locStart:td,locEnd:rd}){let nd=Ra.node,ad=qa.node;if(nd===ad)return{startNode:nd,endNode:ad};let sd=td(Ra.node);for(let cd of Xn $ 1(qa.parentNodes))if(td(cd)>=sd)ad=cd;else break;let ud=rd(qa.node);for(let cd of Xn $ 1(Ra.parentNodes)){if(rd(cd)<=ud)nd=cd;else break;if(nd===ad)break}return{startNode:nd,endNode:ad}}function er(Ra,qa,td,rd,nd=[],ad){let{locStart:sd,locEnd:ud}=td,cd=sd(Ra),dd=ud(Ra);if(!(
` ,nd)+1),cd=rd.slice(ud,nd).match(/^ \s */u)[0],dd=me(cd,qa.tabWidth),pd=await ou $ 1(sd,{...qa,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:qa.cursorOffset>nd&&qa.cursorOffset<=ad?qa.cursorOffset-nd:-1,endOfLine:"lf"},dd),fd=pd.formatted.trimEnd(),{cursorOffset:Td}=qa;Td>ad?Td+=fd.length-sd.length:pd.cursorOffset>=0&&(Td=pd.cursorOffset+nd);let Sd=rd.slice(0,nd)+fd+rd.slice(ad);if(qa.endOfLine!=="lf"){let Ad=Be(qa.endOfLine);Td>=0&&Ad=== ` \ r
` &&(Td+=wt(Sd.slice(0,Td), `
` )),Sd=ne $ 1(!1,Sd, `
` ,Ad)}return{formatted:Sd,cursorOffset:Td,comments:pd.comments}}function tr(Ra,qa,td){return typeof qa!="number"||Number.isNaN(qa)||qa<0||qa>Ra.length?td:qa}function ru $ 1(Ra,qa){let{cursorOffset:td,rangeStart:rd,rangeEnd:nd}=qa;return td=tr(Ra,td,-1),rd=tr(Ra,rd,0),nd=tr(Ra,nd,Ra.length),{...qa,cursorOffset:td,rangeStart:rd,rangeEnd:nd}}function iu $ 1(Ra,qa){let{cursorOffset:td,rangeStart:rd,rangeEnd:nd,endOfLine:ad}=ru $ 1(Ra,qa),sd=Ra.charAt(0)===uu $ 1;if(sd&&(Ra=Ra.slice(1),td--,rd--,nd--),ad==="auto"&&(ad=Fr(Ra)),Ra.includes(" \r ")){let ud=cd=>wt(Ra.slice(0,Math.max(cd,0)), ` \ r
2024-09-25 14:23:53 +08:00
` );td-=ud(td),rd-=ud(rd),nd-=ud(nd),Ra=mr(Ra)}return{hasBOM:sd,text:Ra,options:ru $ 1(Ra,{...qa,cursorOffset:td,rangeStart:rd,rangeEnd:nd,endOfLine:ad})}}async function nu $ 1(Ra,qa){let td=await ht $ 1(qa);return!td.hasPragma||td.hasPragma(Ra)}async function rr(Ra,qa){let{hasBOM:td,text:rd,options:nd}=iu $ 1(Ra,await se(qa));if(nd.rangeStart>=nd.rangeEnd&&rd!==""||nd.requirePragma&&!await nu $ 1(rd,nd))return{formatted:Ra,cursorOffset:qa.cursorOffset,comments:[]};let ad;return nd.rangeStart>0||nd.rangeEnd<rd.length?ad=await Uo $ 1(rd,nd):(!nd.requirePragma&&nd.insertPragma&&nd.printer.insertPragma&&!await nu $ 1(rd,nd)&&(rd=nd.printer.insertPragma(rd)),ad=await ou $ 1(rd,nd)),td&&(ad.formatted=uu $ 1+ad.formatted,ad.cursorOffset>=0&&ad.cursorOffset++),ad}async function su $ 1(Ra,qa,td){let{text:rd,options:nd}=iu $ 1(Ra,await se(qa)),ad=await ce(rd,nd);return td&&(td.preprocessForPrint&&(ad.ast=await Qt(ad.ast,nd)),td.massage&&(ad.ast=qn $ 1(ad.ast,nd))),ad}async function au $ 1(Ra,qa){qa=await se(qa);let td=await Ye(Ra,qa);return Fe(td,qa)}async function Du(Ra,qa){let td=Or(Ra),{formatted:rd}=await rr(td,{...qa,parser:"__js_expression"});return rd}async function lu $ 1(Ra,qa){qa=await se(qa);let{ast:td}=await ce(Ra,qa);return Ye(td,qa)}async function cu $ 1(Ra,qa){return Fe(Ra,await se(qa))}var nr={};We(nr,{builders:()=>Go $ 1,printer:()=>Ko $ 1,utils:()=>qo});var Go $ 1={join:be $ 1,line:Ke $ 1,softline:vr,hardline:q $ 1,literalline:qe $ 1,group:_t,conditionalGroup:Ar,fill:Ge,lineSuffix:xe $ 1,lineSuffixBoundary:xr,cursor:ve,breakParent:de,ifBreak:Br,trim:_r,indent:De,indentIfBreak:wr,align:ae,addAlignmentToDoc:Je $ 1,markAsRoot:gr,dedentToRoot:Cr,dedent:yr,hardlineWithoutBreakParent:_e,literallineWithoutBreakParent:vt,label:br $ 2,concat:Ra=>Ra},Ko $ 1={printDocToString:Fe},qo={willBreak:Ir,traverseDoc:we,findInDoc:Xe,mapDoc:Ne,removeLines:Yr,stripTrailingHardline:Ze,replaceEndOfLine:jr,canBreak:Hr},fu="3.3.3",or={};We(or,{addDanglingComment:()=>re,addLeadingComment:()=>ue,addTrailingComment:()=>oe,getAlignmentSize:()=>me,getIndentSize:()=>pu $ 1,getMaxContinuousCount:()=>du $ 1,getNextNonSpaceNonCommentCharacter:()=>Fu,getNextNonSpaceNonCommentCharacterIndex:()=>si,getStringWidth:()=>Oe,hasNewline:()=>V $ 1,hasNewlineInRange:()=>mu,hasSpaces:()=>Eu,isNextLineEmpty:()=>ci,isNextLineEmptyAfterIndex:()=>gt,isPreviousLineEmpty:()=>Di $ 1,makeString:()=>hu $ 1,skip:()=>Ee,skipEverythingButNewLine:()=>nt $ 1,skipInlineComment:()=>Ce,skipNewline:()=>M $ 1,skipSpaces:()=>T $ 1,skipToLineEnd:()=>rt,skipTrailingComment:()=>ge,skipWhitespace:()=>zr});function Jo(Ra,qa){if(qa===!1)return!1;if(Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="*"){for(let td=qa+2;td<Ra.length;++td)if(Ra.charAt(td)==="*"&&Ra.charAt(td+1)==="/")return td+2}return qa}var Ce=Jo;function Xo(Ra,qa){return qa===!1?!1:Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="/"?nt $ 1(Ra,qa):qa}var ge=Xo;function Zo(Ra,qa){let td=null,rd=qa;for(;rd!==td;)td=rd,rd=T $ 1(Ra,rd),rd=Ce(Ra,rd),rd=ge(Ra,rd),rd=M $ 1(Ra,rd);return rd}var je $ 1=Zo;function Qo(Ra,qa){let td=null,rd=qa;for(;rd!==td;)td=rd,rd=rt(Ra,rd),rd=Ce(Ra,rd),rd=T $ 1(Ra,rd);return rd=ge(Ra,rd),rd=M $ 1(Ra,rd),rd!==!1&&V $ 1(Ra,rd)}var gt=Qo;function ei(Ra,qa){let td=Ra.lastIndexOf( `
` );return td===-1?0:me(Ra.slice(td+1).match(/^[ \t ]*/u)[0],qa)}var pu $ 1=ei;function ur(Ra){if(typeof Ra!="string")throw new TypeError("Expected a string");return Ra.replace(/[| \\ {}()[ \] ^ $ +*?.]/g," \\ $ &").replace(/-/g," \\ x2d")}function ti $ 1(Ra,qa){let td=Ra.match(new RegExp( ` ( $ { ur ( qa ) } ) + ` ,"gu"));return td===null?0:td.reduce((rd,nd)=>Math.max(rd,nd.length/qa.length),0)}var du $ 1=ti $ 1;function ri $ 1(Ra,qa){let td=je $ 1(Ra,qa);return td===!1?"":Ra.charAt(td)}var Fu=ri $ 1;function ni $ 1(Ra,qa,td){for(let rd=qa;rd<td;++rd)if(Ra.charAt(rd)=== `
2024-11-27 11:30:55 +08:00
` )return!0;return!1}var mu=ni $ 1;function ui $ 1(Ra,qa,td={}){return T $ 1(Ra,td.backwards?qa-1:qa,td)!==qa}var Eu=ui $ 1;function oi $ 1(Ra,qa,td){let rd=qa==='"'?"'":'"',nd=ne $ 1(!1,Ra,/ \\ (.)|(["'])/gsu,(ad,sd,ud)=>sd===rd?sd:ud===qa?" \\ "+ud:ud||(td&&/^[^ \n \r "'0-7 \\ bfnrt-vx \u 2028 \u 2029] $ /u.test(sd)?sd:" \\ "+sd));return qa+nd+qa}var hu $ 1=oi $ 1;function ii $ 1(Ra,qa,td){return je $ 1(Ra,td(qa))}function si(Ra,qa){return arguments.length===2||typeof qa=="number"?je $ 1(Ra,qa):ii $ 1(...arguments)}function ai(Ra,qa,td){return Le $ 1(Ra,td(qa))}function Di $ 1(Ra,qa){return arguments.length===2||typeof qa=="number"?Le $ 1(Ra,qa):ai(...arguments)}function li $ 1(Ra,qa,td){return gt(Ra,td(qa))}function ci(Ra,qa){return arguments.length===2||typeof qa=="number"?gt(Ra,qa):li $ 1(...arguments)}function fe(Ra,qa=1){return async(...td)=>{let rd=td[qa]??{},nd=rd.plugins??[];return td[qa]={...rd,plugins:Array.isArray(nd)?nd:Object.values(nd)},Ra(...td)}}var Cu $ 1=fe(rr);async function gu $ 1(Ra,qa){let{formatted:td}=await Cu $ 1(Ra,{...qa,cursorOffset:-1});return td}async function fi(Ra,qa){return await gu $ 1(Ra,qa)===Ra}var pi $ 2=fe(ot $ 1,0),di $ 1={parse:fe(su $ 1),formatAST:fe(au $ 1),formatDoc:fe(Du),printToDoc:fe(lu $ 1),printDocToString:fe(cu $ 1)};function addPrefix(Ra){return ` $ { prefix } _ _$ { Ra } ` }function customizeTheme(Ra,qa){const td=JSON.parse(JSON.stringify(Ra)),{fontSize:rd,color:nd}=qa;if(rd)for(let ad=1;ad<=6;ad++){const sd=td.block[ ` h$ { ad } ` ]["font-size"];td.block[ ` h$ { ad } ` ]["font-size"]= ` $ { rd * Number . parseFloat ( sd ) } px ` }return nd&&(td.base["--md-primary-color"]=nd),td}function customCssWithTemplate(Ra,qa,td){const rd=customizeTheme(td,{color:qa}),nd=(ud,cd,dd)=>{dd.forEach(pd=>{cd[pd]&&(ud[pd]=Object.assign(ud[pd]||{},cd[pd]))})},ad=["h1","h2","h3","h4","h5","h6","code","code_pre","p","hr","blockquote","blockquote_note","blockquote_tip","blockquote_important","blockquote_warning","blockquote_caution","blockquote_p","blockquote_p_note","blockquote_p_tip","blockquote_p_important","blockquote_p_warning","blockquote_p_caution","blockquote_title","blockquote_title_note","blockquote_title_tip","blockquote_title_important","blockquote_title_warning","blockquote_title_caution","image","ul","ol"],sd=["strong","codespan","link","wx_link","listitem"];return nd(rd.block,Ra,ad),nd(rd.inline,Ra,sd),rd}function css2json(Ra){Ra=Ra.replace(/ \/ \* [ \s \S ]*? \* \/ /g,"");const qa={},td=rd=>rd.reduce((nd,ad)=>{const[sd,ud]=ad.split(":").map(cd=>cd.trim());return sd&&(nd[sd]=ud),nd},{});for(;Ra.includes("{")&&Ra.includes("}");){const rd=Ra.indexOf("{"),nd=Ra.indexOf("}"),ad=Ra.substring(rd+1,nd).split(";").map(cd=>cd.trim()).filter(Boolean),sd=Ra.substring(0,rd).split(",").map(cd=>cd.trim()),ud=td(ad);sd.forEach(cd=>{qa[cd]={...qa[cd]||{},...ud}}),Ra=Ra.slice(nd+1).trim()}return qa}function getStyleString(Ra){return Object.entries(Ra??{}).map(([qa,td])=> ` $ { qa } : $ { td } ` ).join("; ")}async function formatDoc(Ra,qa="markdown"){const td={markdown:[prettierPluginMarkdown,prettierPluginBabel,prettierPluginEstree],css:[prettierPluginCss]},rd=qa in td?qa:"markdown";return await gu $ 1(Ra,{parser:rd,plugins:td[rd]})}function downloadMD(Ra){const qa=document.createElement("a");qa.download="content.md",qa.style.display="none";const td=new Blob([Ra]);qa.href=URL.createObjectURL(td),document.body.appendChild(qa),qa.click(),document.body.removeChild(qa)}function exportHTML(){const Ra=document.querySelector("#output");nd(Ra);const qa=Ra.innerHTML,td=document.createElement("a");td.download="content.html",td.style.display="none";const rd=new Blob([ ` < html > < head > < meta charset = "utf-8" / > < / h e a d > < b o d y > < d i v s t y l e = " w i d t h : 7 5 0 p x ; m a r g i n : a u t o ; " > $ { q a } < / d i v > < / b o d y > < / h t m l > ` ] ) ; t d . h r e f = U R L . c r e a t e O b j e c t U R L ( r d ) , d o c u m e n t . b o d y . a p p e n d C h i l d ( t d ) , t d . c l i c k ( ) , d o c u m e n t . b o d y . r e m o v e C h i l d ( t d ) ; f u n c t i o n n d ( a d ) { f u n c t i o n s d ( p d , f d = [ " w i d t h " , " h e i g h t " ] ) { c o n s t T d = g e t C o m p u t e d S t y l e ( p d , n u l l ) ; r e t u r n O b j e c t . e n t r i e s ( T d ) . f i l t e r ( ( [ S d ] ) = > T d . g e t P r o p e r t y V a l u e ( S d ) & & ! f d . i n c l u d e s ( S d ) ) . m a p ( ( [ S d , A d ] ) = > ` $ { S d } : $ { A d } ; ` ) . j o i n ( " " ) } s w i t c h ( ! 0 ) { c a s e u d ( a d ) : c a s e c d ( a d ) : c a s e d d ( a d ) : a d . s e t A t t r i b u t e ( " s t y l e " , s d ( a d ) ) } a d . c h i l d r e n . l e n g t h & & A r r a y . f r o m ( a d . c h i l d r e n ) . f o r E a c h ( p d = > n d ( p d ) ) ;
2024-09-25 14:23:53 +08:00
` }return rd}function toBase64 $ 1(Ra){return new Promise((qa,td)=>{const rd=new FileReader;rd.readAsDataURL(Ra),rd.onload=()=>qa(rd.result.split(",").pop()),rd.onerror=nd=>td(nd)})}function checkImage(Ra){if(!/ \. (?:gif|jpe?g|png) $ /i.test(Ra.name))return{ok:!1,msg:"请上传 JPG/PNG/GIF 格式的图片"};const td=10;return Ra.size>td*1024*1024?{ok:!1,msg: ` 由于公众号限制 , 图片大小不能超过 $ { td } M ` }:{ok:!0}}function removeLeft(Ra){const qa=Ra.split( `
` ),td=qa.filter(rd=>rd.trim()).map(rd=>rd.match(/(^ \s +)?/)[0].length).sort((rd,nd)=>rd-nd)[0];return qa.map(rd=>rd.slice(td)).join( `
2024-11-27 11:30:55 +08:00
` )}function solveWeChatImage(){const qa=document.getElementById("output").getElementsByTagName("img");for(let td=0;td<qa.length;td++){const rd=qa[td],nd=rd.getAttribute("width"),ad=rd.getAttribute("height");rd.removeAttribute("width"),rd.removeAttribute("height"),rd.style.width=nd,rd.style.height=ad}}function mergeCss(Ra){return juice(Ra,{inlinePseudoElements:!0,preserveImportant:!0})}function deepFreeze(Ra){return Ra instanceof Map?Ra.clear=Ra.delete=Ra.set=function(){throw new Error("map is read-only")}:Ra instanceof Set&&(Ra.add=Ra.clear=Ra.delete=function(){throw new Error("set is read-only")}),Object.freeze(Ra),Object.getOwnPropertyNames(Ra).forEach(qa=>{const td=Ra[qa],rd=typeof td;(rd==="object"||rd==="function")&&!Object.isFrozen(td)&&deepFreeze(td)}),Ra}let Response $ 1=class{constructor(qa){qa.data===void 0&&(qa.data={}),this.data=qa.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function escapeHTML(Ra){return Ra.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function inherit $ 1(Ra,...qa){const td=Object.create(null);for(const rd in Ra)td[rd]=Ra[rd];return qa.forEach(function(rd){for(const nd in rd)td[nd]=rd[nd]}),td}const SPAN_CLOSE="</span>",emitsWrappingTags=Ra=>!!Ra.scope,scopeToCSSClass=(Ra,{prefix:qa})=>{if(Ra.startsWith("language:"))return Ra.replace("language:","language-");if(Ra.includes(".")){const td=Ra.split(".");return[ ` $ { qa } $ { td . shift ( ) } ` ,...td.map((rd,nd)=> ` $ { rd } $ { "_" . repeat ( nd + 1 ) } ` )].join(" ")}return ` $ { qa } $ { Ra } ` };class HTMLRenderer{constructor(qa,td){this.buffer="",this.classPrefix=td.classPrefix,qa.walk(this)}addText(qa){this.buffer+=escapeHTML(qa)}openNode(qa){if(!emitsWrappingTags(qa))return;const td=scopeToCSSClass(qa.scope,{prefix:this.classPrefix});this.span(td)}closeNode(qa){emitsWrappingTags(qa)&&(this.buffer+=SPAN_CLOSE)}value(){return this.buffer}span(qa){this.buffer+= ` < span class = "${qa}" > ` }}const newNode=(Ra={})=>{const qa={children:[]};return Object.assign(qa,Ra),qa};class TokenTree{constructor(){this.rootNode=newNode(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(qa){this.top.children.push(qa)}openNode(qa){const td=newNode({scope:qa});this.add(td),this.stack.push(td)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(qa){return this.constructor._walk(qa,this.rootNode)}static _walk(qa,td){return typeof td=="string"?qa.addText(td):td.children&&(qa.openNode(td),td.children.forEach(rd=>this._walk(qa,rd)),qa.closeNode(td)),qa}static _collapse(qa){typeof qa!="string"&&qa.children&&(qa.children.every(td=>typeof td=="string")?qa.children=[qa.children.join("")]:qa.children.forEach(td=>{TokenTree._collapse(td)}))}}class TokenTreeEmitter extends TokenTree{constructor(qa){super(),this.options=qa}addText(qa){qa!==""&&this.add(qa)}startScope(qa){this.openNode(qa)}endScope(){this.closeNode()}__addSublanguage(qa,td){const rd=qa.root;td&&(rd.scope= ` language : $ { td } ` ),this.add(rd)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function source(Ra){return Ra?typeof Ra=="string"?Ra:Ra.source:null}function lookahead(Ra){return concat $ 2("(?=",Ra,")")}function anyNumberOfTimes(Ra){return concat $ 2("(?:",Ra,")*")}function optional(Ra){return concat $ 2("(?:",Ra,")?")}function concat $ 2(...Ra){return Ra.map(td=>source(td)).join("")}function stripOptionsFromArgs(Ra){const qa=Ra[Ra.length-1];return typeof qa=="object"&&qa.constructor===Object?(Ra.splice(Ra.length-1,1),qa):{}}function either(...Ra){return"("+(stripOptionsFromArgs(Ra).capture?"":"?:")+Ra.map(rd=>source(rd)).join("|")+")"}function countMatchGroups(Ra){return new RegExp(Ra.toString()+"|").exec("").length-1}function startsWith $ 1(Ra,qa){const td=Ra&&Ra.exec(qa);return td&&td.index===0}const BACKREF_RE=/ \[ (?:[^ \\ \] ]| \\ .)* \] | \( \? ?| \\ ([1-9][0-9]*)| \\ ./;function _rewriteBackreferences(Ra,{joinWith:qa}){let td=0;return Ra.map(rd=>{td+=1;const nd=td;let ad
https : //github.com/highlightjs/highlight.js/issues/2277`),qf=xf,Qf=Mf),Yf===void 0&&(Yf=!0);const Bf={code:Qf,language:qf};_f("before:highlight",Bf);const Df=Bf.result?Bf.result:fd(Bf.language,Bf.code,Yf);return Df.code=Bf.code,_f("after:highlight",Df),Df}function fd(xf,Mf,Yf,Qf){const qf=Object.create(null);function Bf(Bh,Yh){return Bh.keywords[Yh]}function Df(){if(!jf.keywords){_h.addText(nh);return}let Bh=0;jf.keywordPatternRe.lastIndex=0;let Yh=jf.keywordPatternRe.exec(nh),dm="";for(;Yh;){dm+=nh.substring(Bh,Yh.index);const rh=Uf.case_insensitive?Yh[0].toLowerCase():Yh[0],If=Bf(jf,rh);if(If){const[Nf,Jf]=If;if(_h.addText(dm),dm="",qf[rh]=(qf[rh]||0)+1,qf[rh]<=MAX_KEYWORD_HITS&&(wh+=Jf),Nf.startsWith("_"))dm+=Yh[0];else{const oh=Uf.classNameAliases[Nf]||Nf;Xf(Yh[0],oh)}}else dm+=Yh[0];Bh=jf.keywordPatternRe.lastIndex,Yh=jf.keywordPatternRe.exec(nh)}dm+=nh.substring(Bh),_h.addText(dm)}function $f(){if(nh==="")return;let Bh=null;if(typeof jf.subLanguage=="string"){if(!qa[jf.subLanguage]){_h.addText(nh);return}Bh=fd(jf.subLanguage,nh,!0,uh[jf.subLanguage]),uh[jf.subLanguage]=Bh._top}else Bh=Sd(nh,jf.subLanguage.length?jf.subLanguage:null);jf.relevance>0&&(wh+=Bh.relevance),_h.__addSublanguage(Bh._emitter,Bh.language)}function Zf(){jf.subLanguage!=null?$f():Df(),nh=""}function Xf(Bh,Yh){Bh!==""&&(_h.startScope(Yh),_h.addText(Bh),_h.endScope())}function Tf(Bh,Yh){let dm=1;const rh=Yh.length-1;for(;dm<=rh;){if(!Bh._emit[dm]){dm++;continue}const If=Uf.classNameAliases[Bh[dm]]||Bh[dm],Nf=Yh[dm];If?Xf(Nf,If):(nh=Nf,Df(),nh=""),dm++}}function vf(Bh,Yh){return Bh.scope&&typeof Bh.scope=="string"&&_h.openNode(Uf.classNameAliases[Bh.scope]||Bh.scope),Bh.beginScope&&(Bh.beginScope._wrap?(Xf(nh,Uf.classNameAliases[Bh.beginScope._wrap]||Bh.beginScope._wrap),nh=""):Bh.beginScope._multi&&(Tf(Bh.beginScope,Yh),nh="")),jf=Object.create(Bh,{parent:{value:jf}}),jf}function Pf(Bh,Yh,dm){let rh=startsWith$1(Bh.endRe,dm);if(rh){if(Bh["on:end"]){const If=new Response$1(Bh);Bh["on:end"](Yh,If),If.isMatchIgnored&&(rh=!1)}if(rh){for(;Bh.endsParent&&Bh.parent;)Bh=Bh.parent;return Bh}}if(Bh.endsWithParent)return Pf(Bh.parent,Yh,dm)}function Gf(Bh){return jf.matcher.regexIndex===0?(nh+=Bh[0],1):(Vh=!0,0)}function ah(Bh){const Yh=Bh[0],dm=Bh.rule,rh=new Response$1(dm),If=[dm.__beforeBegin,dm["on:begin"]];for(const Nf of If)if(Nf&&(Nf(Bh,rh),rh.isMatchIgnored))return Gf(Yh);return dm.skip?nh+=Yh:(dm.excludeBegin&&(nh+=Yh),Zf(),!dm.returnBegin&&!dm.excludeBegin&&(nh=Yh)),vf(dm,Bh),dm.returnBegin?0:Yh.length}function Wf(Bh){const Yh=Bh[0],dm=Mf.substring(Bh.index),rh=Pf(jf,Bh,dm);if(!rh)return NO_MATCH;const If=jf;jf.endScope&&jf.endScope._wrap?(Zf(),Xf(Yh,jf.endScope._wrap)):jf.endScope&&jf.endScope._multi?(Zf(),Tf(jf.endScope,Bh)):If.skip?nh+=Yh:(If.returnEnd||If.excludeEnd||(nh+=Yh),Zf(),If.excludeEnd&&(nh=Yh));do jf.scope&&_h.closeNode(),!jf.skip&&!jf.subLanguage&&(wh+=jf.relevance),jf=jf.parent;while(jf!==rh.parent);return rh.starts&&vf(rh.starts,Bh),If.returnEnd?0:Yh.length}function Rf(){const Bh=[];for(let Yh=jf;Yh!==Uf;Yh=Yh.parent)Yh.scope&&Bh.unshift(Yh.scope);Bh.forEach(Yh=>_h.openNode(Yh))}let Vf={};function lh(Bh,Yh){const dm=Yh&&Yh[0];if(nh+=Bh,dm==null)return Zf(),0;if(Vf.type==="begin"&&Yh.type==="end"&&Vf.index===Yh.index&&dm===""){if(nh+=Mf.slice(Yh.index,Yh.index+1),!nd){const rh=new Error(`0 width match regex (${xf})`);throw rh.languageName=xf,rh.badRule=Vf.rule,rh}return 1}if(Vf=Yh,Yh.type==="begin")return ah(Yh);if(Yh.type==="illegal"&&!Yf){const rh=new Error('Illegal lexeme "'+dm+'" for mode "'+(jf.scope||"<unnamed>")+'"');throw rh.mode=jf,rh}else if(Yh.type==="end"){const rh=Wf(Yh);if(rh!==NO_MATCH)return rh}if(Yh.type==="illegal"&&dm==="")return 1;if(Th>1e5&&Th>Yh.index*3)throw new Error("potential infinite loop, way more iterations than matches");return nh+=dm,dm.length}const Uf=zd(xf);if(!Uf)throw error(ad.replace("{}",xf)),new Error('Unknown language: "'+xf+'"');const wf=compileLanguage(Uf);let Of="",jf=Qf||wf;const uh={},_h=new ud.__emitter(ud);Rf();let nh="",wh=0,hh=0,Th=0,Vh=!1;try{if(Uf.__emitTokens)Uf.__emitTokens(Mf,_h
` },Ad]}}return kotlin_1=nd,kotlin_1}var lasso_1,hasRequiredLasso;function requireLasso(){if(hasRequiredLasso)return lasso_1;hasRequiredLasso=1;function Ra(qa){const td="[a-zA-Z_][ \\ w.]*",rd="< \\ ?(lasso(script)?|=)",nd=" \\ ]| \\ ?>",ad={ $ pattern:td+"|&[lg]t;",literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},sd=qa.COMMENT("<!--","-->",{relevance:0}),ud={className:"meta",begin:" \\ [noprocess \\ ]",starts:{end:" \\ [/noprocess \\ ]",returnEnd:!0,contains:[sd]}},cd={className:"meta",begin:" \\ [/noprocess|"+rd},dd={className:"symbol",begin:"'"+td+"'"},pd=[qa.C_LINE_COMMENT_MODE,qa.C_BLOCK_COMMENT_MODE,qa.inherit(qa.C_NUMBER_MODE,{begin:qa.C_NUMBER_RE+"|(-?infinity|NaN) \\ b"}),qa.inherit(qa.APOS_STRING_MODE,{illegal:null}),qa.inherit(qa.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:" ` ",end:" ` "},{variants:[{begin:"[# $ ]"+td},{begin:"#",end:" \\ d+",illegal:" \\ W"}]},{className:"type",begin:":: \\ s*",end:td,illegal:" \\ W"},{className:"params",variants:[{begin:"-(?!infinity)"+td,relevance:0},{begin:"( \\ . \\ . \\ .)"}]},{begin:/(->| \. ) \s */,relevance:0,contains:[dd]},{className:"class",beginKeywords:"define",returnEnd:!0,end:" \\ (|=>",contains:[qa.inherit(qa.TITLE_MODE,{begin:td+"(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:ad,contains:[{className:"meta",begin:nd,relevance:0,starts:{end:" \\ [|"+rd,returnEnd:!0,relevance:0,contains:[sd]}},ud,cd,{className:"meta",begin:" \\ [no_square_brackets",starts:{end:" \\ [/no_square_brackets \\ ]",keywords:ad,contains:[{className:"meta",begin:nd,relevance:0,starts:{end:" \\ [noprocess \\ ]|"+rd,returnEnd:!0,contains:[sd]}},ud,cd].concat(pd)}},{className:"meta",begin:" \\ [",relevance:0},{className:"meta",begin:"^#!",end:"lasso9 $ ",relevance:10}].concat(pd)}}return lasso_1=Ra,lasso_1}var latex_1,hasRequiredLatex;function requireLatex(){if(hasRequiredLatex)return latex_1;hasRequiredLatex=1;function Ra(qa){const rd=qa.regex.either(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middl
] ` ,Ad={scope:"string",variants:[pd,dd,fd,Td]},Nd={scope:"number",variants:[{begin:" \\ b0[bB][01]+(?:_[01]+)* \\ b"},{begin:" \\ b0[oO][0-7]+(?:_[0-7]+)* \\ b"},{begin:" \\ b0[xX][ \\ da-fA-F]+(?:_[ \\ da-fA-F]+)* \\ b"},{begin:"(?: \\ b \\ d+(?:_ \\ d+)*( \\ .(?: \\ d+(?:_ \\ d+)*))?| \\ B \\ . \\ d+)(?:[eE][+-]? \\ d+)?"}],relevance:0},Ld=["false","null","true"],Rd=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],Od=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],Fd={keyword:Rd,literal:(yf=>{const _f=[];return yf.forEach(gf=>{_f.push(gf),gf.toLowerCase()===gf?_f.push(gf.toUpperCase()):_f.push(gf.toLowerCase())}),_f})(Ld),built_in:Od},Ud=yf=>yf.map(_f=>_f.replace(/ \| \d + $ /,"")),Hd={variants:[{match:[/new/,td.concat(Sd,"+"),td.concat("(?!",Ud(Od).join(" \\ b|")," \\ b)"),ad],scope:{1:"keyword",4:"title.class"}}]},Vd=td.concat(nd," \\ b(?! \\ ()"),Zd={variants:[{match:[td.concat(/::/,td.lookahead(/(?!class \b )/)),Vd],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[ad,td.concat(/::/,td.lookahead(/(?!class \b )/)),Vd],scope:{1:"title.class",3:"variable.constant"}},{match:[ad,td.concat("::",td.lookahead(/(?!class \b )/))],scope:{1:"title.class"}},{match:[ad,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},zd={scope:"attr",match:td.concat(nd,td.lookahead(":"),td.lookahead(/(?!::)/))},Xd={relevance:0,begin:/ \( /,end:/ \) /,keywords:Fd,contains:[zd,sd,Zd,qa.C_BLOCK_COMMENT_MODE,Ad,Nd,Hd]},Qd={relevance:0,match:[/ \b /,td.concat("(?!fn \\ b|function \\ b|",Ud(Rd).join(" \\ b|"),"|",Ud(Od).join(" \\ b|")," \\ b)"),nd,td.concat(Sd,"*"),td.lookahead(/(?= \( )/)],scope:{3:"title.function.invoke"},contains:[Xd]};Xd.contains.push(Qd);const hf=[zd,Zd,qa.C_BLOCK_COMMENT_MODE,Ad,Nd,Hd],bf={begin:td.concat(/# \[ \s */,ad),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:Ld,keyword:["new","array"]},contains:[{begi
] * ; ` ,relevance:0},{begin:"[vp][0-9]+"}]}}return smali_1=Ra,smali_1}var smalltalk_1,hasRequiredSmalltalk;function requireSmalltalk(){if(hasRequiredSmalltalk)return smalltalk_1;hasRequiredSmalltalk=1;function Ra(qa){const td="[a-z][a-zA-Z0-9_]*",rd={className:"string",begin:" \\ $ .{1}"},nd={className:"symbol",begin:"#"+qa.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[qa.COMMENT('"','"'),qa.APOS_STRING_MODE,{className:"type",begin:" \\ b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:td+":",relevance:0},qa.C_NUMBER_MODE,nd,rd,{begin:" \\ |[ ]*"+td+"([ ]+"+td+")*[ ]* \\ |",returnBegin:!0,end:/ \| /,illegal:/ \S /,contains:[{begin:"( \\ |[ ]*)?"+td}]},{begin:"# \\ (",end:" \\ )",contains:[qa.APOS_STRING_MODE,rd,qa.C_NUMBER_MODE,nd]}]}}return smalltalk_1=Ra,smalltalk_1}var sml_1,hasRequiredSml;function requireSml(){if(hasRequiredSml)return sml_1;hasRequiredSml=1;function Ra(qa){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{ $ pattern:"[a-z_] \\ w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/ \/ \/ |>>/,contains:[{className:"literal",begin:/ \[ ( \| \| )? \] | \( \) /,relevance:0},qa.COMMENT(" \\ ( \\ *"," \\ * \\ )",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[ \\ w']*"},{className:"type",begin:" ` [ A - Z ] [ \ \ w ']*"},{className:"type",begin:"\\b[A-Z][\\w' ] * ",relevance:0},{begin:" [ a - z _ ] \ \ w * '[\\w' ] * "},qa.inherit(qa.APOS_STRING_MODE,{className:" string ",relevance:0}),qa.inherit(qa.QUOTE_STRING_MODE,{illegal:null}),{className:" number ",begin:" \ \ b ( 0 [ xX ] [ a - fA - F0 - 9_ ] + [ Lln ] ? | 0 [ oO ] [ 0 - 7_ ] + [ Lln ] ? | 0 [ bB ] [ 01_ ] + [ Lln ] ? | [ 0 - 9 ] [ 0 - 9_ ] * ( [ Lln ] | ( \ \ . [ 0 - 9_ ] * ) ? ( [ eE ] [ - + ] ? [ 0 - 9_ ] + ) ? ) ? ) ",relevance:0},{begin:/[-=]>/}]}}return sml_1=Ra,sml_1}var sqf_1,hasRequiredSqf;function requireSqf(){if(hasRequiredSqf)return sqf_1;hasRequiredSqf=1;function Ra(qa){const td={className:" variable ",begin:/\b_+[a-zA-Z]\w*/},rd={className:" title ",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},nd={className:" string ",variants:[{begin:'" ',end:' "',contains:[{begin:'" "',relevance:0}]},{begin:" '",end:"' ",contains:[{begin:" '' ",relevance:0}]}]},ad=[" break "," breakWith "," breakOut "," breakTo "," case "," catch "," continue "," continueWith "," default "," do "," else "," exit "," exitWith "," for "," forEach "," from "," if "," local "," private "," switch "," step "," then "," throw "," to "," try "," waitUntil "," while "," with "],sd=[" blufor "," civilian "," configNull "," controlNull "," displayNull "," diaryRecordNull "," east "," endl "," false "," grpNull "," independent "," lineBreak "," locationNull "," nil "," objNull "," opfor "," pi "," resistance "," scriptNull "," sideAmbientLife "," sideEmpty "," sideEnemy "," sideFriendly "," sideLogic "," sideUnknown "," taskNull "," teamMemberNull "," true "," west "],ud=[" abs "," accTime "," acos "," action "," actionIDs "," actionKeys "," actionKeysEx "," actionKeysImages "," actionKeysNames "," actionKeysNamesArray "," actionName "," actionParams "," activateAddons "," activatedAddons "," activateKey "," activeTitleEffectParams "," add3DENConnection "," add3DENEventHandler "," add3DENLayer "," addAction "," addBackpack "," addBackpackCargo "," addBackpackCargoGlobal "," addBackpackGlobal "," addBinocularItem "," addCamShake "," addCuratorAddons "," addCuratorCameraArea "," addCuratorEditableObjects "," addCuratorEditingArea "," addCuratorPoints "," addEditorObject "," addEventHandler "," addForce "," addForceGeneratorRTD "," addGoggles "," addGroupIcon "," addHandgunItem "," addHeadgear "," addItem "," addItemCargo "," addItemCargoGlobal "," addItemPool "," addItemToBackpack "," addItemToUniform "," addItemToVest "," addLiveStats "," addMagazine "," addMagazineAmmoCargo "," addMagazineCargo "," addMagazineCargoGlobal "," addMagazineGlobal "," addMagazinePool "," addMagazines "," addMagazineTurret "," addMenu "," addMenuItem "," addMissionEventHandler "," addMPEventHandler "," addMusicEventHandler "," addonFiles "," addOwnedMine "," addPlayerSc
2024-09-18 09:46:23 +08:00
] * ? "'`},{begin:`" [ ^ \ r
2024-11-27 11:30:55 +08:00
"]*" ` }]},{className:"built_in",variants:[{begin:" \\ b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?= \\ ()"}]},qa.COMMENT("^[ ]* \\ *.* $ ",!1),qa.C_LINE_COMMENT_MODE,qa.C_BLOCK_COMMENT_MODE]}}return stata_1=Ra,stata_1}var step21_1,hasRequiredStep21;function requireStep21(){if(hasRequiredStep21)return step21_1;hasRequiredStep21=1;function Ra(qa){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{ $ pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},qa.C_LINE_COMMENT_MODE,qa.C_BLOCK_COMMENT_MODE,qa.COMMENT("/ \\ * \\ *!"," \\ */"),qa.C_NUMBER_MODE,qa.inherit(qa.APOS_STRING_MODE,{illegal:null}),qa.inherit(qa.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:" \\ d+",illegal:" \\ W"}]}]}}return step21_1=Ra,step21_1}var stylus_1,hasRequiredStylus;function requireStylus(){if(hasRequiredStylus)return stylus_1;hasRequiredStylus=1;const Ra=dd=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:dd.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4})) \b /},FUNCTION_DISPATCH:{className:"built_in",begin:/[ \w -]+(?= \( )/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/ \[ /,end:/ \] /,illegal:" $ ",contains:[dd.APOS_STRING_MODE,dd.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:dd.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),qa=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],td=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],rd=[...qa,...td],nd=["any
2024-09-18 09:46:23 +08:00
( multipart ) ? ` ,end: ` \ \ ]
2024-11-27 11:30:55 +08:00
` },{className:"string",begin:" \\ d{4}- \\ d{2}- \\ d{2}( \\ s+) \\ d{2}: \\ d{2}: \\ d{2}. \\ d+Z"},{className:"string",begin:"( \\ +|-) \\ d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?) \\ s+(test)?"},{begin:"^progress(:?)( \\ s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return subunit_1=Ra,subunit_1}var swift_1,hasRequiredSwift;function requireSwift(){if(hasRequiredSwift)return swift_1;hasRequiredSwift=1;function Ra(Zd){return Zd?typeof Zd=="string"?Zd:Zd.source:null}function qa(Zd){return td("(?=",Zd,")")}function td(...Zd){return Zd.map(Xd=>Ra(Xd)).join("")}function rd(Zd){const zd=Zd[Zd.length-1];return typeof zd=="object"&&zd.constructor===Object?(Zd.splice(Zd.length-1,1),zd):{}}function nd(...Zd){return"("+(rd(Zd).capture?"":"?:")+Zd.map(Qd=>Ra(Qd)).join("|")+")"}const ad=Zd=>td(/ \b /,Zd,/ \w $ /.test(Zd)?/ \b /:/ \B /),sd=["Protocol","Type"].map(ad),ud=["init","self"].map(ad),cd=["Any","Self"],dd=["actor","any","associatedtype","async","await",/as \? /,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate \( set \) /,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init \? /,/init!/,"inout",/internal \( set \) /,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open \( set \) /,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private \( set \) /,"private","protocol",/public \( set \) /,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try \? /,/try!/,"try","typealias",/unowned \( safe \) /,/unowned \( unsafe \) /,"unowned","var","weak","where","while","willSet"],pd=["false","nil","true"],fd=["assignment","associativity","higherThan","left","lowerThan","none","right"],Td=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Sd=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Ad=nd(/[/= \- +!*%<>&|^~?]/,/[ \u 00A1- \u 00A7]/,/[ \u 00A9 \u 00AB]/,/[ \u 00AC \u 00AE]/,/[ \u 00B0 \u 00B1]/,/[ \u 00B6 \u 00BB \u 00BF \u 00D7 \u 00F7]/,/[ \u 2016- \u 2017]/,/[ \u 2020- \u 2027]/,/[ \u 2030- \u 203E]/,/[ \u 2041- \u 2053]/,/[ \u 2055- \u 205E]/,/[ \u 2190- \u 23FF]/,/[ \u 2500- \u 2775]/,/[ \u 2794- \u 2BFF]/,/[ \u 2E00- \u 2E7F]/,/[ \u 3001- \u 3003]/,/[ \u 3008- \u 3020]/,/[ \u 3030]/),Nd=nd(Ad,/[ \u 0300- \u 036F]/,/[ \u 1DC0- \u 1DFF]/,/[ \u 20D0- \u 20FF]/,/[ \u FE00- \u FE0F]/,/[ \u FE20- \u FE2F]/),Ld=td(Ad,Nd,"*"),Rd=nd(/[a-zA-Z_]/,/[ \u 00A8 \u 00AA \u 00AD \u 00AF \u 00B2- \u 00B5 \u 00B7- \u 00BA]/,/[ \u 00BC- \u 00BE \u 00C0- \u 00D6 \u 00D8- \u 00F6 \u 00F8- \u 00FF]/,/[ \u 0100- \u 02FF \u 0370- \u 167F \u 1681- \u 180D \u 180F- \u 1DBF]/,/[ \u 1E00- \u 1FFF]/,/[ \u 200B- \u 200D \u 202A- \u 202E \u 203F- \u 2040 \u 2054 \u 2060- \u 206F]/,/[ \u 2070- \u 20CF \u 2100- \u 218F \u 2460- \u 24FF \u 2776- \u 2793]/,/[ \u 2C00- \u 2DFF \u 2E80- \u 2FFF]/,/[ \u 3004- \u 3007 \u 3021- \u 302F \u 3031- \u 303F \u 3040- \u D7FF]/,/[ \u F900- \u FD3D \u FD40- \u FDCF \u FDF0- \u FE1F \u FE30- \u FE44]/,/[ \u FE47- \u FEFE \u FF00- \u FFFD]/),Od=nd(Rd,/ \d /,/[ \u 0300- \u 036F \u 1DC0- \u 1DFF \u 20D0- \u 20FF \u FE20- \u FE2F]/),kd=td(Rd,Od,"*"),Fd=td(/[A-Z]/,Od,"*"),Ud=["attached","autoclosure",td(/convention \( /,nd("swift","block","c"),/ \) /),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","N
2024-09-25 14:23:53 +08:00
` ).map(nd=>{const ad=nd.match(/^ \s +/);if(ad===null)return nd;const[sd]=ad;return sd.length>=rd.length?nd.slice(rd.length):nd}).join( `
` )}let _Tokenizer $ 1=class{constructor(qa){Qm(this,"options");Qm(this,"rules");Qm(this,"lexer");this.options=qa||_defaults $ 1}space(qa){const td=this.rules.block.newline.exec(qa);if(td&&td[0].length>0)return{type:"space",raw:td[0]}}code(qa){const td=this.rules.block.code.exec(qa);if(td){const rd=td[0].replace(/^(?: {1,4}| {0,3} \t )/gm,"");return{type:"code",raw:td[0],codeBlockStyle:"indented",text:this.options.pedantic?rd:rtrim $ 1(rd, `
` )}}}fences(qa){const td=this.rules.block.fences.exec(qa);if(td){const rd=td[0],nd=indentCodeCompensation $ 1(rd,td[3]||"");return{type:"code",raw:rd,lang:td[2]?td[2].trim().replace(this.rules.inline.anyPunctuation," $ 1"):td[2],text:nd}}}heading(qa){const td=this.rules.block.heading.exec(qa);if(td){let rd=td[2].trim();if(/# $ /.test(rd)){const nd=rtrim $ 1(rd,"#");(this.options.pedantic||!nd||/ $ /.test(nd))&&(rd=nd.trim())}return{type:"heading",raw:td[0],depth:td[1].length,text:rd,tokens:this.lexer.inline(rd)}}}hr(qa){const td=this.rules.block.hr.exec(qa);if(td)return{type:"hr",raw:rtrim $ 1(td[0], `
` )}}blockquote(qa){const td=this.rules.block.blockquote.exec(qa);if(td){let rd=rtrim $ 1(td[0], `
2024-09-18 09:46:23 +08:00
` ).split( `
2024-09-25 14:23:53 +08:00
` ),nd="",ad="";const sd=[];for(;rd.length>0;){let ud=!1;const cd=[];let dd;for(dd=0;dd<rd.length;dd++)if(/^ {0,3}>/.test(rd[dd]))cd.push(rd[dd]),ud=!0;else if(!ud)cd.push(rd[dd]);else break;rd=rd.slice(dd);const pd=cd.join( `
` ),fd=pd.replace(/ \n {0,3}((?:=+|-+) *)(?= \n | $ )/g, `
$1 ` ).replace(/^ {0,3}>[ \t ]?/gm,"");nd=nd? ` $ { nd }
$ { pd } ` :pd,ad=ad? ` $ { ad }
2024-11-27 11:30:55 +08:00
$ { fd } ` :fd;const Td=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(fd,sd,!0),this.lexer.state.top=Td,rd.length===0)break;const Sd=sd[sd.length-1];if((Sd==null?void 0:Sd.type)==="code")break;if((Sd==null?void 0:Sd.type)==="blockquote"){const Ad=Sd,Nd=Ad.raw+ `
2024-09-25 14:23:53 +08:00
` +rd.join( `
2024-11-27 11:30:55 +08:00
` ),Ld=this.blockquote(Nd);sd[sd.length-1]=Ld,nd=nd.substring(0,nd.length-Ad.raw.length)+Ld.raw,ad=ad.substring(0,ad.length-Ad.text.length)+Ld.text;break}else if((Sd==null?void 0:Sd.type)==="list"){const Ad=Sd,Nd=Ad.raw+ `
2024-09-25 14:23:53 +08:00
` +rd.join( `
2024-11-27 11:30:55 +08:00
` ),Ld=this.list(Nd);sd[sd.length-1]=Ld,nd=nd.substring(0,nd.length-Sd.raw.length)+Ld.raw,ad=ad.substring(0,ad.length-Ad.raw.length)+Ld.raw,rd=Nd.substring(sd[sd.length-1].raw.length).split( `
2024-09-25 14:23:53 +08:00
` );continue}}return{type:"blockquote",raw:nd,tokens:sd,text:ad}}}list(qa){let td=this.rules.block.list.exec(qa);if(td){let rd=td[1].trim();const nd=rd.length>1,ad={type:"list",raw:"",ordered:nd,start:nd?+rd.slice(0,-1):"",loose:!1,items:[]};rd=nd? ` \ \ d { 1 , 9 } \ \ $ { rd . slice ( - 1 ) } ` : ` \ \ $ { rd } ` ,this.options.pedantic&&(rd=nd?rd:"[*+-]");const sd=new RegExp( ` ^ ( { 0 , 3 } $ { rd } ) ( ( ? : [ ] [ ^ \ \ n ] * ) ? ( ? : \ \ n | $ ) ) ` );let ud=!1;for(;qa;){let cd=!1,dd="",pd="";if(!(td=sd.exec(qa))||this.rules.block.hr.test(qa))break;dd=td[0],qa=qa.substring(dd.length);let fd=td[2].split( `
` ,1)[0].replace(/^ \t +/,Rd=>" ".repeat(3*Rd.length)),Td=qa.split( `
2024-11-27 11:30:55 +08:00
` ,1)[0],Sd=!fd.trim(),Ad=0;if(this.options.pedantic?(Ad=2,pd=fd.trimStart()):Sd?Ad=td[1].length+1:(Ad=td[2].search(/[^ ]/),Ad=Ad>4?1:Ad,pd=fd.slice(Ad),Ad+=td[1].length),Sd&&/^[ \t ]* $ /.test(Td)&&(dd+=Td+ `
` ,qa=qa.substring(Td.length+1),cd=!0),!cd){const Rd=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Ad - 1 ) } } ( ? : [ * + - ] | \ \ d { 1 , 9 } [ . ) ] ) ( ( ? : [ ] [ ^ \ \ n ] * ) ? ( ? : \ \ n | $ ) ) ` ),Od=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Ad - 1 ) } } ( ( ? : - * ) { 3 , } | ( ? : _ * ) { 3 , } | ( ? : \ \ * * ) { 3 , } ) ( ? : \ \ n + | $ ) ` ),kd=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Ad - 1 ) } } ( ? : \ ` \` \` |~~~) ` ) , Fd = new RegExp ( ` ^ {0, ${ Math . min ( 3 , Ad - 1 ) } }# ` ) , Ud = new RegExp ( ` ^ {0, ${ Math . min ( 3 , Ad - 1 ) } }<[a-z].*> ` , "i" ) ; for ( ; qa ; ) { const Hd = qa . split ( `
` ,1)[0];let Vd;if(Td=Hd,this.options.pedantic?(Td=Td.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),Vd=Td):Vd=Td.replace(/ \t /g," "),kd.test(Td)||Fd.test(Td)||Ud.test(Td)||Rd.test(Td)||Od.test(Td))break;if(Vd.search(/[^ ]/)>=Ad||!Td.trim())pd+= `
` +Vd.slice(Ad);else{if(Sd||fd.replace(/ \t /g," ").search(/[^ ]/)>=4||kd.test(fd)||Fd.test(fd)||Od.test(fd))break;pd+= `
` +Td}!Sd&&!Td.trim()&&(Sd=!0),dd+=Hd+ `
` ,qa=qa.substring(Hd.length+1),fd=Vd.slice(Ad)}}ad.loose||(ud?ad.loose=!0:/ \n [ \t ]* \n [ \t ]* $ /.test(dd)&&(ud=!0));let Nd=null,Ld;this.options.gfm&&(Nd=/^ \[ [ xX] \] /.exec(pd),Nd&&(Ld=Nd[0]!=="[ ] ",pd=pd.replace(/^ \[ [ xX] \] +/,""))),ad.items.push({type:"list_item",raw:dd,task:!!Nd,checked:Ld,loose:!1,text:pd,tokens:[]}),ad.raw+=dd}ad.items[ad.items.length-1].raw=ad.items[ad.items.length-1].raw.trimEnd(),ad.items[ad.items.length-1].text=ad.items[ad.items.length-1].text.trimEnd(),ad.raw=ad.raw.trimEnd();for(let cd=0;cd<ad.items.length;cd++)if(this.lexer.state.top=!1,ad.items[cd].tokens=this.lexer.blockTokens(ad.items[cd].text,[]),!ad.loose){const dd=ad.items[cd].tokens.filter(fd=>fd.type==="space"),pd=dd.length>0&&dd.some(fd=>/ \n .* \n /.test(fd.raw));ad.loose=pd}if(ad.loose)for(let cd=0;cd<ad.items.length;cd++)ad.items[cd].loose=!0;return ad}}html(qa){const td=this.rules.block.html.exec(qa);if(td)return{type:"html",block:!0,raw:td[0],pre:td[1]==="pre"||td[1]==="script"||td[1]==="style",text:td[0]}}def(qa){const td=this.rules.block.def.exec(qa);if(td){const rd=td[1].toLowerCase().replace(/ \s +/g," "),nd=td[2]?td[2].replace(/^<(.*)> $ /," $ 1").replace(this.rules.inline.anyPunctuation," $ 1"):"",ad=td[3]?td[3].substring(1,td[3].length-1).replace(this.rules.inline.anyPunctuation," $ 1"):td[3];return{type:"def",tag:rd,raw:td[0],href:nd,title:ad}}}table(qa){const td=this.rules.block.table.exec(qa);if(!td||!/[:|]/.test(td[2]))return;const rd=splitCells $ 1(td[1]),nd=td[2].replace(/^ \| | \| * $ /g,"").split("|"),ad=td[3]&&td[3].trim()?td[3].replace(/ \n [ \t ]* $ /,"").split( `
2024-09-25 14:23:53 +08:00
` ):[],sd={type:"table",raw:td[0],header:[],align:[],rows:[]};if(rd.length===nd.length){for(const ud of nd)/^ *-+: * $ /.test(ud)?sd.align.push("right"):/^ *:-+: * $ /.test(ud)?sd.align.push("center"):/^ *:-+ * $ /.test(ud)?sd.align.push("left"):sd.align.push(null);for(let ud=0;ud<rd.length;ud++)sd.header.push({text:rd[ud],tokens:this.lexer.inline(rd[ud]),header:!0,align:sd.align[ud]});for(const ud of ad)sd.rows.push(splitCells $ 1(ud,sd.header.length).map((cd,dd)=>({text:cd,tokens:this.lexer.inline(cd),header:!1,align:sd.align[dd]})));return sd}}lheading(qa){const td=this.rules.block.lheading.exec(qa);if(td)return{type:"heading",raw:td[0],depth:td[2].charAt(0)==="="?1:2,text:td[1],tokens:this.lexer.inline(td[1])}}paragraph(qa){const td=this.rules.block.paragraph.exec(qa);if(td){const rd=td[1].charAt(td[1].length-1)=== `
2024-11-27 11:30:55 +08:00
` ?td[1].slice(0,-1):td[1];return{type:"paragraph",raw:td[0],text:rd,tokens:this.lexer.inline(rd)}}}text(qa){const td=this.rules.block.text.exec(qa);if(td)return{type:"text",raw:td[0],text:td[0],tokens:this.lexer.inline(td[0])}}escape(qa){const td=this.rules.inline.escape.exec(qa);if(td)return{type:"escape",raw:td[0],text:escape $ 1 $ 1(td[1])}}tag(qa){const td=this.rules.inline.tag.exec(qa);if(td)return!this.lexer.state.inLink&&/^<a /i.test(td[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^< \/ a>/i.test(td[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)( \s |>)/i.test(td[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^< \/ (pre|code|kbd|script)( \s |>)/i.test(td[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:td[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:td[0]}}link(qa){const td=this.rules.inline.link.exec(qa);if(td){const rd=td[2].trim();if(!this.options.pedantic&&/^</.test(rd)){if(!/> $ /.test(rd))return;const sd=rtrim $ 1(rd.slice(0,-1)," \\ ");if((rd.length-sd.length)%2===0)return}else{const sd=findClosingBracket $ 1(td[2],"()");if(sd>-1){const cd=(td[0].indexOf("!")===0?5:4)+td[1].length+sd;td[2]=td[2].substring(0,sd),td[0]=td[0].substring(0,cd).trim(),td[3]=""}}let nd=td[2],ad="";if(this.options.pedantic){const sd=/^([^'"]*[^ \s ]) \s +(['"])(.*) \2 /.exec(nd);sd&&(nd=sd[1],ad=sd[3])}else ad=td[3]?td[3].slice(1,-1):"";return nd=nd.trim(),/^</.test(nd)&&(this.options.pedantic&&!/> $ /.test(rd)?nd=nd.slice(1):nd=nd.slice(1,-1)),outputLink $ 1(td,{href:nd&&nd.replace(this.rules.inline.anyPunctuation," $ 1"),title:ad&&ad.replace(this.rules.inline.anyPunctuation," $ 1")},td[0],this.lexer)}}reflink(qa,td){let rd;if((rd=this.rules.inline.reflink.exec(qa))||(rd=this.rules.inline.nolink.exec(qa))){const nd=(rd[2]||rd[1]).replace(/ \s +/g," "),ad=td[nd.toLowerCase()];if(!ad){const sd=rd[0].charAt(0);return{type:"text",raw:sd,text:sd}}return outputLink $ 1(rd,ad,rd[0],this.lexer)}}emStrong(qa,td,rd=""){let nd=this.rules.inline.emStrongLDelim.exec(qa);if(!nd||nd[3]&&rd.match(/[ \p {L} \p {N}]/u))return;if(!(nd[1]||nd[2]||"")||!rd||this.rules.inline.punctuation.exec(rd)){const sd=[...nd[0]].length-1;let ud,cd,dd=sd,pd=0;const fd=nd[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(fd.lastIndex=0,td=td.slice(-1*qa.length+sd);(nd=fd.exec(td))!=null;){if(ud=nd[1]||nd[2]||nd[3]||nd[4]||nd[5]||nd[6],!ud)continue;if(cd=[...ud].length,nd[3]||nd[4]){dd+=cd;continue}else if((nd[5]||nd[6])&&sd%3&&!((sd+cd)%3)){pd+=cd;continue}if(dd-=cd,dd>0)continue;cd=Math.min(cd,cd+dd+pd);const Td=[...nd[0]][0].length,Sd=qa.slice(0,sd+nd.index+Td+cd);if(Math.min(sd,cd)%2){const Nd=Sd.slice(1,-1);return{type:"em",raw:Sd,text:Nd,tokens:this.lexer.inlineTokens(Nd)}}const Ad=Sd.slice(2,-2);return{type:"strong",raw:Sd,text:Ad,tokens:this.lexer.inlineTokens(Ad)}}}}codespan(qa){const td=this.rules.inline.code.exec(qa);if(td){let rd=td[2].replace(/ \n /g," ");const nd=/[^ ]/.test(rd),ad=/^ /.test(rd)&&/ $ /.test(rd);return nd&&ad&&(rd=rd.substring(1,rd.length-1)),rd=escape $ 1 $ 1(rd,!0),{type:"codespan",raw:td[0],text:rd}}}br(qa){const td=this.rules.inline.br.exec(qa);if(td)return{type:"br",raw:td[0]}}del(qa){const td=this.rules.inline.del.exec(qa);if(td)return{type:"del",raw:td[0],text:td[2],tokens:this.lexer.inlineTokens(td[2])}}autolink(qa){const td=this.rules.inline.autolink.exec(qa);if(td){let rd,nd;return td[2]==="@"?(rd=escape $ 1 $ 1(td[1]),nd="mailto:"+rd):(rd=escape $ 1 $ 1(td[1]),nd=rd),{type:"link",raw:td[0],text:rd,href:nd,tokens:[{type:"text",raw:rd,text:rd}]}}}url(qa){var rd;let td;if(td=this.rules.inline.url.exec(qa)){let nd,ad;if(td[2]==="@")nd=escape $ 1 $ 1(td[0]),ad="mailto:"+nd;else{let sd;do sd=td[0],td[0]=((rd=this.rules.inline._backpedal.exec(td[0]))==null?void 0:rd[0])??"";while(sd!==td[0]);nd=escape $ 1 $ 1(td[0]),td[1]==="www."?ad="http://"+td[0]:ad=td[0]}return{type:"link",raw:td[0],text:nd,href:ad,tokens:[{type:"text",raw:nd,text:nd}]}}}inlineText(qa){const td=this.rules.inline.text.exec(qa);if(td){let rd;return this.lexer.state.inRawBl
] ` ).replace("lheading",lheading $ 1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},escape $ 3=/^ \\ ([!"# $ %&'()*+, \- ./:;<=>?@ \[ \] \\ ^_ ` { | } ~ ] ) / , inlineCode$1 = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/ , br$1 = /^( {2,}|\\)\n(?!\s*$)/ , inlineText$1 = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/ , _punctuation$1 = "\\p{P}\\p{S}" , punctuation$1 = edit$1 ( /^((?![*_])[\spunctuation])/ , "u" ) . replace ( /punctuation/g , _punctuation$1 ) . getRegex ( ) , blockSkip$1 = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g , emStrongLDelim$1 = edit$1 ( /^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/ , "u" ) . replace ( /punct/g , _punctuation$1 ) . getRegex ( ) , emStrongRDelimAst$1 = edit$1 ( "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])" , "gu" ) . replace ( /punct/g , _punctuation$1 ) . getRegex ( ) , emStrongRDelimUnd$1 = edit$1 ( "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])" , "gu" ) . replace ( /punct/g , _punctuation$1 ) . getRegex ( ) , anyPunctuation$1 = edit$1 ( /\\([punct])/ , "gu" ) . replace ( /punct/g , _punctuation$1 ) . getRegex ( ) , autolink$1 = edit$1 ( /^<(scheme:[^\s\x00-\x1f<>]*|email)>/ ) . replace ( "scheme" , /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/ ) . replace ( "email" , /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/ ) . getRegex ( ) , _inlineComment$1 = edit$1 ( _comment$1 ) . replace ( "(?:-->|$)" , "-->" ) . getRegex ( ) , tag$1 = edit$1 ( "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>" ) . replace ( "comment" , _inlineComment$1 ) . replace ( "attribute" , /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/ ) . getRegex ( ) , _inlineLabel$1 = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/ , link$1 = edit$1 ( /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/ ) . replace ( "label" , _inlineLabel$1 ) . replace ( "href" , /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/ ) . replace ( "title" , /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/ ) . getRegex ( ) , reflink$1 = edit$1 ( /^!?\[(label)\]\[(ref)\]/ ) . replace ( "label" , _inlineLabel$1 ) . replace ( "ref" , _blockLabel$1 ) . getRegex ( ) , nolink$1 = edit$1 ( /^!?\[(ref)\](?:\[\])?/ ) . replace ( "ref" , _blockLabel$1 ) . getRegex ( ) , reflinkSearch$1 = edit$1 ( "reflink|nolink(?!\\()" , "g" ) . replace ( "reflink" , reflink$1 ) . replace ( "nolink" , nolink$1 ) . getRegex ( ) , inlineNormal$1 = { _backpedal : noopTest$1 , anyPunctuation : anyPunctuation$1 , autolink : autolink$1 , blockSkip : blockSkip$1 , br : br$1 , code : inlineCode$1 , del : noopTest$1 , emStrongLDelim : emStrongLDelim$1 , emStrongRDelimAst : emStrongRDelimAst$1 , emStrongRDelimUnd : emStrongRDelimUnd$1 , escape : escape$3 , link : link$1 , nolink : nolink$1 , punctuation : punctuation$1 , reflink : reflink$1 , reflinkSearch : reflinkSearch$1 , tag : tag$1 , text : inlineText$1 , url : noopTest$1 } , inlinePedantic$1 = { ... inlineNormal$1 , link : edit$1 ( /^!?\[(label)\]\((.*?)\)/ ) . replace ( "label" , _inlineLabel$1 ) . getRegex ( ) , reflink : edit$1 ( /^!?\[(label)\]\s*\[([^\]]*)\]/ ) . replace ( "label" , _inlineLabel$1 ) . getRegex ( ) } , inlineGfm$1 = { ... inlineNormal$1 , escape : edit$1 ( escape$3 ) . replace ( "])" , "~|])" ) . getRegex ( ) , url : edit$1 ( /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/ , "i" ) . replace ( "email" , /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/ ) . getRegex ( ) , _backpedal : /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/ , del : /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/ , text : /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ } , inlineBreaks$1 = { ... inlineGfm$1 , br : edit$1 ( br$1 ) . replace ( "{2,}" , "*" ) .
2024-09-25 14:23:53 +08:00
` ),this.blockTokens(qa,this.tokens);for(let td=0;td<this.inlineQueue.length;td++){const rd=this.inlineQueue[td];this.inlineTokens(rd.src,rd.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(qa,td=[],rd=!1){this.options.pedantic&&(qa=qa.replace(/ \t /g," ").replace(/^ + $ /gm,""));let nd,ad,sd;for(;qa;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(ud=>(nd=ud.call({lexer:this},qa,td))?(qa=qa.substring(nd.raw.length),td.push(nd),!0):!1))){if(nd=this.tokenizer.space(qa)){qa=qa.substring(nd.raw.length),nd.raw.length===1&&td.length>0?td[td.length-1].raw+= `
` :td.push(nd);continue}if(nd=this.tokenizer.code(qa)){qa=qa.substring(nd.raw.length),ad=td[td.length-1],ad&&(ad.type==="paragraph"||ad.type==="text")?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.text,this.inlineQueue[this.inlineQueue.length-1].src=ad.text):td.push(nd);continue}if(nd=this.tokenizer.fences(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.heading(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.hr(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.blockquote(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.list(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.html(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.def(qa)){qa=qa.substring(nd.raw.length),ad=td[td.length-1],ad&&(ad.type==="paragraph"||ad.type==="text")?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.raw,this.inlineQueue[this.inlineQueue.length-1].src=ad.text):this.tokens.links[nd.tag]||(this.tokens.links[nd.tag]={href:nd.href,title:nd.title});continue}if(nd=this.tokenizer.table(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.lheading(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(sd=qa,this.options.extensions&&this.options.extensions.startBlock){let ud=1/0;const cd=qa.slice(1);let dd;this.options.extensions.startBlock.forEach(pd=>{dd=pd.call({lexer:this},cd),typeof dd=="number"&&dd>=0&&(ud=Math.min(ud,dd))}),ud<1/0&&ud>=0&&(sd=qa.substring(0,ud+1))}if(this.state.top&&(nd=this.tokenizer.paragraph(sd))){ad=td[td.length-1],rd&&(ad==null?void 0:ad.type)==="paragraph"?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ad.text):td.push(nd),rd=sd.length!==qa.length,qa=qa.substring(nd.raw.length);continue}if(nd=this.tokenizer.text(qa)){qa=qa.substring(nd.raw.length),ad=td[td.length-1],ad&&ad.type==="text"?(ad.raw+= `
` +nd.raw,ad.text+= `
2024-11-27 11:30:55 +08:00
` +nd.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ad.text):td.push(nd);continue}if(qa){const ud="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(ud);break}else throw new Error(ud)}}return this.state.top=!0,td}inline(qa,td=[]){return this.inlineQueue.push({src:qa,tokens:td}),td}inlineTokens(qa,td=[]){let rd,nd,ad,sd=qa,ud,cd,dd;if(this.tokens.links){const pd=Object.keys(this.tokens.links);if(pd.length>0)for(;(ud=this.tokenizer.rules.inline.reflinkSearch.exec(sd))!=null;)pd.includes(ud[0].slice(ud[0].lastIndexOf("[")+1,-1))&&(sd=sd.slice(0,ud.index)+"["+"a".repeat(ud[0].length-2)+"]"+sd.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ud=this.tokenizer.rules.inline.blockSkip.exec(sd))!=null;)sd=sd.slice(0,ud.index)+"["+"a".repeat(ud[0].length-2)+"]"+sd.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ud=this.tokenizer.rules.inline.anyPunctuation.exec(sd))!=null;)sd=sd.slice(0,ud.index)+"++"+sd.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;qa;)if(cd||(dd=""),cd=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(pd=>(rd=pd.call({lexer:this},qa,td))?(qa=qa.substring(rd.raw.length),td.push(rd),!0):!1))){if(rd=this.tokenizer.escape(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.tag(qa)){qa=qa.substring(rd.raw.length),nd=td[td.length-1],nd&&rd.type==="text"&&nd.type==="text"?(nd.raw+=rd.raw,nd.text+=rd.text):td.push(rd);continue}if(rd=this.tokenizer.link(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.reflink(qa,this.tokens.links)){qa=qa.substring(rd.raw.length),nd=td[td.length-1],nd&&rd.type==="text"&&nd.type==="text"?(nd.raw+=rd.raw,nd.text+=rd.text):td.push(rd);continue}if(rd=this.tokenizer.emStrong(qa,sd,dd)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.codespan(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.br(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.del(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.autolink(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(!this.state.inLink&&(rd=this.tokenizer.url(qa))){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(ad=qa,this.options.extensions&&this.options.extensions.startInline){let pd=1/0;const fd=qa.slice(1);let Td;this.options.extensions.startInline.forEach(Sd=>{Td=Sd.call({lexer:this},fd),typeof Td=="number"&&Td>=0&&(pd=Math.min(pd,Td))}),pd<1/0&&pd>=0&&(ad=qa.substring(0,pd+1))}if(rd=this.tokenizer.inlineText(ad)){qa=qa.substring(rd.raw.length),rd.raw.slice(-1)!=="_"&&(dd=rd.raw.slice(-1)),cd=!0,nd=td[td.length-1],nd&&nd.type==="text"?(nd.raw+=rd.raw,nd.text+=rd.text):td.push(rd);continue}if(qa){const pd="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(pd);break}else throw new Error(pd)}}return td}},_Renderer $ 1=class{constructor(qa){Qm(this,"options");Qm(this,"parser");this.options=qa||_defaults $ 1}space(qa){return""}code({text:qa,lang:td,escaped:rd}){var sd;const nd=(sd=(td||"").match(/^ \S */))==null?void 0:sd[0],ad=qa.replace(/ \n $ /,"")+ `
2024-09-25 14:23:53 +08:00
` ;return nd?'<pre><code class="language-'+escape $ 1 $ 1(nd)+'">'+(rd?ad:escape $ 1 $ 1(ad,!0))+ ` < / c o d e > < / p r e >
` :"<pre><code>"+(rd?ad:escape $ 1 $ 1(ad,!0))+ ` < / c o d e > < / p r e >
2024-09-18 09:46:23 +08:00
` }blockquote({tokens:qa}){return ` < blockquote >
$ { this . parser . parse ( qa ) } < / b l o c k q u o t e >
2024-09-25 14:23:53 +08:00
` }html({text:qa}){return qa}heading({tokens:qa,depth:td}){return ` < h$ { td } > $ { this . parser . parseInline ( qa ) } < / h $ { t d } >
2024-09-18 09:46:23 +08:00
` }hr(qa){return ` < hr >
2024-09-25 14:23:53 +08:00
` }list(qa){const td=qa.ordered,rd=qa.start;let nd="";for(let ud=0;ud<qa.items.length;ud++){const cd=qa.items[ud];nd+=this.listitem(cd)}const ad=td?"ol":"ul",sd=td&&rd!==1?' start="'+rd+'"':"";return"<"+ad+sd+ ` >
` +nd+"</"+ad+ ` >
` }listitem(qa){let td="";if(qa.task){const rd=this.checkbox({checked:!!qa.checked});qa.loose?qa.tokens.length>0&&qa.tokens[0].type==="paragraph"?(qa.tokens[0].text=rd+" "+qa.tokens[0].text,qa.tokens[0].tokens&&qa.tokens[0].tokens.length>0&&qa.tokens[0].tokens[0].type==="text"&&(qa.tokens[0].tokens[0].text=rd+" "+qa.tokens[0].tokens[0].text)):qa.tokens.unshift({type:"text",raw:rd+" ",text:rd+" "}):td+=rd+" "}return td+=this.parser.parse(qa.tokens,!!qa.loose), ` < li > $ { td } < / l i >
2024-09-18 09:46:23 +08:00
` }checkbox({checked:qa}){return"<input "+(qa?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:qa}){return ` < p > $ { this . parser . parseInline ( qa ) } < / p >
2024-09-25 14:23:53 +08:00
` }table(qa){let td="",rd="";for(let ad=0;ad<qa.header.length;ad++)rd+=this.tablecell(qa.header[ad]);td+=this.tablerow({text:rd});let nd="";for(let ad=0;ad<qa.rows.length;ad++){const sd=qa.rows[ad];rd="";for(let ud=0;ud<sd.length;ud++)rd+=this.tablecell(sd[ud]);nd+=this.tablerow({text:rd})}return nd&&(nd= ` < tbody > $ { nd } < / t b o d y > ` ) , ` < t a b l e >
2024-09-18 09:46:23 +08:00
< thead >
2024-09-25 14:23:53 +08:00
` +td+ ` < / t h e a d >
` +nd+ ` < / t a b l e >
2024-09-18 09:46:23 +08:00
` }tablerow({text:qa}){return ` < tr >
$ { qa } < / t r >
2024-09-25 14:23:53 +08:00
` }tablecell(qa){const td=this.parser.parseInline(qa.tokens),rd=qa.header?"th":"td";return(qa.align? ` < $ { rd } align = "${qa.align}" > ` : ` < $ { rd } > ` )+td+ ` < / $ { r d } >
2024-11-27 11:30:55 +08:00
` }strong({tokens:qa}){return ` < strong > $ { this . parser . parseInline ( qa ) } < / s t r o n g > ` } e m ( { t o k e n s : q a } ) { r e t u r n ` < e m > $ { t h i s . p a r s e r . p a r s e I n l i n e ( q a ) } < / e m > ` } c o d e s p a n ( { t e x t : q a } ) { r e t u r n ` < c o d e > $ { q a } < / c o d e > ` } b r ( q a ) { r e t u r n " < b r > " } d e l ( { t o k e n s : q a } ) { r e t u r n ` < d e l > $ { t h i s . p a r s e r . p a r s e I n l i n e ( q a ) } < / d e l > ` } l i n k ( { h r e f : q a , t i t l e : t d , t o k e n s : r d } ) { c o n s t n d = t h i s . p a r s e r . p a r s e I n l i n e ( r d ) , a d = c l e a n U r l $ 1 ( q a ) ; i f ( a d = = = n u l l ) r e t u r n n d ; q a = a d ; l e t s d = ' < a h r e f = " ' + q a + ' " ' ; r e t u r n t d & & ( s d + = ' t i t l e = " ' + t d + ' " ' ) , s d + = " > " + n d + " < / a > " , s d } i m a g e ( { h r e f : q a , t i t l e : t d , t e x t : r d } ) { c o n s t n d = c l e a n U r l $ 1 ( q a ) ; i f ( n d = = = n u l l ) r e t u r n r d ; q a = n d ; l e t a d = ` < i m g s r c = " $ { q a } " a l t = " $ { r d } " ` ; r e t u r n t d & & ( a d + = ` t i t l e = " $ { t d } " ` ) , a d + = " > " , a d } t e x t ( q a ) { r e t u r n " t o k e n s " i n q a & & q a . t o k e n s ? t h i s . p a r s e r . p a r s e I n l i n e ( q a . t o k e n s ) : q a . t e x t } } , _ T e x t R e n d e r e r $ 1 = c l a s s { s t r o n g ( { t e x t : q a } ) { r e t u r n q a } e m ( { t e x t : q a } ) { r e t u r n q a } c o d e s p a n ( { t e x t : q a } ) { r e t u r n q a } d e l ( { t e x t : q a } ) { r e t u r n q a } h t m l ( { t e x t : q a } ) { r e t u r n q a } t e x t ( { t e x t : q a } ) { r e t u r n q a } l i n k ( { t e x t : q a } ) { r e t u r n " " + q a } i m a g e ( { t e x t : q a } ) { r e t u r n " " + q a } b r ( ) { r e t u r n " " } } , _ P a r s e r $ 1 = c l a s s S T { c o n s t r u c t o r ( q a ) { Q m ( t h i s , " o p t i o n s " ) ; Q m ( t h i s , " r e n d e r e r " ) ; Q m ( t h i s , " t e x t R e n d e r e r " ) ; t h i s . o p t i o n s = q a | | _ d e f a u l t s $ 1 , t h i s . o p t i o n s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r | | n e w _ R e n d e r e r $ 1 , t h i s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r , t h i s . r e n d e r e r . o p t i o n s = t h i s . o p t i o n s , t h i s . r e n d e r e r . p a r s e r = t h i s , t h i s . t e x t R e n d e r e r = n e w _ T e x t R e n d e r e r $ 1 } s t a t i c p a r s e ( q a , t d ) { r e t u r n n e w S T ( t d ) . p a r s e ( q a ) } s t a t i c p a r s e I n l i n e ( q a , t d ) { r e t u r n n e w S T ( t d ) . p a r s e I n l i n e ( q a ) } p a r s e ( q a , t d = ! 0 ) { l e t r d = " " ; f o r ( l e t n d = 0 ; n d < q a . l e n g t h ; n d + + ) { c o n s t a d = q a [ n d ] ; i f ( t h i s . o p t i o n s . e x t e n s i o n s & & t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s & & t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ a d . t y p e ] ) { c o n s t u d = a d , c d = t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ u d . t y p e ] . c a l l ( { p a r s e r : t h i s } , u d ) ; i f ( c d ! = = ! 1 | | ! [ " s p a c e " , " h r " , " h e a d i n g " , " c o d e " , " t a b l e " , " b l o c k q u o t e " , " l i s t " , " h t m l " , " p a r a g r a p h " , " t e x t " ] . i n c l u d e s ( u d . t y p e ) ) { r d + = c d | | " " ; c o n t i n u e } } c o n s t s d = a d ; s w i t c h ( s d . t y p e ) { c a s e " s p a c e " : { r d + = t h i s . r e n d e r e r . s p a c e ( s d ) ; c o n t i n u e } c a s e " h r " : { r d + = t h i s . r e n d e r e r . h r ( s d ) ; c o n t i n u e } c a s e " h e a d i n g " : { r d + = t h i s . r e n d e r e r . h e a d i n g ( s d ) ; c o n t i n u e } c a s e " c o d e " : { r d + = t h i s . r e n d e r e r . c o d e ( s d ) ; c o n t i n u e } c a s e " t a b l e " : { r d + = t h i s . r e n d e r e r . t a b l e ( s d ) ; c o n t i n u e } c a s e " b l o c k q u o t e " : { r d + = t h i s . r e n d e r e r . b l o c k q u o t e ( s d ) ; c o n t i n u e } c a s e " l i s t " : { r d + = t h i s . r e n d e r e r . l i s t ( s d ) ; c o n t i n u e } c a s e " h t m l " : { r d + = t h i s . r e n d e r e r . h t m l ( s d ) ; c o n t i n u e } c a s e " p a r a g r a p h " : { r d + = t h i s . r e n d e r e r . p a r a g r a p h ( s d ) ; c o n t i n u e } c a s e " t e x t " : { l e t u d = s d , c d = t h i s . r e n d e r e r . t e x t ( u d ) ; f o r ( ; n d + 1 < q a . l e n g t h & & q a [ n d + 1 ] . t y p e = = = " t e x t " ; ) u d = q a [ + + n d ] , c d + = `
` +this.renderer.text(ud);td?rd+=this.renderer.paragraph({type:"paragraph",raw:cd,text:cd,tokens:[{type:"text",raw:cd,text:cd}]}):rd+=cd;continue}default:{const ud='Token with "'+sd.type+'" type was not found.';if(this.options.silent)return console.error(ud),"";throw new Error(ud)}}}return rd}parseInline(qa,td){td=td||this.renderer;let rd="";for(let nd=0;nd<qa.length;nd++){const ad=qa[nd];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ad.type]){const ud=this.options.extensions.renderers[ad.type].call({parser:this},ad);if(ud!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(ad.type)){rd+=ud||"";continue}}const sd=ad;switch(sd.type){case"escape":{rd+=td.text(sd);break}case"html":{rd+=td.html(sd);break}case"link":{rd+=td.link(sd);break}case"image":{rd+=td.image(sd);break}case"strong":{rd+=td.strong(sd);break}case"em":{rd+=td.em(sd);break}case"codespan":{rd+=td.codespan(sd);break}case"br":{rd+=td.br(sd);break}case"del":{rd+=td.del(sd);break}case"text":{rd+=td.text(sd);break}default:{const ud='Token with "'+sd.type+'" type was not found.';if(this.options.silent)return console.error(ud),"";throw new Error(ud)}}}return rd}};var ET;let _Hooks $ 1=(ET=class{constructor(qa){Qm(this,"options");Qm(this,"block");this.options=qa||_defaults $ 1}preprocess(qa){return qa}postprocess(qa){return qa}processAllTokens(qa){return qa}provideLexer(){return this.block?_Lexer $ 1.lex:_Lexer $ 1.lexInline}provideParser(){return this.block?_Parser $ 1.parse:_Parser $ 1.parseInline}},Qm(ET,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),ET),Marked $ 1=class{constructor(...qa){Qm(this,"defaults",_getDefaults $ 1());Qm(this,"options",this.setOptions);Qm(this,"parse",this.parseMarkdown(!0));Qm(this,"parseInline",this.parseMarkdown(!1));Qm(this,"Parser",_Parser $ 1);Qm(this,"Renderer",_Renderer $ 1);Qm(this,"TextRenderer",_TextRenderer $ 1);Qm(this,"Lexer",_Lexer $ 1);Qm(this,"Tokenizer",_Tokenizer $ 1);Qm(this,"Hooks",_Hooks $ 1);this.use(...qa)}walkTokens(qa,td){var nd,ad;let rd=[];for(const sd of qa)switch(rd=rd.concat(td.call(this,sd)),sd.type){case"table":{const ud=sd;for(const cd of ud.header)rd=rd.concat(this.walkTokens(cd.tokens,td));for(const cd of ud.rows)for(const dd of cd)rd=rd.concat(this.walkTokens(dd.tokens,td));break}case"list":{const ud=sd;rd=rd.concat(this.walkTokens(ud.items,td));break}default:{const ud=sd;(ad=(nd=this.defaults.extensions)==null?void 0:nd.childTokens)!=null&&ad[ud.type]?this.defaults.extensions.childTokens[ud.type].forEach(cd=>{const dd=ud[cd].flat(1/0);rd=rd.concat(this.walkTokens(dd,td))}):ud.tokens&&(rd=rd.concat(this.walkTokens(ud.tokens,td)))}}return rd}use(...qa){const td=this.defaults.extensions||{renderers:{},childTokens:{}};return qa.forEach(rd=>{const nd={...rd};if(nd.async=this.defaults.async||nd.async||!1,rd.extensions&&(rd.extensions.forEach(ad=>{if(!ad.name)throw new Error("extension name required");if("renderer"in ad){const sd=td.renderers[ad.name];sd?td.renderers[ad.name]=function(...ud){let cd=ad.renderer.apply(this,ud);return cd===!1&&(cd=sd.apply(this,ud)),cd}:td.renderers[ad.name]=ad.renderer}if("tokenizer"in ad){if(!ad.level||ad.level!=="block"&&ad.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const sd=td[ad.level];sd?sd.unshift(ad.tokenizer):td[ad.level]=[ad.tokenizer],ad.start&&(ad.level==="block"?td.startBlock?td.startBlock.push(ad.start):td.startBlock=[ad.start]:ad.level==="inline"&&(td.startInline?td.startInline.push(ad.start):td.startInline=[ad.start]))}"childTokens"in ad&&ad.childTokens&&(td.childTokens[ad.name]=ad.childTokens)}),nd.extensions=td),rd.renderer){const ad=this.defaults.renderer||new _Renderer $ 1(this.defaults);for(const sd in rd.renderer){if(!(sd in ad))throw new Error( ` renderer '${sd}' does not exist ` );if(["options","parser"].includes(sd))continue;const ud=sd,cd=rd.renderer[ud],dd=ad[ud];ad[ud]=(...pd)=>{let fd=cd.apply(ad,pd);return fd===!1&&(fd=dd.apply(ad,pd)),fd||""}}nd.renderer=ad}if(rd.tokenizer){const ad=this.defaults.tokenizer||new _Tokenizer $ 1(
Please report this to https : //github.com/markedjs/marked.`,qa){const nd="<p>An error occurred:</p><pre>"+escape$1$1(rd.message+"",!0)+"</pre>";return td?Promise.resolve(nd):nd}if(td)return Promise.reject(rd);throw rd}}};const markedInstance$1=new Marked$1;function marked$1(Ra,qa){return markedInstance$1.parse(Ra,qa)}marked$1.options=marked$1.setOptions=function(Ra){return markedInstance$1.setOptions(Ra),marked$1.defaults=markedInstance$1.defaults,changeDefaults$1(marked$1.defaults),marked$1};marked$1.getDefaults=_getDefaults$1;marked$1.defaults=_defaults$1;marked$1.use=function(...Ra){return markedInstance$1.use(...Ra),marked$1.defaults=markedInstance$1.defaults,changeDefaults$1(marked$1.defaults),marked$1};marked$1.walkTokens=function(Ra,qa){return markedInstance$1.walkTokens(Ra,qa)};marked$1.parseInline=markedInstance$1.parseInline;marked$1.Parser=_Parser$1;marked$1.parser=_Parser$1.parse;marked$1.Renderer=_Renderer$1;marked$1.TextRenderer=_TextRenderer$1;marked$1.Lexer=_Lexer$1;marked$1.lexer=_Lexer$1.lex;marked$1.Tokenizer=_Tokenizer$1;marked$1.Hooks=_Hooks$1;marked$1.parse=marked$1;marked$1.options;marked$1.setOptions;marked$1.use;marked$1.walkTokens;marked$1.parseInline;_Parser$1.parse;_Lexer$1.lex;const scriptRel="modulepreload",assetsURL=function(Ra){return"/md/"+Ra},seen={},__vitePreload=function(qa,td,rd){let nd=Promise.resolve();if(td&&td.length>0){document.getElementsByTagName("link");const sd=document.querySelector("meta[property=csp-nonce]"),ud=(sd==null?void 0:sd.nonce)||(sd==null?void 0:sd.getAttribute("nonce"));nd=Promise.allSettled(td.map(cd=>{if(cd=assetsURL(cd),cd in seen)return;seen[cd]=!0;const dd=cd.endsWith(".css"),pd=dd?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${cd}"]${pd}`))return;const fd=document.createElement("link");if(fd.rel=dd?"stylesheet":scriptRel,dd||(fd.as="script"),fd.crossOrigin="",fd.href=cd,ud&&fd.setAttribute("nonce",ud),document.head.appendChild(fd),dd)return new Promise((Td,Sd)=>{fd.addEventListener("load",Td),fd.addEventListener("error",()=>Sd(new Error(`Unable to preload CSS for ${cd}`)))})}))}function ad(sd){const ud=new Event("vite:preloadError",{cancelable:!0});if(ud.payload=sd,window.dispatchEvent(ud),!ud.defaultPrevented)throw sd}return nd.then(sd=>{for(const ud of sd||[])ud.status==="rejected"&&ad(ud.reason);return qa().catch(ad)})},Channel={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:Ra=>Ra>=255?255:Ra<0?0:Ra,g:Ra=>Ra>=255?255:Ra<0?0:Ra,b:Ra=>Ra>=255?255:Ra<0?0:Ra,h:Ra=>Ra%360,s:Ra=>Ra>=100?100:Ra<0?0:Ra,l:Ra=>Ra>=100?100:Ra<0?0:Ra,a:Ra=>Ra>=1?1:Ra<0?0:Ra},toLinear:Ra=>{const qa=Ra/255;return Ra>.03928?Math.pow((qa+.055)/1.055,2.4):qa/12.92},hue2rgb:(Ra,qa,td)=>(td<0&&(td+=1),td>1&&(td-=1),td<1/6?Ra+(qa-Ra)*6*td:td<1/2?qa:td<2/3?Ra+(qa-Ra)*(2/3-td)*6:Ra),hsl2rgb:({h:Ra,s:qa,l:td},rd)=>{if(!qa)return td*2.55;Ra/=360,qa/=100,td/=100;const nd=td<.5?td*(1+qa):td+qa-td*qa,ad=2*td-nd;switch(rd){case"r":return Channel.hue2rgb(ad,nd,Ra+1/3)*255;case"g":return Channel.hue2rgb(ad,nd,Ra)*255;case"b":return Channel.hue2rgb(ad,nd,Ra-1/3)*255}},rgb2hsl:({r:Ra,g:qa,b:td},rd)=>{Ra/=255,qa/=255,td/=255;const nd=Math.max(Ra,qa,td),ad=Math.min(Ra,qa,td),sd=(nd+ad)/2;if(rd==="l")return sd*100;if(nd===ad)return 0;const ud=nd-ad,cd=sd>.5?ud/(2-nd-ad):ud/(nd+ad);if(rd==="s")return cd*100;switch(nd){case Ra:return((qa-td)/ud+(qa<td?6:0))*60;case qa:return((td-Ra)/ud+2)*60;case td:return((Ra-qa)/ud+4)*60;default:return-1}}},Lang={clamp:(Ra,qa,td)=>qa>td?Math.min(qa,Math.max(td,Ra)):Math.min(td,Math.max(qa,Ra)),round:Ra=>Math.round(Ra*1e10)/1e10},Unit={dec2hex:Ra=>{const qa=Math.round(Ra).toString(16);return qa.length>1?qa:`0${qa}`}},Utils={channel:Channel,lang:Lang,unit:Unit},DEC2HEX={};for(let Ra=0;Ra<=255;Ra++)DEC2HEX[Ra]=Utils.unit.dec2hex(Ra);const TYPE={ALL:0,RGB:1,HSL:2};class Type{constructor(){this.type=TYPE.ALL}get(){return this.type}set(qa){if(this.type&&this.type!==qa)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=qa}reset(){this.type=TYPE.ALL}is(qa){return this.type===qa}}class Chan
` +S_),Wf&&arrayForEach([hf,bf,yf],w_=>{S_=stringReplace(S_,w_," ")}),Fd&&jf?Fd.createHTML(S_):S_},qa.setConfig=function(){let Rh=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};A_(Rh),lh=!0},qa.clearConfig=function(){e_=null,lh=!1},qa.isValidAttribute=function(Rh,mh,im){e_||A_({});const fm=Pm(Rh),Gm=Pm(mh);return dh(fm,Gm,im)},qa.addHook=function(Rh,mh){typeof mh=="function"&&(Qd[Rh]=Qd[Rh]||[],arrayPush(Qd[Rh],mh))},qa.removeHook=function(Rh){if(Qd[Rh])return arrayPop(Qd[Rh])},qa.removeHooks=function(Rh){Qd[Rh]&&(Qd[Rh]=[])},qa.removeAllHooks=function(){Qd={}},qa}var purify=createDOMPurify(),__defProp=Object.defineProperty,__name=(Ra,qa)=>__defProp(Ra,"name",{value:qa,configurable:!0}),__export=(Ra,qa)=>{for(var td in qa)__defProp(Ra,td,{get:qa[td],enumerable:!0})},LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},log $ 1={trace:__name((...Ra)=>{},"trace"),debug:__name((...Ra)=>{},"debug"),info:__name((...Ra)=>{},"info"),warn:__name((...Ra)=>{},"warn"),error:__name((...Ra)=>{},"error"),fatal:__name((...Ra)=>{},"fatal")},setLogLevel=__name(function(Ra="fatal"){let qa=LEVELS.fatal;typeof Ra=="string"?Ra.toLowerCase()in LEVELS&&(qa=LEVELS[Ra]):typeof Ra=="number"&&(qa=Ra),log $ 1.trace=()=>{},log $ 1.debug=()=>{},log $ 1.info=()=>{},log $ 1.warn=()=>{},log $ 1.error=()=>{},log $ 1.fatal=()=>{},qa<=LEVELS.fatal&&(log $ 1.fatal=console.error?console.error.bind(console,format $ 1("FATAL"),"color: orange"):console.log.bind(console," \x 1B[35m",format $ 1("FATAL"))),qa<=LEVELS.error&&(log $ 1.error=console.error?console.error.bind(console,format $ 1("ERROR"),"color: orange"):console.log.bind(console," \x 1B[31m",format $ 1("ERROR"))),qa<=LEVELS.warn&&(log $ 1.warn=console.warn?console.warn.bind(console,format $ 1("WARN"),"color: orange"):console.log.bind(console," \x 1B[33m",format $ 1("WARN"))),qa<=LEVELS.info&&(log $ 1.info=console.info?console.info.bind(console,format $ 1("INFO"),"color: lightblue"):console.log.bind(console," \x 1B[34m",format $ 1("INFO"))),qa<=LEVELS.debug&&(log $ 1.debug=console.debug?console.debug.bind(console,format $ 1("DEBUG"),"color: lightgreen"):console.log.bind(console," \x 1B[32m",format $ 1("DEBUG"))),qa<=LEVELS.trace&&(log $ 1.trace=console.debug?console.debug.bind(console,format $ 1("TRACE"),"color: lightgreen"):console.log.bind(console," \x 1B[32m",format $ 1("TRACE")))},"setLogLevel"),format $ 1=__name(Ra=> ` % c$ { dayjs2 ( ) . format ( "ss.SSS" ) } : $ { Ra } : ` ,"format"),frontMatterRegex=/^-{3} \s *[ \n \r ](.*?)[ \n \r ]-{3} \s *[ \n \r ]+/s,directiveRegex=/%{2}{ \s *(?:( \w +) \s *:|( \w +)) \s *(?:( \w +)|((?:(?!}%{2}).| \r ? \n )*))? \s *(?:}%{2})?/gi,anyCommentRegex=/ \s *%%.* \n /gm,sy,UnknownDiagramError=(sy=class extends Error{constructor(qa){super(qa),this.name="UnknownDiagramError"}},__name(sy,"UnknownDiagramError"),sy),detectors={},detectType $ 1=__name(function(Ra,qa){Ra=Ra.replace(frontMatterRegex,"").replace(directiveRegex,"").replace(anyCommentRegex, `
` );for(const[td,{detector:rd}]of Object.entries(detectors))if(rd(Ra,qa))return td;throw new UnknownDiagramError( ` No diagram type detected matching given configuration for text : $ { Ra } ` )},"detectType"),registerLazyLoadedDiagrams=__name((...Ra)=>{for(const{id:qa,detector:td,loader:rd}of Ra)addDetector(qa,td,rd)},"registerLazyLoadedDiagrams"),addDetector=__name((Ra,qa,td)=>{detectors[Ra]&&log $ 1.warn( ` Detector with key $ { Ra } already exists . Overwriting . ` ),detectors[Ra]={detector:qa,loader:td},log $ 1.debug( ` Detector with key $ { Ra } added$ { td ? " with loader" : "" } ` )},"addDetector"),getDiagramLoader=__name(Ra=>detectors[Ra].loader,"getDiagramLoader"),assignWithDepth=__name((Ra,qa,{depth:td=2,clobber:rd=!1}={})=>{const nd={depth:td,clobber:rd};return Array.isArray(qa)&&!Array.isArray(Ra)?(qa.forEach(ad=>assignWithDepth(Ra,ad,nd)),Ra):Array.isArray(qa)&&Array.isArray(Ra)?(qa.forEach(ad=>{Ra.includes(ad)||Ra.push(ad)}),Ra):Ra===void 0||td<=0?Ra!=null&&typeof Ra=="object"&&typeof qa=="object"?Object.assign(Ra,qa):qa:(qa!==void 0&&typeof Ra=="object"&&typeof qa=="object"&&Object.keys(qa).forEach(ad=>{typeof qa[ad]=="object"&&(Ra[ad]===void 0||typeof Ra[ad]=="object")?(Ra[ad]===void 0&&(Ra[ad]=Array.isArray(qa[ad])?[]:{}),Ra[ad]=assignWithDepth(Ra[ad],qa[ad],{depth:td-1,clobber:rd})):(rd||typeof Ra[ad]!="object"&&typeof qa[ad]!="object")&&(Ra[ad]=qa[ad])}),Ra)},"assignWithDepth"),assignWithDepth_default=assignWithDepth,oldAttributeBackgroundColorOdd="#ffffff",oldAttributeBackgroundColorEven="#f2f2f2",mkBorder=__name((Ra,qa)=>qa?adjust(Ra,{s:-40,l:10}):adjust(Ra,{s:-40,l:-10}),"mkBorder"),oy,Theme=(oy=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var td,rd,nd,ad,sd,ud,cd,dd,pd,fd,Td;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||adjust(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||invert(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert(this.tertiaryColor),this.lineColor=this.lineColor||invert(this.background),this.arrowheadColor=this.arrowheadColor||invert(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?darken(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextCo
2024-09-25 14:23:53 +08:00
font - family : $ { td . fontFamily } ;
font - size : $ { td . fontSize } ;
fill : $ { td . textColor }
2024-09-18 09:46:23 +08:00
}
/* Classes common for multiple diagrams */
& . error - icon {
2024-09-25 14:23:53 +08:00
fill : $ { td . errorBkgColor } ;
2024-09-18 09:46:23 +08:00
}
& . error - text {
2024-09-25 14:23:53 +08:00
fill : $ { td . errorTextColor } ;
stroke : $ { td . errorTextColor } ;
2024-09-18 09:46:23 +08:00
}
& . edge - thickness - normal {
stroke - width : 1 px ;
}
& . edge - thickness - thick {
stroke - width : 3.5 px
}
& . edge - pattern - solid {
stroke - dasharray : 0 ;
}
& . edge - thickness - invisible {
stroke - width : 0 ;
fill : none ;
}
& . edge - pattern - dashed {
stroke - dasharray : 3 ;
}
. edge - pattern - dotted {
stroke - dasharray : 2 ;
}
& . marker {
2024-09-25 14:23:53 +08:00
fill : $ { td . lineColor } ;
stroke : $ { td . lineColor } ;
2024-09-18 09:46:23 +08:00
}
& . marker . cross {
2024-09-25 14:23:53 +08:00
stroke : $ { td . lineColor } ;
2024-09-18 09:46:23 +08:00
}
& svg {
2024-09-25 14:23:53 +08:00
font - family : $ { td . fontFamily } ;
font - size : $ { td . fontSize } ;
2024-09-18 09:46:23 +08:00
}
& p {
margin : 0
}
2024-09-25 14:23:53 +08:00
$ { rd }
2024-09-18 09:46:23 +08:00
$ { qa }
2024-11-27 11:30:55 +08:00
` },"getStyles"),addStylesForDiagram=__name((Ra,qa)=>{qa!==void 0&&(themes[Ra]=qa)},"addStylesForDiagram"),styles_default=getStyles $ 1,commonDb_exports={};__export(commonDb_exports,{clear:()=>clear $ 2,getAccDescription:()=>getAccDescription,getAccTitle:()=>getAccTitle,getDiagramTitle:()=>getDiagramTitle,setAccDescription:()=>setAccDescription,setAccTitle:()=>setAccTitle,setDiagramTitle:()=>setDiagramTitle});var accTitle="",diagramTitle="",accDescription="",sanitizeText2=__name(Ra=>sanitizeText(Ra,getConfig $ 1()),"sanitizeText"),clear $ 2=__name(()=>{accTitle="",accDescription="",diagramTitle=""},"clear"),setAccTitle=__name(Ra=>{accTitle=sanitizeText2(Ra).replace(/^ \s +/g,"")},"setAccTitle"),getAccTitle=__name(()=>accTitle,"getAccTitle"),setAccDescription=__name(Ra=>{accDescription=sanitizeText2(Ra).replace(/ \n \s +/g, `
` )},"setAccDescription"),getAccDescription=__name(()=>accDescription,"getAccDescription"),setDiagramTitle=__name(Ra=>{diagramTitle=sanitizeText2(Ra)},"setDiagramTitle"),getDiagramTitle=__name(()=>diagramTitle,"getDiagramTitle"),log2=log $ 1,setLogLevel2=setLogLevel,getConfig2=getConfig $ 1,setConfig2=setConfig,defaultConfig2=defaultConfig,sanitizeText3=__name(Ra=>sanitizeText(Ra,getConfig2()),"sanitizeText"),setupGraphViewbox2=setupGraphViewbox,getCommonDb=__name(()=>commonDb_exports,"getCommonDb"),diagrams={},registerDiagram=__name((Ra,qa,td)=>{var rd;diagrams[Ra]&&log2.warn( ` Diagram with id $ { Ra } already registered . Overwriting . ` ),diagrams[Ra]=qa,td&&addDetector(Ra,td),addStylesForDiagram(Ra,qa.styles),(rd=qa.injectUtils)==null||rd.call(qa,log2,setLogLevel2,getConfig2,sanitizeText3,setupGraphViewbox2,getCommonDb(),()=>{})},"registerDiagram"),getDiagram=__name(Ra=>{if(Ra in diagrams)return diagrams[Ra];throw new DiagramNotFoundError(Ra)},"getDiagram"),Ay,DiagramNotFoundError=(Ay=class extends Error{constructor(qa){super( ` Diagram $ { qa } not found . ` )}},__name(Ay,"DiagramNotFoundError"),Ay);function isNothing(Ra){return typeof Ra>"u"||Ra===null}__name(isNothing,"isNothing");function isObject $ 3(Ra){return typeof Ra=="object"&&Ra!==null}__name(isObject $ 3,"isObject");function toArray $ 2(Ra){return Array.isArray(Ra)?Ra:isNothing(Ra)?[]:[Ra]}__name(toArray $ 2,"toArray");function extend $ 2(Ra,qa){var td,rd,nd,ad;if(qa)for(ad=Object.keys(qa),td=0,rd=ad.length;td<rd;td+=1)nd=ad[td],Ra[nd]=qa[nd];return Ra}__name(extend $ 2,"extend");function repeat(Ra,qa){var td="",rd;for(rd=0;rd<qa;rd+=1)td+=Ra;return td}__name(repeat,"repeat");function isNegativeZero(Ra){return Ra===0&&Number.NEGATIVE_INFINITY===1/Ra}__name(isNegativeZero,"isNegativeZero");var isNothing_1=isNothing,isObject_1=isObject $ 3,toArray_1=toArray $ 2,repeat_1=repeat,isNegativeZero_1=isNegativeZero,extend_1=extend $ 2,common={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};function formatError(Ra,qa){var td="",rd=Ra.reason||"(unknown reason)";return Ra.mark?(Ra.mark.name&&(td+='in "'+Ra.mark.name+'" '),td+="("+(Ra.mark.line+1)+":"+(Ra.mark.column+1)+")",!qa&&Ra.mark.snippet&&(td+= `
` +Ra.mark.snippet),rd+" "+td):rd}__name(formatError,"formatError");function YAMLException $ 1(Ra,qa){Error.call(this),this.name="YAMLException",this.reason=Ra,this.mark=qa,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}__name(YAMLException $ 1,"YAMLException $ 1");YAMLException $ 1.prototype=Object.create(Error.prototype);YAMLException $ 1.prototype.constructor=YAMLException $ 1;YAMLException $ 1.prototype.toString=__name(function(qa){return this.name+": "+formatError(this,qa)},"toString");var exception=YAMLException $ 1;function getLine(Ra,qa,td,rd,nd){var ad="",sd="",ud=Math.floor(nd/2)-1;return rd-qa>ud&&(ad=" ... ",qa=rd-ud+ad.length),td-rd>ud&&(sd=" ...",td=rd+ud-sd.length),{str:ad+Ra.slice(qa,td).replace(/ \t /g,"→")+sd,pos:rd-qa+ad.length}}__name(getLine,"getLine");function padStart(Ra,qa){return common.repeat(" ",qa-Ra.length)+Ra}__name(padStart,"padStart");function makeSnippet(Ra,qa){if(qa=Object.create(qa||null),!Ra.buffer)return null;qa.maxLength||(qa.maxLength=79),typeof qa.indent!="number"&&(qa.indent=1),typeof qa.linesBefore!="number"&&(qa.linesBefore=3),typeof qa.linesAfter!="number"&&(qa.linesAfter=2);for(var td=/ \r ? \n | \r | \0 /g,rd=[0],nd=[],ad,sd=-1;ad=td.exec(Ra.buffer);)nd.push(ad.index),rd.push(ad.index+ad[0].length),Ra.position<=ad.index&&sd<0&&(sd=rd.length-2);sd<0&&(sd=rd.length-1);var ud="",cd,dd,pd=Math.min(Ra.line+qa.linesAfter,nd.length).toString().length,fd=qa.maxLength-(qa.indent+pd+3);for(cd=1;cd<=qa.linesBefore&&!(sd-cd<0);cd++)dd=getLine(Ra.buffer,rd[sd-cd],nd[sd-cd],Ra.position-(rd[sd]-rd[sd-cd]),fd),ud=common.repeat(" ",qa.indent)+padStart((Ra.line-cd+1).toString(),pd)+" | "+dd.str+ `
` +ud;for(dd=getLine(Ra.buffer,rd[sd],nd[sd],Ra.position,fd),ud+=common.repeat(" ",qa.indent)+padStart((Ra.line+1).toString(),pd)+" | "+dd.str+ `
` ,ud+=common.repeat("-",qa.indent+pd+3+dd.pos)+ ` ^
` ,cd=1;cd<=qa.linesAfter&&!(sd+cd>=nd.length);cd++)dd=getLine(Ra.buffer,rd[sd+cd],nd[sd+cd],Ra.position-(rd[sd]-rd[sd+cd]),fd),ud+=common.repeat(" ",qa.indent)+padStart((Ra.line+cd+1).toString(),pd)+" | "+dd.str+ `
` ;return ud.replace(/ \n $ /,"")}__name(makeSnippet,"makeSnippet");var snippet=makeSnippet,TYPE_CONSTRUCTOR_OPTIONS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(Ra){var qa={};return Ra!==null&&Object.keys(Ra).forEach(function(td){Ra[td].forEach(function(rd){qa[String(rd)]=td})}),qa}__name(compileStyleAliases,"compileStyleAliases");function Type $ 1(Ra,qa){if(qa=qa||{},Object.keys(qa).forEach(function(td){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(td)===-1)throw new exception('Unknown option "'+td+'" is met in definition of "'+Ra+'" YAML type.')}),this.options=qa,this.tag=Ra,this.kind=qa.kind||null,this.resolve=qa.resolve||function(){return!0},this.construct=qa.construct||function(td){return td},this.instanceOf=qa.instanceOf||null,this.predicate=qa.predicate||null,this.represent=qa.represent||null,this.representName=qa.representName||null,this.defaultStyle=qa.defaultStyle||null,this.multi=qa.multi||!1,this.styleAliases=compileStyleAliases(qa.styleAliases||null),YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new exception('Unknown kind "'+this.kind+'" is specified for "'+Ra+'" YAML type.')}__name(Type $ 1,"Type $ 1");var type $ 1=Type $ 1;function compileList(Ra,qa){var td=[];return Ra[qa].forEach(function(rd){var nd=td.length;td.forEach(function(ad,sd){ad.tag===rd.tag&&ad.kind===rd.kind&&ad.multi===rd.multi&&(nd=sd)}),td[nd]=rd}),td}__name(compileList,"compileList");function compileMap(){var Ra={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},qa,td;function rd(nd){nd.multi?(Ra.multi[nd.kind].push(nd),Ra.multi.fallback.push(nd)):Ra[nd.kind][nd.tag]=Ra.fallback[nd.tag]=nd}for(__name(rd,"collectType"),qa=0,td=arguments.length;qa<td;qa+=1)arguments[qa].forEach(rd);return Ra}__name(compileMap,"compileMap");function Schema $ 1(Ra){return this.extend(Ra)}__name(Schema $ 1,"Schema $ 1");Schema $ 1.prototype.extend=__name(function(qa){var td=[],rd=[];if(qa instanceof type $ 1)rd.push(qa);else if(Array.isArray(qa))rd=rd.concat(qa);else if(qa&&(Array.isArray(qa.implicit)||Array.isArray(qa.explicit)))qa.implicit&&(td=td.concat(qa.implicit)),qa.explicit&&(rd=rd.concat(qa.explicit));else throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");td.forEach(function(ad){if(!(ad instanceof type $ 1))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(ad.loadKind&&ad.loadKind!=="scalar")throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(ad.multi)throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),rd.forEach(function(ad){if(!(ad instanceof type $ 1))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var nd=Object.create(Schema $ 1.prototype);return nd.implicit=(this.implicit||[]).concat(td),nd.explicit=(this.explicit||[]).concat(rd),nd.compiledImplicit=compileList(nd,"implicit"),nd.compiledExplicit=compileList(nd,"explicit"),nd.compiledTypeMap=compileMap(nd.compiledImplicit,nd.compiledExplicit),nd},"extend");var schema=Schema $ 1,str=new type $ 1("tag:yaml.org,2002:str",{kind:"scalar",construct:__name(function(Ra){return Ra!==null?Ra:""},"construct")}),seq $ 1=new type $ 1("tag:yaml.org,2002:seq",{kind:"sequence",construct:__name(function(Ra){return Ra!==null?Ra:[]},"construct")}),map $ 2=new type $ 1("tag:yaml.org,2002:map",{kind:"mapping",construct:__name(function(Ra){return Ra!==null?Ra:{}},"construct")}),failsafe=new schema({explicit:[str,seq $ 1,map $ 2]});function resolveYamlNull(Ra){if(Ra===null)return!0;var qa=Ra.length;return qa===1&&Ra==="~"||qa===4&&(Ra==="null"||Ra==="Null"||Ra==="NULL")}__name(resolveYamlNull,"resolveYamlNull");function constructYamlNull(){return null}__name(constructYamlNull,"constructYamlNull");function isNull(Ra){
\ r ` ;function resolveYamlBinary(Ra){if(Ra===null)return!1;var qa,td,rd=0,nd=Ra.length,ad=BASE64_MAP;for(td=0;td<nd;td++)if(qa=ad.indexOf(Ra.charAt(td)),!(qa>64)){if(qa<0)return!1;rd+=6}return rd%8===0}__name(resolveYamlBinary,"resolveYamlBinary");function constructYamlBinary(Ra){var qa,td,rd=Ra.replace(/[ \r \n =]/g,""),nd=rd.length,ad=BASE64_MAP,sd=0,ud=[];for(qa=0;qa<nd;qa++)qa%4===0&&qa&&(ud.push(sd>>16&255),ud.push(sd>>8&255),ud.push(sd&255)),sd=sd<<6|ad.indexOf(rd.charAt(qa));return td=nd%4*6,td===0?(ud.push(sd>>16&255),ud.push(sd>>8&255),ud.push(sd&255)):td===18?(ud.push(sd>>10&255),ud.push(sd>>2&255)):td===12&&ud.push(sd>>4&255),new Uint8Array(ud)}__name(constructYamlBinary,"constructYamlBinary");function representYamlBinary(Ra){var qa="",td=0,rd,nd,ad=Ra.length,sd=BASE64_MAP;for(rd=0;rd<ad;rd++)rd%3===0&&rd&&(qa+=sd[td>>18&63],qa+=sd[td>>12&63],qa+=sd[td>>6&63],qa+=sd[td&63]),td=(td<<8)+Ra[rd];return nd=ad%3,nd===0?(qa+=sd[td>>18&63],qa+=sd[td>>12&63],qa+=sd[td>>6&63],qa+=sd[td&63]):nd===2?(qa+=sd[td>>10&63],qa+=sd[td>>4&63],qa+=sd[td<<2&63],qa+=sd[64]):nd===1&&(qa+=sd[td>>2&63],qa+=sd[td<<4&63],qa+=sd[64],qa+=sd[64]),qa}__name(representYamlBinary,"representYamlBinary");function isBinary(Ra){return Object.prototype.toString.call(Ra)==="[object Uint8Array]"}__name(isBinary,"isBinary");var binary=new type $ 1("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary}),_hasOwnProperty $ 3=Object.prototype.hasOwnProperty,_toString $ 2=Object.prototype.toString;function resolveYamlOmap(Ra){if(Ra===null)return!0;var qa=[],td,rd,nd,ad,sd,ud=Ra;for(td=0,rd=ud.length;td<rd;td+=1){if(nd=ud[td],sd=!1,_toString $ 2.call(nd)!=="[object Object]")return!1;for(ad in nd)if(_hasOwnProperty $ 3.call(nd,ad))if(!sd)sd=!0;else return!1;if(!sd)return!1;if(qa.indexOf(ad)===-1)qa.push(ad);else return!1}return!0}__name(resolveYamlOmap,"resolveYamlOmap");function constructYamlOmap(Ra){return Ra!==null?Ra:[]}__name(constructYamlOmap,"constructYamlOmap");var omap=new type $ 1("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap}),_toString $ 1=Object.prototype.toString;function resolveYamlPairs(Ra){if(Ra===null)return!0;var qa,td,rd,nd,ad,sd=Ra;for(ad=new Array(sd.length),qa=0,td=sd.length;qa<td;qa+=1){if(rd=sd[qa],_toString $ 1.call(rd)!=="[object Object]"||(nd=Object.keys(rd),nd.length!==1))return!1;ad[qa]=[nd[0],rd[nd[0]]]}return!0}__name(resolveYamlPairs,"resolveYamlPairs");function constructYamlPairs(Ra){if(Ra===null)return[];var qa,td,rd,nd,ad,sd=Ra;for(ad=new Array(sd.length),qa=0,td=sd.length;qa<td;qa+=1)rd=sd[qa],nd=Object.keys(rd),ad[qa]=[nd[0],rd[nd[0]]];return ad}__name(constructYamlPairs,"constructYamlPairs");var pairs=new type $ 1("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs}),_hasOwnProperty $ 2=Object.prototype.hasOwnProperty;function resolveYamlSet(Ra){if(Ra===null)return!0;var qa,td=Ra;for(qa in td)if(_hasOwnProperty $ 2.call(td,qa)&&td[qa]!==null)return!1;return!0}__name(resolveYamlSet,"resolveYamlSet");function constructYamlSet(Ra){return Ra!==null?Ra:{}}__name(constructYamlSet,"constructYamlSet");var set $ 2=new type $ 1("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet}),_default=core $ 1.extend({implicit:[timestamp,merge $ 1],explicit:[binary,omap,pairs,set $ 2]}),_hasOwnProperty $ 1=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[ \x 00- \x 08 \x 0B \x 0C \x 0E- \x 1F \x 7F- \x 84 \x 86- \x 9F \u FFFE \u FFFF]|[ \u D800- \u DBFF](?![ \u DC00- \u DFFF])|(?:[^ \u D800- \u DBFF]|^)[ \u DC00- \u DFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[ \x 85 \u 2028 \u 2029]/,PATTERN_FLOW_INDICATORS=/[, \[ \] \{ \} ]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z \- ]+!) $ /i,PATTERN_TAG_URI=/^(?:!|[^, \[ \] \{ \} ])(?:%[0-9a-f]{2}|[0-9a-z \- #; \/ \? :@&= \+ \$ ,_ \. !~ \* ' \( \) \[ \] ])* $ /i;function _class(Ra){return Object.prototype.toString.call(Ra)}__name(_class,"_class");function is_EOL(Ra){return Ra===10|
` :Ra===118?" \v ":Ra===102?" \f ":Ra===114?" \r ":Ra===101?" \x 1B":Ra===32?" ":Ra===34?'"':Ra===47?"/":Ra===92?" \\ ":Ra===78?"
":Ra===95?" ":Ra===76?" \u 2028":Ra===80?" \u 2029":""}__name(simpleEscapeSequence,"simpleEscapeSequence");function charFromCodepoint(Ra){return Ra<=65535?String.fromCharCode(Ra):String.fromCharCode((Ra-65536>>10)+55296,(Ra-65536&1023)+56320)}__name(charFromCodepoint,"charFromCodepoint");var simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256);for(i $ 2=0;i $ 2<256;i $ 2++)simpleEscapeCheck[i $ 2]=simpleEscapeSequence(i $ 2)?1:0,simpleEscapeMap[i $ 2]=simpleEscapeSequence(i $ 2);var i $ 2;function State $ 1(Ra,qa){this.input=Ra,this.filename=qa.filename||null,this.schema=qa.schema||_default,this.onWarning=qa.onWarning||null,this.legacy=qa.legacy||!1,this.json=qa.json||!1,this.listener=qa.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=Ra.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}__name(State $ 1,"State $ 1");function generateError(Ra,qa){var td={name:Ra.filename,buffer:Ra.input.slice(0,-1),position:Ra.position,line:Ra.line,column:Ra.position-Ra.lineStart};return td.snippet=snippet(td),new exception(qa,td)}__name(generateError,"generateError");function throwError(Ra,qa){throw generateError(Ra,qa)}__name(throwError,"throwError");function throwWarning(Ra,qa){Ra.onWarning&&Ra.onWarning.call(null,generateError(Ra,qa))}__name(throwWarning,"throwWarning");var directiveHandlers={YAML:__name(function(qa,td,rd){var nd,ad,sd;qa.version!==null&&throwError(qa,"duplication of %YAML directive"),rd.length!==1&&throwError(qa,"YAML directive accepts exactly one argument"),nd=/^([0-9]+) \. ([0-9]+) $ /.exec(rd[0]),nd===null&&throwError(qa,"ill-formed argument of the YAML directive"),ad=parseInt(nd[1],10),sd=parseInt(nd[2],10),ad!==1&&throwError(qa,"unacceptable YAML version of the document"),qa.version=rd[0],qa.checkLineBreaks=sd<2,sd!==1&&sd!==2&&throwWarning(qa,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:__name(function(qa,td,rd){var nd,ad;rd.length!==2&&throwError(qa,"TAG directive accepts exactly two arguments"),nd=rd[0],ad=rd[1],PATTERN_TAG_HANDLE.test(nd)||throwError(qa,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty $ 1.call(qa.tagMap,nd)&&throwError(qa,'there is a previously declared suffix for "'+nd+'" tag handle'),PATTERN_TAG_URI.test(ad)||throwError(qa,"ill-formed tag prefix (second argument) of the TAG directive");try{ad=decodeURIComponent(ad)}catch{throwError(qa,"tag prefix is malformed: "+ad)}qa.tagMap[nd]=ad},"handleTagDirective")};function captureSegment(Ra,qa,td,rd){var nd,ad,sd,ud;if(qa<td){if(ud=Ra.input.slice(qa,td),rd)for(nd=0,ad=ud.length;nd<ad;nd+=1)sd=ud.charCodeAt(nd),sd===9||32<=sd&&sd<=1114111||throwError(Ra,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(ud)&&throwError(Ra,"the stream contains non-printable characters");Ra.result+=ud}}__name(captureSegment,"captureSegment");function mergeMappings(Ra,qa,td,rd){var nd,ad,sd,ud;for(common.isObject(td)||throwError(Ra,"cannot merge mappings; the provided source object is unacceptable"),nd=Object.keys(td),sd=0,ud=nd.length;sd<ud;sd+=1)ad=nd[sd],_hasOwnProperty $ 1.call(qa,ad)||(qa[ad]=td[ad],rd[ad]=!0)}__name(mergeMappings,"mergeMappings");function storeMappingPair(Ra,qa,td,rd,nd,ad,sd,ud,cd){var dd,pd;if(Array.isArray(nd))for(nd=Array.prototype.slice.call(nd),dd=0,pd=nd.length;dd<pd;dd+=1)Array.isArray(nd[dd])&&throwError(Ra,"nested arrays are not supported inside keys"),typeof nd=="object"&&_class(nd[dd])==="[object Object]"&&(nd[dd]="[object Object]");if(typeof nd=="object"&&_class(nd)==="[object Object]"&&(nd="[object Object]"),nd=String(nd),qa===null&&(qa={}),rd==="tag:yaml.org,2002:merge")if(Array.isArray(ad))for(dd=0,pd=ad.length;dd<pd;dd+=1)mergeMappings(Ra,qa,ad[dd],td);else mergeMappings(Ra,qa,ad,td);else!Ra.json&&!_hasOwnProperty $ 1.call(td,nd)&&_hasOwnProperty $ 1.call(qa,nd)&&(Ra.line=sd||Ra.line,Ra.lineStart=ud||Ra.lineStart,Ra.position=cd||Ra.positio
` ,qa-1))}__name(writeFoldedLines,"writeFoldedLines");function readPlainScalar(Ra,qa,td){var rd,nd,ad,sd,ud,cd,dd,pd,fd=Ra.kind,Td=Ra.result,Sd;if(Sd=Ra.input.charCodeAt(Ra.position),is_WS_OR_EOL(Sd)||is_FLOW_INDICATOR(Sd)||Sd===35||Sd===38||Sd===42||Sd===33||Sd===124||Sd===62||Sd===39||Sd===34||Sd===37||Sd===64||Sd===96||(Sd===63||Sd===45)&&(nd=Ra.input.charCodeAt(Ra.position+1),is_WS_OR_EOL(nd)||td&&is_FLOW_INDICATOR(nd)))return!1;for(Ra.kind="scalar",Ra.result="",ad=sd=Ra.position,ud=!1;Sd!==0;){if(Sd===58){if(nd=Ra.input.charCodeAt(Ra.position+1),is_WS_OR_EOL(nd)||td&&is_FLOW_INDICATOR(nd))break}else if(Sd===35){if(rd=Ra.input.charCodeAt(Ra.position-1),is_WS_OR_EOL(rd))break}else{if(Ra.position===Ra.lineStart&&testDocumentSeparator(Ra)||td&&is_FLOW_INDICATOR(Sd))break;if(is_EOL(Sd))if(cd=Ra.line,dd=Ra.lineStart,pd=Ra.lineIndent,skipSeparationSpace(Ra,!1,-1),Ra.lineIndent>=qa){ud=!0,Sd=Ra.input.charCodeAt(Ra.position);continue}else{Ra.position=sd,Ra.line=cd,Ra.lineStart=dd,Ra.lineIndent=pd;break}}ud&&(captureSegment(Ra,ad,sd,!1),writeFoldedLines(Ra,Ra.line-cd),ad=sd=Ra.position,ud=!1),is_WHITE_SPACE(Sd)||(sd=Ra.position+1),Sd=Ra.input.charCodeAt(++Ra.position)}return captureSegment(Ra,ad,sd,!1),Ra.result?!0:(Ra.kind=fd,Ra.result=Td,!1)}__name(readPlainScalar,"readPlainScalar");function readSingleQuotedScalar(Ra,qa){var td,rd,nd;if(td=Ra.input.charCodeAt(Ra.position),td!==39)return!1;for(Ra.kind="scalar",Ra.result="",Ra.position++,rd=nd=Ra.position;(td=Ra.input.charCodeAt(Ra.position))!==0;)if(td===39)if(captureSegment(Ra,rd,Ra.position,!0),td=Ra.input.charCodeAt(++Ra.position),td===39)rd=Ra.position,Ra.position++,nd=Ra.position;else return!0;else is_EOL(td)?(captureSegment(Ra,rd,nd,!0),writeFoldedLines(Ra,skipSeparationSpace(Ra,!1,qa)),rd=nd=Ra.position):Ra.position===Ra.lineStart&&testDocumentSeparator(Ra)?throwError(Ra,"unexpected end of the document within a single quoted scalar"):(Ra.position++,nd=Ra.position);throwError(Ra,"unexpected end of the stream within a single quoted scalar")}__name(readSingleQuotedScalar,"readSingleQuotedScalar");function readDoubleQuotedScalar(Ra,qa){var td,rd,nd,ad,sd,ud;if(ud=Ra.input.charCodeAt(Ra.position),ud!==34)return!1;for(Ra.kind="scalar",Ra.result="",Ra.position++,td=rd=Ra.position;(ud=Ra.input.charCodeAt(Ra.position))!==0;){if(ud===34)return captureSegment(Ra,td,Ra.position,!0),Ra.position++,!0;if(ud===92){if(captureSegment(Ra,td,Ra.position,!0),ud=Ra.input.charCodeAt(++Ra.position),is_EOL(ud))skipSeparationSpace(Ra,!1,qa);else if(ud<256&&simpleEscapeCheck[ud])Ra.result+=simpleEscapeMap[ud],Ra.position++;else if((sd=escapedHexLen(ud))>0){for(nd=sd,ad=0;nd>0;nd--)ud=Ra.input.charCodeAt(++Ra.position),(sd=fromHexCode(ud))>=0?ad=(ad<<4)+sd:throwError(Ra,"expected hexadecimal character");Ra.result+=charFromCodepoint(ad),Ra.position++}else throwError(Ra,"unknown escape sequence");td=rd=Ra.position}else is_EOL(ud)?(captureSegment(Ra,td,rd,!0),writeFoldedLines(Ra,skipSeparationSpace(Ra,!1,qa)),td=rd=Ra.position):Ra.position===Ra.lineStart&&testDocumentSeparator(Ra)?throwError(Ra,"unexpected end of the document within a double quoted scalar"):(Ra.position++,rd=Ra.position)}throwError(Ra,"unexpected end of the stream within a double quoted scalar")}__name(readDoubleQuotedScalar,"readDoubleQuotedScalar");function readFlowCollection(Ra,qa){var td=!0,rd,nd,ad,sd=Ra.tag,ud,cd=Ra.anchor,dd,pd,fd,Td,Sd,Ad=Object.create(null),Nd,Ld,Rd,Od;if(Od=Ra.input.charCodeAt(Ra.position),Od===91)pd=93,Sd=!1,ud=[];else if(Od===123)pd=125,Sd=!0,ud={};else return!1;for(Ra.anchor!==null&&(Ra.anchorMap[Ra.anchor]=ud),Od=Ra.input.charCodeAt(++Ra.position);Od!==0;){if(skipSeparationSpace(Ra,!0,qa),Od=Ra.input.charCodeAt(Ra.position),Od===pd)return Ra.position++,Ra.tag=sd,Ra.anchor=cd,Ra.kind=Sd?"mapping":"sequence",Ra.result=ud,!0;td?Od===44&&throwError(Ra,"expected the node content, but found ','"):throwError(Ra,"missed comma between flow collection entries"),Ld=Nd=Rd=null,fd=Td=!1,Od===63&&(dd=Ra.input.charCodeAt(Ra.position+1),is_WS_OR_EOL(dd)&&(fd=Td=!0,Ra.position++,skipSeparationSpace(Ra,!0,qa))),rd=Ra.l
` ,ad?1+cd:cd):nd===CHOMPING_CLIP&&ad&&(Ra.result+= `
` );break}for(rd?is_WHITE_SPACE(fd)?(dd=!0,Ra.result+=common.repeat( `
` ,ad?1+cd:cd)):dd?(dd=!1,Ra.result+=common.repeat( `
` ,cd+1)):cd===0?ad&&(Ra.result+=" "):Ra.result+=common.repeat( `
` ,cd):Ra.result+=common.repeat( `
` ,ad?1+cd:cd),ad=!0,sd=!0,cd=0,td=Ra.position;!is_EOL(fd)&&fd!==0;)fd=Ra.input.charCodeAt(++Ra.position);captureSegment(Ra,td,Ra.position,!1)}return!0}__name(readBlockScalar,"readBlockScalar");function readBlockSequence(Ra,qa){var td,rd=Ra.tag,nd=Ra.anchor,ad=[],sd,ud=!1,cd;if(Ra.firstTabInLine!==-1)return!1;for(Ra.anchor!==null&&(Ra.anchorMap[Ra.anchor]=ad),cd=Ra.input.charCodeAt(Ra.position);cd!==0&&(Ra.firstTabInLine!==-1&&(Ra.position=Ra.firstTabInLine,throwError(Ra,"tab characters must not be used in indentation")),!(cd!==45||(sd=Ra.input.charCodeAt(Ra.position+1),!is_WS_OR_EOL(sd))));){if(ud=!0,Ra.position++,skipSeparationSpace(Ra,!0,-1)&&Ra.lineIndent<=qa){ad.push(null),cd=Ra.input.charCodeAt(Ra.position);continue}if(td=Ra.line,composeNode(Ra,qa,CONTEXT_BLOCK_IN,!1,!0),ad.push(Ra.result),skipSeparationSpace(Ra,!0,-1),cd=Ra.input.charCodeAt(Ra.position),(Ra.line===td||Ra.lineIndent>qa)&&cd!==0)throwError(Ra,"bad indentation of a sequence entry");else if(Ra.lineIndent<qa)break}return ud?(Ra.tag=rd,Ra.anchor=nd,Ra.kind="sequence",Ra.result=ad,!0):!1}__name(readBlockSequence,"readBlockSequence");function readBlockMapping(Ra,qa,td){var rd,nd,ad,sd,ud,cd,dd=Ra.tag,pd=Ra.anchor,fd={},Td=Object.create(null),Sd=null,Ad=null,Nd=null,Ld=!1,Rd=!1,Od;if(Ra.firstTabInLine!==-1)return!1;for(Ra.anchor!==null&&(Ra.anchorMap[Ra.anchor]=fd),Od=Ra.input.charCodeAt(Ra.position);Od!==0;){if(!Ld&&Ra.firstTabInLine!==-1&&(Ra.position=Ra.firstTabInLine,throwError(Ra,"tab characters must not be used in indentation")),rd=Ra.input.charCodeAt(Ra.position+1),ad=Ra.line,(Od===63||Od===58)&&is_WS_OR_EOL(rd))Od===63?(Ld&&(storeMappingPair(Ra,fd,Td,Sd,Ad,null,sd,ud,cd),Sd=Ad=Nd=null),Rd=!0,Ld=!0,nd=!0):Ld?(Ld=!1,nd=!0):throwError(Ra,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),Ra.position+=1,Od=rd;else{if(sd=Ra.line,ud=Ra.lineStart,cd=Ra.position,!composeNode(Ra,td,CONTEXT_FLOW_OUT,!1,!0))break;if(Ra.line===ad){for(Od=Ra.input.charCodeAt(Ra.position);is_WHITE_SPACE(Od);)Od=Ra.input.charCodeAt(++Ra.position);if(Od===58)Od=Ra.input.charCodeAt(++Ra.position),is_WS_OR_EOL(Od)||throwError(Ra,"a whitespace character is expected after the key-value separator within a block mapping"),Ld&&(storeMappingPair(Ra,fd,Td,Sd,Ad,null,sd,ud,cd),Sd=Ad=Nd=null),Rd=!0,Ld=!1,nd=!1,Sd=Ra.tag,Ad=Ra.result;else if(Rd)throwError(Ra,"can not read an implicit mapping pair; a colon is missed");else return Ra.tag=dd,Ra.anchor=pd,!0}else if(Rd)throwError(Ra,"can not read a block mapping entry; a multiline key may not be an implicit key");else return Ra.tag=dd,Ra.anchor=pd,!0}if((Ra.line===ad||Ra.lineIndent>qa)&&(Ld&&(sd=Ra.line,ud=Ra.lineStart,cd=Ra.position),composeNode(Ra,qa,CONTEXT_BLOCK_OUT,!0,nd)&&(Ld?Ad=Ra.result:Nd=Ra.result),Ld||(storeMappingPair(Ra,fd,Td,Sd,Ad,Nd,sd,ud,cd),Sd=Ad=Nd=null),skipSeparationSpace(Ra,!0,-1),Od=Ra.input.charCodeAt(Ra.position)),(Ra.line===ad||Ra.lineIndent>qa)&&Od!==0)throwError(Ra,"bad indentation of a mapping entry");else if(Ra.lineIndent<qa)break}return Ld&&storeMappingPair(Ra,fd,Td,Sd,Ad,null,sd,ud,cd),Rd&&(Ra.tag=dd,Ra.anchor=pd,Ra.kind="mapping",Ra.result=fd),Rd}__name(readBlockMapping,"readBlockMapping");function readTagProperty(Ra){var qa,td=!1,rd=!1,nd,ad,sd;if(sd=Ra.input.charCodeAt(Ra.position),sd!==33)return!1;if(Ra.tag!==null&&throwError(Ra,"duplication of a tag property"),sd=Ra.input.charCodeAt(++Ra.position),sd===60?(td=!0,sd=Ra.input.charCodeAt(++Ra.position)):sd===33?(rd=!0,nd="!!",sd=Ra.input.charCodeAt(++Ra.position)):nd="!",qa=Ra.position,td){do sd=Ra.input.charCodeAt(++Ra.position);while(sd!==0&&sd!==62);Ra.position<Ra.length?(ad=Ra.input.slice(qa,Ra.position),sd=Ra.input.charCodeAt(++Ra.position)):throwError(Ra,"unexpected end of the stream within a verbatim tag")}else{for(;sd!==0&&!is_WS_OR_EOL(sd);)sd===33&&(rd?throwError(Ra,"tag suffix cannot contain exclamation marks"):(nd=Ra.input.slice(qa-1,Ra.position+1),PATTERN_TAG_HANDLE.test(nd)||throwError(Ra,"named tag handle cannot contain such characters"),rd=!0,qa=Ra.position+1)),sd=Ra.input.charCodeAt(++Ra.position);
` ),Ra.charCodeAt(0)===65279&&(Ra=Ra.slice(1)));var td=new State $ 1(Ra,qa),rd=Ra.indexOf(" \0 ");for(rd!==-1&&(td.position=rd,throwError(td,"null byte is not allowed in input")),td.input+=" \0 ";td.input.charCodeAt(td.position)===32;)td.lineIndent+=1,td.position+=1;for(;td.position<td.length-1;)readDocument(td);return td.documents}__name(loadDocuments,"loadDocuments");function loadAll $ 1(Ra,qa,td){qa!==null&&typeof qa=="object"&&typeof td>"u"&&(td=qa,qa=null);var rd=loadDocuments(Ra,td);if(typeof qa!="function")return rd;for(var nd=0,ad=rd.length;nd<ad;nd+=1)qa(rd[nd])}__name(loadAll $ 1,"loadAll $ 1");function load $ 1(Ra,qa){var td=loadDocuments(Ra,qa);if(td.length!==0){if(td.length===1)return td[0];throw new exception("expected a single document in the stream, but found more")}}__name(load $ 1,"load $ 1");var loadAll_1=loadAll $ 1,load_1=load $ 1,loader $ 1={loadAll:loadAll_1,load:load_1},_toString=Object.prototype.toString,_hasOwnProperty=Object.prototype.hasOwnProperty,CHAR_BOM=65279,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_CARRIAGE_RETURN=13,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]=" \\ 0";ESCAPE_SEQUENCES[7]=" \\ a";ESCAPE_SEQUENCES[8]=" \\ b";ESCAPE_SEQUENCES[9]=" \\ t";ESCAPE_SEQUENCES[10]=" \\ n";ESCAPE_SEQUENCES[11]=" \\ v";ESCAPE_SEQUENCES[12]=" \\ f";ESCAPE_SEQUENCES[13]=" \\ r";ESCAPE_SEQUENCES[27]=" \\ e";ESCAPE_SEQUENCES[34]=' \\ "';ESCAPE_SEQUENCES[92]=" \\ \\ ";ESCAPE_SEQUENCES[133]=" \\ N";ESCAPE_SEQUENCES[160]=" \\ _";ESCAPE_SEQUENCES[8232]=" \\ L";ESCAPE_SEQUENCES[8233]=" \\ P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],DEPRECATED_BASE60_SYNTAX=/^[-+]?[0-9_]+(?::[0-9_]+)+(?: \. [0-9_]*)? $ /;function compileStyleMap(Ra,qa){var td,rd,nd,ad,sd,ud,cd;if(qa===null)return{};for(td={},rd=Object.keys(qa),nd=0,ad=rd.length;nd<ad;nd+=1)sd=rd[nd],ud=String(qa[sd]),sd.slice(0,2)==="!!"&&(sd="tag:yaml.org,2002:"+sd.slice(2)),cd=Ra.compiledTypeMap.fallback[sd],cd&&_hasOwnProperty.call(cd.styleAliases,ud)&&(ud=cd.styleAliases[ud]),td[sd]=ud;return td}__name(compileStyleMap,"compileStyleMap");function encodeHex(Ra){var qa,td,rd;if(qa=Ra.toString(16).toUpperCase(),Ra<=255)td="x",rd=2;else if(Ra<=65535)td="u",rd=4;else if(Ra<=4294967295)td="U",rd=8;else throw new exception("code point within a string may not be greater than 0xFFFFFFFF");return" \\ "+td+common.repeat("0",rd-qa.length)+qa}__name(encodeHex,"encodeHex");var QUOTING_TYPE_SINGLE=1,QUOTING_TYPE_DOUBLE=2;function State(Ra){this.schema=Ra.schema||_default,this.indent=Math.max(1,Ra.indent||2),this.noArrayIndent=Ra.noArrayIndent||!1,this.skipInvalid=Ra.skipInvalid||!1,this.flowLevel=common.isNothing(Ra.flowLevel)?-1:Ra.flowLevel,this.styleMap=compileStyleMap(this.schema,Ra.styles||null),this.sortKeys=Ra.sortKeys||!1,this.lineWidth=Ra.lineWidth||80,this.noRefs=Ra.noRefs||!1,this.noCompatMode=Ra.noCompatMode||!1,this.condenseFlow=Ra.condenseFlow||!1,this.quotingType=Ra.quotingType==='"'?QUOTING_TYPE_DOUBLE:QUOTING_TYPE_SINGLE,this.forceQuotes=Ra.forceQuotes||!1,this.replacer=typeof Ra.replacer=="function"?Ra.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}__name(State,"State");function indentString(Ra,qa){for(var td=common.repeat(" ",qa),rd=0,nd=-1,ad="",sd,ud=Ra.length;rd<ud;)nd=Ra.indexOf( `
` ,rd),nd===-1?(sd=Ra.slice(rd),rd=ud):(sd=Ra.slice(rd,nd+1),rd=nd+1),sd.length&&sd!== `
` &&(ad+=td),ad+=sd;return ad}__name(indentString,"indentString");function generateNextLine(Ra,qa){return `
` +common.repeat(" ",Ra.indent*qa)}__name(generateNextLine,"generateNextLine");function testImplicitResolving(Ra,qa){var td,rd,nd;for(td=0,rd=Ra.implicitTypes.length;td<rd;td+=1)if(nd=Ra.implicitTypes[td],nd.resolve(qa))return!0;return!1}__name(testImplicitResolving,"testImplicitResolving");function isWhitespace(Ra){return Ra===CHAR_SPACE||Ra===CHAR_TAB}__name(isWhitespace,"isWhitespace");function isPrintable(Ra){return 32<=Ra&&Ra<=126||161<=Ra&&Ra<=55295&&Ra!==8232&&Ra!==8233||57344<=Ra&&Ra<=65533&&Ra!==CHAR_BOM||65536<=Ra&&Ra<=1114111}__name(isPrintable,"isPrintable");function isNsCharOrWhitespace(Ra){return isPrintable(Ra)&&Ra!==CHAR_BOM&&Ra!==CHAR_CARRIAGE_RETURN&&Ra!==CHAR_LINE_FEED}__name(isNsCharOrWhitespace,"isNsCharOrWhitespace");function isPlainSafe(Ra,qa,td){var rd=isNsCharOrWhitespace(Ra),nd=rd&&!isWhitespace(Ra);return(td?rd:rd&&Ra!==CHAR_COMMA&&Ra!==CHAR_LEFT_SQUARE_BRACKET&&Ra!==CHAR_RIGHT_SQUARE_BRACKET&&Ra!==CHAR_LEFT_CURLY_BRACKET&&Ra!==CHAR_RIGHT_CURLY_BRACKET)&&Ra!==CHAR_SHARP&&!(qa===CHAR_COLON&&!nd)||isNsCharOrWhitespace(qa)&&!isWhitespace(qa)&&Ra===CHAR_SHARP||qa===CHAR_COLON&&nd}__name(isPlainSafe,"isPlainSafe");function isPlainSafeFirst(Ra){return isPrintable(Ra)&&Ra!==CHAR_BOM&&!isWhitespace(Ra)&&Ra!==CHAR_MINUS&&Ra!==CHAR_QUESTION&&Ra!==CHAR_COLON&&Ra!==CHAR_COMMA&&Ra!==CHAR_LEFT_SQUARE_BRACKET&&Ra!==CHAR_RIGHT_SQUARE_BRACKET&&Ra!==CHAR_LEFT_CURLY_BRACKET&&Ra!==CHAR_RIGHT_CURLY_BRACKET&&Ra!==CHAR_SHARP&&Ra!==CHAR_AMPERSAND&&Ra!==CHAR_ASTERISK&&Ra!==CHAR_EXCLAMATION&&Ra!==CHAR_VERTICAL_LINE&&Ra!==CHAR_EQUALS&&Ra!==CHAR_GREATER_THAN&&Ra!==CHAR_SINGLE_QUOTE&&Ra!==CHAR_DOUBLE_QUOTE&&Ra!==CHAR_PERCENT&&Ra!==CHAR_COMMERCIAL_AT&&Ra!==CHAR_GRAVE_ACCENT}__name(isPlainSafeFirst,"isPlainSafeFirst");function isPlainSafeLast(Ra){return!isWhitespace(Ra)&&Ra!==CHAR_COLON}__name(isPlainSafeLast,"isPlainSafeLast");function codePointAt(Ra,qa){var td=Ra.charCodeAt(qa),rd;return td>=55296&&td<=56319&&qa+1<Ra.length&&(rd=Ra.charCodeAt(qa+1),rd>=56320&&rd<=57343)?(td-55296)*1024+rd-56320+65536:td}__name(codePointAt,"codePointAt");function needIndentIndicator(Ra){var qa=/^ \n * /;return qa.test(Ra)}__name(needIndentIndicator,"needIndentIndicator");var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(Ra,qa,td,rd,nd,ad,sd,ud){var cd,dd=0,pd=null,fd=!1,Td=!1,Sd=rd!==-1,Ad=-1,Nd=isPlainSafeFirst(codePointAt(Ra,0))&&isPlainSafeLast(codePointAt(Ra,Ra.length-1));if(qa||sd)for(cd=0;cd<Ra.length;dd>=65536?cd+=2:cd++){if(dd=codePointAt(Ra,cd),!isPrintable(dd))return STYLE_DOUBLE;Nd=Nd&&isPlainSafe(dd,pd,ud),pd=dd}else{for(cd=0;cd<Ra.length;dd>=65536?cd+=2:cd++){if(dd=codePointAt(Ra,cd),dd===CHAR_LINE_FEED)fd=!0,Sd&&(Td=Td||cd-Ad-1>rd&&Ra[Ad+1]!==" ",Ad=cd);else if(!isPrintable(dd))return STYLE_DOUBLE;Nd=Nd&&isPlainSafe(dd,pd,ud),pd=dd}Td=Td||Sd&&cd-Ad-1>rd&&Ra[Ad+1]!==" "}return!fd&&!Td?Nd&&!sd&&!nd(Ra)?STYLE_PLAIN:ad===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:td>9&&needIndentIndicator(Ra)?STYLE_DOUBLE:sd?ad===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:Td?STYLE_FOLDED:STYLE_LITERAL}__name(chooseScalarStyle,"chooseScalarStyle");function writeScalar(Ra,qa,td,rd,nd){Ra.dump=function(){if(qa.length===0)return Ra.quotingType===QUOTING_TYPE_DOUBLE?'""':"''";if(!Ra.noCompatMode&&(DEPRECATED_BOOLEANS_SYNTAX.indexOf(qa)!==-1||DEPRECATED_BASE60_SYNTAX.test(qa)))return Ra.quotingType===QUOTING_TYPE_DOUBLE?'"'+qa+'"':"'"+qa+"'";var ad=Ra.indent*Math.max(1,td),sd=Ra.lineWidth===-1?-1:Math.max(Math.min(Ra.lineWidth,40),Ra.lineWidth-ad),ud=rd||Ra.flowLevel>-1&&td>=Ra.flowLevel;function cd(dd){return testImplicitResolving(Ra,dd)}switch(__name(cd,"testAmbiguity"),chooseScalarStyle(qa,ud,Ra.indent,sd,cd,Ra.quotingType,Ra.forceQuotes&&!rd,nd)){case STYLE_PLAIN:return qa;case STYLE_SINGLE:return"'"+qa.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(qa,Ra.indent)+dropEndingNewline(indentString(qa,ad));case STYLE_FOLDED:return">"+blockHeader(qa,Ra.indent)+dropEndingNewline(indentString(foldString(qa,sd),ad));case STYLE_DOUBLE:return'"'+escapeString(qa)+'"';default:throw new
` ,nd=rd&&(Ra[Ra.length-2]=== `
` ||Ra=== `
` ),ad=nd?"+":rd?"":"-";return td+ad+ `
` }__name(blockHeader,"blockHeader");function dropEndingNewline(Ra){return Ra[Ra.length-1]=== `
` ?Ra.slice(0,-1):Ra}__name(dropEndingNewline,"dropEndingNewline");function foldString(Ra,qa){for(var td=/( \n +)([^ \n ]*)/g,rd=function(){var dd=Ra.indexOf( `
` );return dd=dd!==-1?dd:Ra.length,td.lastIndex=dd,foldLine(Ra.slice(0,dd),qa)}(),nd=Ra[0]=== `
` ||Ra[0]===" ",ad,sd;sd=td.exec(Ra);){var ud=sd[1],cd=sd[2];ad=cd[0]===" ",rd+=ud+(!nd&&!ad&&cd!==""? `
` :"")+foldLine(cd,qa),nd=ad}return rd}__name(foldString,"foldString");function foldLine(Ra,qa){if(Ra===""||Ra[0]===" ")return Ra;for(var td=/ [^ ]/g,rd,nd=0,ad,sd=0,ud=0,cd="";rd=td.exec(Ra);)ud=rd.index,ud-nd>qa&&(ad=sd>nd?sd:ud,cd+= `
` +Ra.slice(nd,ad),nd=ad+1),sd=ud;return cd+= `
` ,Ra.length-nd>qa&&sd>nd?cd+=Ra.slice(nd,sd)+ `
` +Ra.slice(sd+1):cd+=Ra.slice(nd),cd.slice(1)}__name(foldLine,"foldLine");function escapeString(Ra){for(var qa="",td=0,rd,nd=0;nd<Ra.length;td>=65536?nd+=2:nd++)td=codePointAt(Ra,nd),rd=ESCAPE_SEQUENCES[td],!rd&&isPrintable(td)?(qa+=Ra[nd],td>=65536&&(qa+=Ra[nd+1])):qa+=rd||encodeHex(td);return qa}__name(escapeString,"escapeString");function writeFlowSequence(Ra,qa,td){var rd="",nd=Ra.tag,ad,sd,ud;for(ad=0,sd=td.length;ad<sd;ad+=1)ud=td[ad],Ra.replacer&&(ud=Ra.replacer.call(td,String(ad),ud)),(writeNode(Ra,qa,ud,!1,!1)||typeof ud>"u"&&writeNode(Ra,qa,null,!1,!1))&&(rd!==""&&(rd+=","+(Ra.condenseFlow?"":" ")),rd+=Ra.dump);Ra.tag=nd,Ra.dump="["+rd+"]"}__name(writeFlowSequence,"writeFlowSequence");function writeBlockSequence(Ra,qa,td,rd){var nd="",ad=Ra.tag,sd,ud,cd;for(sd=0,ud=td.length;sd<ud;sd+=1)cd=td[sd],Ra.replacer&&(cd=Ra.replacer.call(td,String(sd),cd)),(writeNode(Ra,qa+1,cd,!0,!0,!1,!0)||typeof cd>"u"&&writeNode(Ra,qa+1,null,!0,!0,!1,!0))&&((!rd||nd!=="")&&(nd+=generateNextLine(Ra,qa)),Ra.dump&&CHAR_LINE_FEED===Ra.dump.charCodeAt(0)?nd+="-":nd+="- ",nd+=Ra.dump);Ra.tag=ad,Ra.dump=nd||"[]"}__name(writeBlockSequence,"writeBlockSequence");function writeFlowMapping(Ra,qa,td){var rd="",nd=Ra.tag,ad=Object.keys(td),sd,ud,cd,dd,pd;for(sd=0,ud=ad.length;sd<ud;sd+=1)pd="",rd!==""&&(pd+=", "),Ra.condenseFlow&&(pd+='"'),cd=ad[sd],dd=td[cd],Ra.replacer&&(dd=Ra.replacer.call(td,cd,dd)),writeNode(Ra,qa,cd,!1,!1)&&(Ra.dump.length>1024&&(pd+="? "),pd+=Ra.dump+(Ra.condenseFlow?'"':"")+":"+(Ra.condenseFlow?"":" "),writeNode(Ra,qa,dd,!1,!1)&&(pd+=Ra.dump,rd+=pd));Ra.tag=nd,Ra.dump="{"+rd+"}"}__name(writeFlowMapping,"writeFlowMapping");function writeBlockMapping(Ra,qa,td,rd){var nd="",ad=Ra.tag,sd=Object.keys(td),ud,cd,dd,pd,fd,Td;if(Ra.sortKeys===!0)sd.sort();else if(typeof Ra.sortKeys=="function")sd.sort(Ra.sortKeys);else if(Ra.sortKeys)throw new exception("sortKeys must be a boolean or a function");for(ud=0,cd=sd.length;ud<cd;ud+=1)Td="",(!rd||nd!=="")&&(Td+=generateNextLine(Ra,qa)),dd=sd[ud],pd=td[dd],Ra.replacer&&(pd=Ra.replacer.call(td,dd,pd)),writeNode(Ra,qa+1,dd,!0,!0,!0)&&(fd=Ra.tag!==null&&Ra.tag!=="?"||Ra.dump&&Ra.dump.length>1024,fd&&(Ra.dump&&CHAR_LINE_FEED===Ra.dump.charCodeAt(0)?Td+="?":Td+="? "),Td+=Ra.dump,fd&&(Td+=generateNextLine(Ra,qa)),writeNode(Ra,qa+1,pd,!0,fd)&&(Ra.dump&&CHAR_LINE_FEED===Ra.dump.charCodeAt(0)?Td+=":":Td+=": ",Td+=Ra.dump,nd+=Td));Ra.tag=ad,Ra.dump=nd||"{}"}__name(writeBlockMapping,"writeBlockMapping");function detectType(Ra,qa,td){var rd,nd,ad,sd,ud,cd;for(nd=td?Ra.explicitTypes:Ra.implicitTypes,ad=0,sd=nd.length;ad<sd;ad+=1)if(ud=nd[ad],(ud.instanceOf||ud.predicate)&&(!ud.instanceOf||typeof qa=="object"&&qa instanceof ud.instanceOf)&&(!ud.predicate||ud.predicate(qa))){if(td?ud.multi&&ud.representName?Ra.tag=ud.representName(qa):Ra.tag=ud.tag:Ra.tag="?",ud.represent){if(cd=Ra.styleMap[ud.tag]||ud.defaultStyle,_toString.call(ud.represent)==="[object Function]")rd=ud.represent(qa,cd);else if(_hasOwnProperty.call(ud.represent,cd))rd=ud.represent[cd](qa,cd);else throw new exception("!<"+ud.tag+'> tag resolver accepts not "'+cd+'" style');Ra.dump=rd}return!0}return!1}__name(detectType,"detectType");function writeNode(Ra,qa,td,rd,nd,ad,sd){Ra.tag=null,Ra.dump=td,detectType(Ra,td,!1)||detectType(Ra,td,!0);var ud=_toString.call(Ra.dump),cd=rd,dd;rd&&(rd=Ra.flowLevel<0||Ra.flowLevel>qa);var pd=ud==="[object Object]"||ud==="[object Array]",fd,Td;if(pd&&(fd=Ra.duplicates.indexOf(td),Td=fd!==-1),(Ra.tag!==null&&Ra.tag!=="?"||Td||Ra.indent!==2&&qa>0)&&(nd=!1),Td&&Ra.usedDuplicates[fd])Ra.dump="*ref_"+fd;else{if(pd&&Td&&!Ra.usedDuplicates[fd]&&(Ra.usedDuplicates[fd]=!0),ud==="[object Object]")rd&&Object.keys(Ra.dump).length!==0?(writeBlockMapping(Ra,qa,Ra.dump,nd),Td&&(Ra.dump="&ref_"+fd+Ra.dump)):(writeFlowMapping(Ra,qa,Ra.dump),Td&&(Ra.dump="&ref_"+fd+" "+Ra.dump));else if(ud==="[object Array]")rd&&Ra.dump.length!==0?(Ra.noArrayIndent&&!sd&&qa>0?writeBlockSequence(Ra,qa-1,Ra.dump,nd):writeBlockSequence(Ra,qa,Ra.dump,nd),Td&&(Ra.dump="&ref_"+fd+Ra.dump)):(writeFlowSequence(Ra,qa,Ra.dump),Td&&(Ra.dump="&ref
` :""}__name(dump $ 1,"dump $ 1");function renamed(Ra,qa){return function(){throw new Error("Function yaml."+Ra+" is removed in js-yaml 4. Use yaml."+qa+" instead, which is now safe by default.")}}__name(renamed,"renamed");var JSON_SCHEMA=json,load=loader $ 1.load;/*! Bundled license information:
js - yaml / dist / js - yaml . mjs :
( * ! js - yaml 4.1 . 0 https : //github.com/nodeca/js-yaml @license MIT *)
* /const defaultIconDimensions=Object.freeze({left:0,top:0,width:16,height:16}),defaultIconTransformations=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),defaultIconProps=Object.freeze({...defaultIconDimensions,...defaultIconTransformations}),defaultExtendedIconProps=Object.freeze({...defaultIconProps,body:"",hidden:!1}),defaultIconSizeCustomisations=Object.freeze({width:null,height:null}),defaultIconCustomisations=Object.freeze({...defaultIconSizeCustomisations,...defaultIconTransformations}),matchIconName=/ ^ [ a - z0 - 9 ] + ( - [ a - z0 - 9 ] + ) * $ / , stringToIcon = ( Ra , qa , td , rd = "" ) => { const nd = Ra . split ( ":" ) ; if ( Ra . slice ( 0 , 1 ) === "@" ) { if ( nd . length < 2 || nd . length > 3 ) return null ; rd = nd . shift ( ) . slice ( 1 ) } if ( nd . length > 3 || ! nd . length ) return null ; if ( nd . length > 1 ) { const ud = nd . pop ( ) , cd = nd . pop ( ) , dd = { provider : nd . length > 0 ? nd [ 0 ] : rd , prefix : cd , name : ud } ; return validateIconName ( dd ) ? dd : null } const ad = nd [ 0 ] , sd = ad . split ( "-" ) ; if ( sd . length > 1 ) { const ud = { provider : rd , prefix : sd . shift ( ) , name : sd . join ( "-" ) } ; return validateIconName ( ud ) ? ud : null } if ( td && rd === "" ) { const ud = { provider : rd , prefix : "" , name : ad } ; return validateIconName ( ud , td ) ? ud : null } return null } , validateIconName = ( Ra , qa ) => Ra ? ! ! ( ( Ra . provider === "" || Ra . provider . match ( matchIconName ) ) && ( qa && Ra . prefix === "" || Ra . prefix . match ( matchIconName ) ) && Ra . name . match ( matchIconName ) ) : ! 1 ; function mergeIconTransformations ( Ra , qa ) { const td = { } ; ! Ra . hFlip != ! qa . hFlip && ( td . hFlip = ! 0 ) , ! Ra . vFlip != ! qa . vFlip && ( td . vFlip = ! 0 ) ; const rd = ( ( Ra . rotate || 0 ) + ( qa . rotate || 0 ) ) % 4 ; return rd && ( td . rotate = rd ) , td } function mergeIconData ( Ra , qa ) { const td = mergeIconTransformations ( Ra , qa ) ; for ( const rd in defaultExtendedIconProps ) rd in defaultIconTransformations ? rd in Ra && ! ( rd in td ) && ( td [ rd ] = defaultIconTransformations [ rd ] ) : rd in qa ? td [ rd ] = qa [ rd ] : rd in Ra && ( td [ rd ] = Ra [ rd ] ) ; return td } function getIconsTree ( Ra , qa ) { const td = Ra . icons , rd = Ra . aliases || Object . create ( null ) , nd = Object . create ( null ) ; function ad ( sd ) { if ( td [ sd ] ) return nd [ sd ] = [ ] ; if ( ! ( sd in nd ) ) { nd [ sd ] = null ; const ud = rd [ sd ] && rd [ sd ] . parent , cd = ud && ad ( ud ) ; cd && ( nd [ sd ] = [ ud ] . concat ( cd ) ) } return nd [ sd ] } return ( qa || Object . keys ( td ) . concat ( Object . keys ( rd ) ) ) . forEach ( ad ) , nd } function internalGetIconData ( Ra , qa , td ) { const rd = Ra . icons , nd = Ra . aliases || Object . create ( null ) ; let ad = { } ; function sd ( ud ) { ad = mergeIconData ( rd [ ud ] || nd [ ud ] , ad ) } return sd ( qa ) , td . forEach ( sd ) , mergeIconData ( Ra , ad ) } function getIconData ( Ra , qa ) { if ( Ra . icons [ qa ] ) return internalGetIconData ( Ra , qa , [ ] ) ; const td = getIconsTree ( Ra , [ qa ] ) [ qa ] ; return td ? internalGetIconData ( Ra , qa , td ) : null } const unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g , unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g ; function calculateSize ( Ra , qa , td ) { if ( qa === 1 ) return Ra ; if ( td = td || 100 , typeof Ra == "number" ) return Math . ceil ( Ra * qa * td ) / td ; if ( typeof Ra != "string" ) return Ra ; const rd = Ra . split ( unitsSplit ) ; if ( rd === null || ! rd . length ) return Ra ; const nd = [ ] ; let ad = rd . shift ( ) , sd = unitsTest . test ( ad ) ; for ( ; ; ) { if ( sd ) { const ud = parseFloat ( ad ) ; isNaN ( ud ) ? nd . push ( ad ) : nd . push ( Math . ceil ( ud * qa * td ) / td ) } else nd . push ( ad ) ; if ( ad = rd . shift ( ) , ad === void 0 ) return nd . join ( "" ) ; sd = ! sd } } function splitSVGDefs ( Ra , qa = "defs" ) { let td = "" ; const rd = Ra . indexOf ( "<" + qa ) ; for ( ; rd >= 0 ; ) { const nd = Ra . indexOf ( ">" , rd ) , ad = Ra . indexOf ( "</" + qa ) ; if ( nd === - 1 || ad === - 1 ) break ; const sd = Ra . indexOf ( ">" , ad ) ; if ( sd === - 1 ) break ; td += Ra . slice ( nd + 1 , ad ) . trim ( ) , Ra = Ra . slice ( 0 , rd ) . trim ( ) + Ra . slice ( sd + 1 ) } return { defs : td , content : Ra } } function mergeDefsAndContent ( Ra , qa ) { return Ra ? "<defs>" + Ra + "</defs>" + qa : qa } function wrapSVGContent ( Ra , qa , td ) { const rd = splitSVGDefs ( Ra ) ; return mergeDefsAndContent ( rd . defs , qa + rd . content + td ) } const isUnsetKeyword = Ra => Ra === "unset" || Ra === "undefined" || Ra === "none" ; function iconToSVG ( Ra , qa ) { const td = { ... defaultIconProps , ... Ra } , rd = { ... defaultIconCustomisations , ... qa } , nd = { left : td . left , top : td . top , width : td . width , height : td . height } ; let ad = td . body ; [ td , rd ] . forEach ( Nd => { const Ld = [ ] , Rd = Nd . hFlip , Od = Nd . vFlip ; let kd = Nd . rotate ; Rd ? Od ? kd += 2 : ( Ld . push ( "translate(" + ( nd . width + nd . left ) . toString ( ) + " " + ( 0 - nd . top ) . toString ( ) + ")" ) , Ld . push ( "scale(-1 1)" ) , nd . top = nd . left = 0 ) : Od && ( Ld . push ( "translate(" + ( 0 - nd . left ) . toString ( ) + " " + ( nd . height + nd . top ) . toString ( ) + ")" ) , Ld . push ( "scale(1 -1)" ) , nd . top = nd . left = 0 ) ; let Fd ; switch ( kd < 0 && ( kd -= Math . floor ( kd / 4 ) * 4 ) , kd = kd % 4 , kd ) { case 1
` ,"ig");Ra=Ra.trim().replace(nd,"").replace(/'/gm,'"'),log $ 1.debug( ` Detecting diagram directive$ { qa !== null ? " type:" + qa : "" } based on the text : $ { Ra } ` );let ad;const sd=[];for(;(ad=directiveRegex.exec(Ra))!==null;)if(ad.index===directiveRegex.lastIndex&&directiveRegex.lastIndex++,ad&&!qa||qa&&((td=ad[1])!=null&&td.match(qa))||qa&&((rd=ad[2])!=null&&rd.match(qa))){const ud=ad[1]?ad[1]:ad[2],cd=ad[3]?ad[3].trim():ad[4]?JSON.parse(ad[4].trim()):null;sd.push({type:ud,args:cd})}return sd.length===0?{type:Ra,args:null}:sd.length===1?sd[0]:sd}catch(nd){return log $ 1.error( ` ERROR : $ { nd . message } - Unable to parse directive type : '${qa}' based on the text : '${Ra}' ` ),{type:void 0,args:null}}},"detectDirective"),removeDirectives=__name(function(Ra){return Ra.replace(directiveRegex,"")},"removeDirectives"),isSubstringInArray=__name(function(Ra,qa){for(const[td,rd]of qa.entries())if(rd.match(Ra))return td;return-1},"isSubstringInArray");function interpolateToCurve(Ra,qa){if(!Ra)return qa;const td= ` curve$ { Ra . charAt ( 0 ) . toUpperCase ( ) + Ra . slice ( 1 ) } ` ;return d3CurveTypes[td]??qa}__name(interpolateToCurve,"interpolateToCurve");function formatUrl(Ra,qa){const td=Ra.trim();if(td)return qa.securityLevel!=="loose"?sanitizeUrl_1(td):td}__name(formatUrl,"formatUrl");var runFunc=__name((Ra,...qa)=>{const td=Ra.split("."),rd=td.length-1,nd=td[rd];let ad=window;for(let sd=0;sd<rd;sd++)if(ad=ad[td[sd]],!ad){log $ 1.error( ` Function name : $ { Ra } not found in window ` );return}ad[nd](...qa)},"runFunc");function distance(Ra,qa){return!Ra||!qa?0:Math.sqrt(Math.pow(qa.x-Ra.x,2)+Math.pow(qa.y-Ra.y,2))}__name(distance,"distance");function traverseEdge(Ra){let qa,td=0;Ra.forEach(nd=>{td+=distance(nd,qa),qa=nd});const rd=td/2;return calculatePoint(Ra,rd)}__name(traverseEdge,"traverseEdge");function calcLabelPosition(Ra){return Ra.length===1?Ra[0]:traverseEdge(Ra)}__name(calcLabelPosition,"calcLabelPosition");var roundNumber=__name((Ra,qa=2)=>{const td=Math.pow(10,qa);return Math.round(Ra*td)/td},"roundNumber"),calculatePoint=__name((Ra,qa)=>{let td,rd=qa;for(const nd of Ra){if(td){const ad=distance(nd,td);if(ad<rd)rd-=ad;else{const sd=rd/ad;if(sd<=0)return td;if(sd>=1)return{x:nd.x,y:nd.y};if(sd>0&&sd<1)return{x:roundNumber((1-sd)*td.x+sd*nd.x,5),y:roundNumber((1-sd)*td.y+sd*nd.y,5)}}}td=nd}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),calcCardinalityPosition=__name((Ra,qa,td)=>{log $ 1.info( ` our points $ { JSON . stringify ( qa ) } ` ),qa[0]!==td&&(qa=qa.reverse());const nd=calculatePoint(qa,25),ad=Ra?10:5,sd=Math.atan2(qa[0].y-nd.y,qa[0].x-nd.x),ud={x:0,y:0};return ud.x=Math.sin(sd)*ad+(qa[0].x+nd.x)/2,ud.y=-Math.cos(sd)*ad+(qa[0].y+nd.y)/2,ud},"calcCardinalityPosition");function calcTerminalLabelPosition(Ra,qa,td){const rd=structuredClone(td);log $ 1.info("our points",rd),qa!=="start_left"&&qa!=="start_right"&&rd.reverse();const nd=25+Ra,ad=calculatePoint(rd,nd),sd=10+Ra*.5,ud=Math.atan2(rd[0].y-ad.y,rd[0].x-ad.x),cd={x:0,y:0};return qa==="start_left"?(cd.x=Math.sin(ud+Math.PI)*sd+(rd[0].x+ad.x)/2,cd.y=-Math.cos(ud+Math.PI)*sd+(rd[0].y+ad.y)/2):qa==="end_right"?(cd.x=Math.sin(ud-Math.PI)*sd+(rd[0].x+ad.x)/2-5,cd.y=-Math.cos(ud-Math.PI)*sd+(rd[0].y+ad.y)/2-5):qa==="end_left"?(cd.x=Math.sin(ud)*sd+(rd[0].x+ad.x)/2-5,cd.y=-Math.cos(ud)*sd+(rd[0].y+ad.y)/2-5):(cd.x=Math.sin(ud)*sd+(rd[0].x+ad.x)/2,cd.y=-Math.cos(ud)*sd+(rd[0].y+ad.y)/2),cd}__name(calcTerminalLabelPosition,"calcTerminalLabelPosition");function getStylesFromArray(Ra){let qa="",td="";for(const rd of Ra)rd!==void 0&&(rd.startsWith("color:")||rd.startsWith("text-align:")?td=td+rd+";":qa=qa+rd+";");return{style:qa,labelStyle:td}}__name(getStylesFromArray,"getStylesFromArray");var cnt=0,generateId=__name(()=>(cnt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+cnt),"generateId");function makeRandomHex(Ra){let qa="";const td="0123456789abcdef",rd=td.length;for(let nd=0;nd<Ra;nd++)qa+=td.charAt(Math.floor(Math.random()*rd));return qa}__name(makeRandomHex,"makeRandomHex");var random=__name(Ra=>makeRandomHex(Ra.length),"random"),getTextObj=__name(function(){return{x:0,y:0,fill:vo
2024-09-25 14:23:53 +08:00
` ).map(nd=>{const ad=nd.match(/^ \s +/);if(ad===null)return nd;const[sd]=ad;return sd.length>=rd.length?nd.slice(rd.length):nd}).join( `
` )}class _Tokenizer{constructor(qa){Qm(this,"options");Qm(this,"rules");Qm(this,"lexer");this.options=qa||_defaults}space(qa){const td=this.rules.block.newline.exec(qa);if(td&&td[0].length>0)return{type:"space",raw:td[0]}}code(qa){const td=this.rules.block.code.exec(qa);if(td){const rd=td[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:td[0],codeBlockStyle:"indented",text:this.options.pedantic?rd:rtrim(rd, `
` )}}}fences(qa){const td=this.rules.block.fences.exec(qa);if(td){const rd=td[0],nd=indentCodeCompensation(rd,td[3]||"");return{type:"code",raw:rd,lang:td[2]?td[2].trim().replace(this.rules.inline.anyPunctuation," $ 1"):td[2],text:nd}}}heading(qa){const td=this.rules.block.heading.exec(qa);if(td){let rd=td[2].trim();if(/# $ /.test(rd)){const nd=rtrim(rd,"#");(this.options.pedantic||!nd||/ $ /.test(nd))&&(rd=nd.trim())}return{type:"heading",raw:td[0],depth:td[1].length,text:rd,tokens:this.lexer.inline(rd)}}}hr(qa){const td=this.rules.block.hr.exec(qa);if(td)return{type:"hr",raw:rtrim(td[0], `
` )}}blockquote(qa){const td=this.rules.block.blockquote.exec(qa);if(td){let rd=rtrim(td[0], `
2024-09-18 09:46:23 +08:00
` ).split( `
2024-09-25 14:23:53 +08:00
` ),nd="",ad="";const sd=[];for(;rd.length>0;){let ud=!1;const cd=[];let dd;for(dd=0;dd<rd.length;dd++)if(/^ {0,3}>/.test(rd[dd]))cd.push(rd[dd]),ud=!0;else if(!ud)cd.push(rd[dd]);else break;rd=rd.slice(dd);const pd=cd.join( `
` ),fd=pd.replace(/ \n {0,3}((?:=+|-+) *)(?= \n | $ )/g, `
$1 ` ).replace(/^ {0,3}>[ \t ]?/gm,"");nd=nd? ` $ { nd }
$ { pd } ` :pd,ad=ad? ` $ { ad }
2024-11-27 11:30:55 +08:00
$ { fd } ` :fd;const Td=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(fd,sd,!0),this.lexer.state.top=Td,rd.length===0)break;const Sd=sd[sd.length-1];if((Sd==null?void 0:Sd.type)==="code")break;if((Sd==null?void 0:Sd.type)==="blockquote"){const Ad=Sd,Nd=Ad.raw+ `
2024-09-25 14:23:53 +08:00
` +rd.join( `
2024-11-27 11:30:55 +08:00
` ),Ld=this.blockquote(Nd);sd[sd.length-1]=Ld,nd=nd.substring(0,nd.length-Ad.raw.length)+Ld.raw,ad=ad.substring(0,ad.length-Ad.text.length)+Ld.text;break}else if((Sd==null?void 0:Sd.type)==="list"){const Ad=Sd,Nd=Ad.raw+ `
2024-09-25 14:23:53 +08:00
` +rd.join( `
2024-11-27 11:30:55 +08:00
` ),Ld=this.list(Nd);sd[sd.length-1]=Ld,nd=nd.substring(0,nd.length-Sd.raw.length)+Ld.raw,ad=ad.substring(0,ad.length-Ad.raw.length)+Ld.raw,rd=Nd.substring(sd[sd.length-1].raw.length).split( `
2024-09-25 14:23:53 +08:00
` );continue}}return{type:"blockquote",raw:nd,tokens:sd,text:ad}}}list(qa){let td=this.rules.block.list.exec(qa);if(td){let rd=td[1].trim();const nd=rd.length>1,ad={type:"list",raw:"",ordered:nd,start:nd?+rd.slice(0,-1):"",loose:!1,items:[]};rd=nd? ` \ \ d { 1 , 9 } \ \ $ { rd . slice ( - 1 ) } ` : ` \ \ $ { rd } ` ,this.options.pedantic&&(rd=nd?rd:"[*+-]");const sd=new RegExp( ` ^ ( { 0 , 3 } $ { rd } ) ( ( ? : [ ] [ ^ \ \ n ] * ) ? ( ? : \ \ n | $ ) ) ` );let ud=!1;for(;qa;){let cd=!1,dd="",pd="";if(!(td=sd.exec(qa))||this.rules.block.hr.test(qa))break;dd=td[0],qa=qa.substring(dd.length);let fd=td[2].split( `
` ,1)[0].replace(/^ \t +/,Rd=>" ".repeat(3*Rd.length)),Td=qa.split( `
2024-11-27 11:30:55 +08:00
` ,1)[0],Sd=!fd.trim(),Ad=0;if(this.options.pedantic?(Ad=2,pd=fd.trimStart()):Sd?Ad=td[1].length+1:(Ad=td[2].search(/[^ ]/),Ad=Ad>4?1:Ad,pd=fd.slice(Ad),Ad+=td[1].length),Sd&&/^ * $ /.test(Td)&&(dd+=Td+ `
` ,qa=qa.substring(Td.length+1),cd=!0),!cd){const Rd=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Ad - 1 ) } } ( ? : [ * + - ] | \ \ d { 1 , 9 } [ . ) ] ) ( ( ? : [ ] [ ^ \ \ n ] * ) ? ( ? : \ \ n | $ ) ) ` ),Od=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Ad - 1 ) } } ( ( ? : - * ) { 3 , } | ( ? : _ * ) { 3 , } | ( ? : \ \ * * ) { 3 , } ) ( ? : \ \ n + | $ ) ` ),kd=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Ad - 1 ) } } ( ? : \ ` \` \` |~~~) ` ) , Fd = new RegExp ( ` ^ {0, ${ Math . min ( 3 , Ad - 1 ) } }# ` ) ; for ( ; qa ; ) { const Ud = qa . split ( `
` ,1)[0];if(Td=Ud,this.options.pedantic&&(Td=Td.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),kd.test(Td)||Fd.test(Td)||Rd.test(Td)||Od.test(qa))break;if(Td.search(/[^ ]/)>=Ad||!Td.trim())pd+= `
` +Td.slice(Ad);else{if(Sd||fd.search(/[^ ]/)>=4||kd.test(fd)||Fd.test(fd)||Od.test(fd))break;pd+= `
` +Td}!Sd&&!Td.trim()&&(Sd=!0),dd+=Ud+ `
` ,qa=qa.substring(Ud.length+1),fd=Td.slice(Ad)}}ad.loose||(ud?ad.loose=!0:/ \n * \n * $ /.test(dd)&&(ud=!0));let Nd=null,Ld;this.options.gfm&&(Nd=/^ \[ [ xX] \] /.exec(pd),Nd&&(Ld=Nd[0]!=="[ ] ",pd=pd.replace(/^ \[ [ xX] \] +/,""))),ad.items.push({type:"list_item",raw:dd,task:!!Nd,checked:Ld,loose:!1,text:pd,tokens:[]}),ad.raw+=dd}ad.items[ad.items.length-1].raw=ad.items[ad.items.length-1].raw.trimEnd(),ad.items[ad.items.length-1].text=ad.items[ad.items.length-1].text.trimEnd(),ad.raw=ad.raw.trimEnd();for(let cd=0;cd<ad.items.length;cd++)if(this.lexer.state.top=!1,ad.items[cd].tokens=this.lexer.blockTokens(ad.items[cd].text,[]),!ad.loose){const dd=ad.items[cd].tokens.filter(fd=>fd.type==="space"),pd=dd.length>0&&dd.some(fd=>/ \n .* \n /.test(fd.raw));ad.loose=pd}if(ad.loose)for(let cd=0;cd<ad.items.length;cd++)ad.items[cd].loose=!0;return ad}}html(qa){const td=this.rules.block.html.exec(qa);if(td)return{type:"html",block:!0,raw:td[0],pre:td[1]==="pre"||td[1]==="script"||td[1]==="style",text:td[0]}}def(qa){const td=this.rules.block.def.exec(qa);if(td){const rd=td[1].toLowerCase().replace(/ \s +/g," "),nd=td[2]?td[2].replace(/^<(.*)> $ /," $ 1").replace(this.rules.inline.anyPunctuation," $ 1"):"",ad=td[3]?td[3].substring(1,td[3].length-1).replace(this.rules.inline.anyPunctuation," $ 1"):td[3];return{type:"def",tag:rd,raw:td[0],href:nd,title:ad}}}table(qa){const td=this.rules.block.table.exec(qa);if(!td||!/[:|]/.test(td[2]))return;const rd=splitCells(td[1]),nd=td[2].replace(/^ \| | \| * $ /g,"").split("|"),ad=td[3]&&td[3].trim()?td[3].replace(/ \n [ \t ]* $ /,"").split( `
2024-09-25 14:23:53 +08:00
` ):[],sd={type:"table",raw:td[0],header:[],align:[],rows:[]};if(rd.length===nd.length){for(const ud of nd)/^ *-+: * $ /.test(ud)?sd.align.push("right"):/^ *:-+: * $ /.test(ud)?sd.align.push("center"):/^ *:-+ * $ /.test(ud)?sd.align.push("left"):sd.align.push(null);for(let ud=0;ud<rd.length;ud++)sd.header.push({text:rd[ud],tokens:this.lexer.inline(rd[ud]),header:!0,align:sd.align[ud]});for(const ud of ad)sd.rows.push(splitCells(ud,sd.header.length).map((cd,dd)=>({text:cd,tokens:this.lexer.inline(cd),header:!1,align:sd.align[dd]})));return sd}}lheading(qa){const td=this.rules.block.lheading.exec(qa);if(td)return{type:"heading",raw:td[0],depth:td[2].charAt(0)==="="?1:2,text:td[1],tokens:this.lexer.inline(td[1])}}paragraph(qa){const td=this.rules.block.paragraph.exec(qa);if(td){const rd=td[1].charAt(td[1].length-1)=== `
2024-11-27 11:30:55 +08:00
` ?td[1].slice(0,-1):td[1];return{type:"paragraph",raw:td[0],text:rd,tokens:this.lexer.inline(rd)}}}text(qa){const td=this.rules.block.text.exec(qa);if(td)return{type:"text",raw:td[0],text:td[0],tokens:this.lexer.inline(td[0])}}escape(qa){const td=this.rules.inline.escape.exec(qa);if(td)return{type:"escape",raw:td[0],text:escape $ 1(td[1])}}tag(qa){const td=this.rules.inline.tag.exec(qa);if(td)return!this.lexer.state.inLink&&/^<a /i.test(td[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^< \/ a>/i.test(td[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)( \s |>)/i.test(td[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^< \/ (pre|code|kbd|script)( \s |>)/i.test(td[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:td[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:td[0]}}link(qa){const td=this.rules.inline.link.exec(qa);if(td){const rd=td[2].trim();if(!this.options.pedantic&&/^</.test(rd)){if(!/> $ /.test(rd))return;const sd=rtrim(rd.slice(0,-1)," \\ ");if((rd.length-sd.length)%2===0)return}else{const sd=findClosingBracket(td[2],"()");if(sd>-1){const cd=(td[0].indexOf("!")===0?5:4)+td[1].length+sd;td[2]=td[2].substring(0,sd),td[0]=td[0].substring(0,cd).trim(),td[3]=""}}let nd=td[2],ad="";if(this.options.pedantic){const sd=/^([^'"]*[^ \s ]) \s +(['"])(.*) \2 /.exec(nd);sd&&(nd=sd[1],ad=sd[3])}else ad=td[3]?td[3].slice(1,-1):"";return nd=nd.trim(),/^</.test(nd)&&(this.options.pedantic&&!/> $ /.test(rd)?nd=nd.slice(1):nd=nd.slice(1,-1)),outputLink(td,{href:nd&&nd.replace(this.rules.inline.anyPunctuation," $ 1"),title:ad&&ad.replace(this.rules.inline.anyPunctuation," $ 1")},td[0],this.lexer)}}reflink(qa,td){let rd;if((rd=this.rules.inline.reflink.exec(qa))||(rd=this.rules.inline.nolink.exec(qa))){const nd=(rd[2]||rd[1]).replace(/ \s +/g," "),ad=td[nd.toLowerCase()];if(!ad){const sd=rd[0].charAt(0);return{type:"text",raw:sd,text:sd}}return outputLink(rd,ad,rd[0],this.lexer)}}emStrong(qa,td,rd=""){let nd=this.rules.inline.emStrongLDelim.exec(qa);if(!nd||nd[3]&&rd.match(/[ \p {L} \p {N}]/u))return;if(!(nd[1]||nd[2]||"")||!rd||this.rules.inline.punctuation.exec(rd)){const sd=[...nd[0]].length-1;let ud,cd,dd=sd,pd=0;const fd=nd[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(fd.lastIndex=0,td=td.slice(-1*qa.length+sd);(nd=fd.exec(td))!=null;){if(ud=nd[1]||nd[2]||nd[3]||nd[4]||nd[5]||nd[6],!ud)continue;if(cd=[...ud].length,nd[3]||nd[4]){dd+=cd;continue}else if((nd[5]||nd[6])&&sd%3&&!((sd+cd)%3)){pd+=cd;continue}if(dd-=cd,dd>0)continue;cd=Math.min(cd,cd+dd+pd);const Td=[...nd[0]][0].length,Sd=qa.slice(0,sd+nd.index+Td+cd);if(Math.min(sd,cd)%2){const Nd=Sd.slice(1,-1);return{type:"em",raw:Sd,text:Nd,tokens:this.lexer.inlineTokens(Nd)}}const Ad=Sd.slice(2,-2);return{type:"strong",raw:Sd,text:Ad,tokens:this.lexer.inlineTokens(Ad)}}}}codespan(qa){const td=this.rules.inline.code.exec(qa);if(td){let rd=td[2].replace(/ \n /g," ");const nd=/[^ ]/.test(rd),ad=/^ /.test(rd)&&/ $ /.test(rd);return nd&&ad&&(rd=rd.substring(1,rd.length-1)),rd=escape $ 1(rd,!0),{type:"codespan",raw:td[0],text:rd}}}br(qa){const td=this.rules.inline.br.exec(qa);if(td)return{type:"br",raw:td[0]}}del(qa){const td=this.rules.inline.del.exec(qa);if(td)return{type:"del",raw:td[0],text:td[2],tokens:this.lexer.inlineTokens(td[2])}}autolink(qa){const td=this.rules.inline.autolink.exec(qa);if(td){let rd,nd;return td[2]==="@"?(rd=escape $ 1(td[1]),nd="mailto:"+rd):(rd=escape $ 1(td[1]),nd=rd),{type:"link",raw:td[0],text:rd,href:nd,tokens:[{type:"text",raw:rd,text:rd}]}}}url(qa){var rd;let td;if(td=this.rules.inline.url.exec(qa)){let nd,ad;if(td[2]==="@")nd=escape $ 1(td[0]),ad="mailto:"+nd;else{let sd;do sd=td[0],td[0]=((rd=this.rules.inline._backpedal.exec(td[0]))==null?void 0:rd[0])??"";while(sd!==td[0]);nd=escape $ 1(td[0]),td[1]==="www."?ad="http://"+td[0]:ad=td[0]}return{type:"link",raw:td[0],text:nd,href:ad,tokens:[{type:"text",raw:nd,text:nd}]}}}inlineText(qa){const td=this.rules.inline.text.exec(qa);if(td){let rd;return this.lexer.state.inRawBlock?rd=td[0]:rd=esca
2024-09-25 14:23:53 +08:00
] ` ).replace("lheading",lheading).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},escape $ 2=/^ \\ ([!"# $ %&'()*+, \- ./:;<=>?@ \[ \] \\ ^_ ` { | } ~ ] ) / , inlineCode = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/ , br = /^( {2,}|\\)\n(?!\s*$)/ , inlineText = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/ , _punctuation = "\\p{P}\\p{S}" , punctuation = edit ( /^((?![*_])[\spunctuation])/ , "u" ) . replace ( /punctuation/g , _punctuation ) . getRegex ( ) , blockSkip = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g , emStrongLDelim = edit ( /^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/ , "u" ) . replace ( /punct/g , _punctuation ) . getRegex ( ) , emStrongRDelimAst = edit ( "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])" , "gu" ) . replace ( /punct/g , _punctuation ) . getRegex ( ) , emStrongRDelimUnd = edit ( "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])" , "gu" ) . replace ( /punct/g , _punctuation ) . getRegex ( ) , anyPunctuation = edit ( /\\([punct])/ , "gu" ) . replace ( /punct/g , _punctuation ) . getRegex ( ) , autolink = edit ( /^<(scheme:[^\s\x00-\x1f<>]*|email)>/ ) . replace ( "scheme" , /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/ ) . replace ( "email" , /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/ ) . getRegex ( ) , _inlineComment = edit ( _comment ) . replace ( "(?:-->|$)" , "-->" ) . getRegex ( ) , tag = edit ( "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>" ) . replace ( "comment" , _inlineComment ) . replace ( "attribute" , /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/ ) . getRegex ( ) , _inlineLabel = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/ , link = edit ( /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/ ) . replace ( "label" , _inlineLabel ) . replace ( "href" , /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/ ) . replace ( "title" , /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/ ) . getRegex ( ) , reflink = edit ( /^!?\[(label)\]\[(ref)\]/ ) . replace ( "label" , _inlineLabel ) . replace ( "ref" , _blockLabel ) . getRegex ( ) , nolink = edit ( /^!?\[(ref)\](?:\[\])?/ ) . replace ( "ref" , _blockLabel ) . getRegex ( ) , reflinkSearch = edit ( "reflink|nolink(?!\\()" , "g" ) . replace ( "reflink" , reflink ) . replace ( "nolink" , nolink ) . getRegex ( ) , inlineNormal = { _backpedal : noopTest , anyPunctuation , autolink , blockSkip , br , code : inlineCode , del : noopTest , emStrongLDelim , emStrongRDelimAst , emStrongRDelimUnd , escape : escape$2 , link , nolink , punctuation , reflink , reflinkSearch , tag , text : inlineText , url : noopTest } , inlinePedantic = { ... inlineNormal , link : edit ( /^!?\[(label)\]\((.*?)\)/ ) . replace ( "label" , _inlineLabel ) . getRegex ( ) , reflink : edit ( /^!?\[(label)\]\s*\[([^\]]*)\]/ ) . replace ( "label" , _inlineLabel ) . getRegex ( ) } , inlineGfm = { ... inlineNormal , escape : edit ( escape$2 ) . replace ( "])" , "~|])" ) . getRegex ( ) , url : edit ( /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/ , "i" ) . replace ( "email" , /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/ ) . getRegex ( ) , _backpedal : /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/ , del : /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/ , text : /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ } , inlineBreaks = { ... inlineGfm , br : edit ( br ) . replace ( "{2,}" , "*" ) . getRegex ( ) , text : edit ( inlineGfm . text ) . replace ( "\\b_" , "\\b_| {2,}\\n" ) . replace ( /\{2,\}/g , "*" ) . getRegex ( ) } , block = { normal : blockNormal , gfm : blockGfm , pedantic : blockPedantic } , inline = { normal : inlineNormal , gfm : inlineGfm , breaks : inlineBreaks , pedantic : inlinePedantic } ; class _Lexer { constructor ( qa ) { Qm ( this , "
` ),this.blockTokens(qa,this.tokens);for(let td=0;td<this.inlineQueue.length;td++){const rd=this.inlineQueue[td];this.inlineTokens(rd.src,rd.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(qa,td=[],rd=!1){this.options.pedantic?qa=qa.replace(/ \t /g," ").replace(/^ + $ /gm,""):qa=qa.replace(/^( *)( \t +)/gm,(ud,cd,dd)=>cd+" ".repeat(dd.length));let nd,ad,sd;for(;qa;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(ud=>(nd=ud.call({lexer:this},qa,td))?(qa=qa.substring(nd.raw.length),td.push(nd),!0):!1))){if(nd=this.tokenizer.space(qa)){qa=qa.substring(nd.raw.length),nd.raw.length===1&&td.length>0?td[td.length-1].raw+= `
` :td.push(nd);continue}if(nd=this.tokenizer.code(qa)){qa=qa.substring(nd.raw.length),ad=td[td.length-1],ad&&(ad.type==="paragraph"||ad.type==="text")?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.text,this.inlineQueue[this.inlineQueue.length-1].src=ad.text):td.push(nd);continue}if(nd=this.tokenizer.fences(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.heading(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.hr(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.blockquote(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.list(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.html(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.def(qa)){qa=qa.substring(nd.raw.length),ad=td[td.length-1],ad&&(ad.type==="paragraph"||ad.type==="text")?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.raw,this.inlineQueue[this.inlineQueue.length-1].src=ad.text):this.tokens.links[nd.tag]||(this.tokens.links[nd.tag]={href:nd.href,title:nd.title});continue}if(nd=this.tokenizer.table(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(nd=this.tokenizer.lheading(qa)){qa=qa.substring(nd.raw.length),td.push(nd);continue}if(sd=qa,this.options.extensions&&this.options.extensions.startBlock){let ud=1/0;const cd=qa.slice(1);let dd;this.options.extensions.startBlock.forEach(pd=>{dd=pd.call({lexer:this},cd),typeof dd=="number"&&dd>=0&&(ud=Math.min(ud,dd))}),ud<1/0&&ud>=0&&(sd=qa.substring(0,ud+1))}if(this.state.top&&(nd=this.tokenizer.paragraph(sd))){ad=td[td.length-1],rd&&(ad==null?void 0:ad.type)==="paragraph"?(ad.raw+= `
` +nd.raw,ad.text+= `
` +nd.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ad.text):td.push(nd),rd=sd.length!==qa.length,qa=qa.substring(nd.raw.length);continue}if(nd=this.tokenizer.text(qa)){qa=qa.substring(nd.raw.length),ad=td[td.length-1],ad&&ad.type==="text"?(ad.raw+= `
` +nd.raw,ad.text+= `
2024-11-27 11:30:55 +08:00
` +nd.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ad.text):td.push(nd);continue}if(qa){const ud="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(ud);break}else throw new Error(ud)}}return this.state.top=!0,td}inline(qa,td=[]){return this.inlineQueue.push({src:qa,tokens:td}),td}inlineTokens(qa,td=[]){let rd,nd,ad,sd=qa,ud,cd,dd;if(this.tokens.links){const pd=Object.keys(this.tokens.links);if(pd.length>0)for(;(ud=this.tokenizer.rules.inline.reflinkSearch.exec(sd))!=null;)pd.includes(ud[0].slice(ud[0].lastIndexOf("[")+1,-1))&&(sd=sd.slice(0,ud.index)+"["+"a".repeat(ud[0].length-2)+"]"+sd.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ud=this.tokenizer.rules.inline.blockSkip.exec(sd))!=null;)sd=sd.slice(0,ud.index)+"["+"a".repeat(ud[0].length-2)+"]"+sd.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ud=this.tokenizer.rules.inline.anyPunctuation.exec(sd))!=null;)sd=sd.slice(0,ud.index)+"++"+sd.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;qa;)if(cd||(dd=""),cd=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(pd=>(rd=pd.call({lexer:this},qa,td))?(qa=qa.substring(rd.raw.length),td.push(rd),!0):!1))){if(rd=this.tokenizer.escape(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.tag(qa)){qa=qa.substring(rd.raw.length),nd=td[td.length-1],nd&&rd.type==="text"&&nd.type==="text"?(nd.raw+=rd.raw,nd.text+=rd.text):td.push(rd);continue}if(rd=this.tokenizer.link(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.reflink(qa,this.tokens.links)){qa=qa.substring(rd.raw.length),nd=td[td.length-1],nd&&rd.type==="text"&&nd.type==="text"?(nd.raw+=rd.raw,nd.text+=rd.text):td.push(rd);continue}if(rd=this.tokenizer.emStrong(qa,sd,dd)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.codespan(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.br(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.del(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(rd=this.tokenizer.autolink(qa)){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(!this.state.inLink&&(rd=this.tokenizer.url(qa))){qa=qa.substring(rd.raw.length),td.push(rd);continue}if(ad=qa,this.options.extensions&&this.options.extensions.startInline){let pd=1/0;const fd=qa.slice(1);let Td;this.options.extensions.startInline.forEach(Sd=>{Td=Sd.call({lexer:this},fd),typeof Td=="number"&&Td>=0&&(pd=Math.min(pd,Td))}),pd<1/0&&pd>=0&&(ad=qa.substring(0,pd+1))}if(rd=this.tokenizer.inlineText(ad)){qa=qa.substring(rd.raw.length),rd.raw.slice(-1)!=="_"&&(dd=rd.raw.slice(-1)),cd=!0,nd=td[td.length-1],nd&&nd.type==="text"?(nd.raw+=rd.raw,nd.text+=rd.text):td.push(rd);continue}if(qa){const pd="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(pd);break}else throw new Error(pd)}}return td}}class _Renderer{constructor(qa){Qm(this,"options");Qm(this,"parser");this.options=qa||_defaults}space(qa){return""}code({text:qa,lang:td,escaped:rd}){var sd;const nd=(sd=(td||"").match(/^ \S */))==null?void 0:sd[0],ad=qa.replace(/ \n $ /,"")+ `
2024-09-25 14:23:53 +08:00
` ;return nd?'<pre><code class="language-'+escape $ 1(nd)+'">'+(rd?ad:escape $ 1(ad,!0))+ ` < / c o d e > < / p r e >
` :"<pre><code>"+(rd?ad:escape $ 1(ad,!0))+ ` < / c o d e > < / p r e >
2024-09-18 09:46:23 +08:00
` }blockquote({tokens:qa}){return ` < blockquote >
$ { this . parser . parse ( qa ) } < / b l o c k q u o t e >
2024-09-25 14:23:53 +08:00
` }html({text:qa}){return qa}heading({tokens:qa,depth:td}){return ` < h$ { td } > $ { this . parser . parseInline ( qa ) } < / h $ { t d } >
2024-09-18 09:46:23 +08:00
` }hr(qa){return ` < hr >
2024-09-25 14:23:53 +08:00
` }list(qa){const td=qa.ordered,rd=qa.start;let nd="";for(let ud=0;ud<qa.items.length;ud++){const cd=qa.items[ud];nd+=this.listitem(cd)}const ad=td?"ol":"ul",sd=td&&rd!==1?' start="'+rd+'"':"";return"<"+ad+sd+ ` >
` +nd+"</"+ad+ ` >
` }listitem(qa){let td="";if(qa.task){const rd=this.checkbox({checked:!!qa.checked});qa.loose?qa.tokens.length>0&&qa.tokens[0].type==="paragraph"?(qa.tokens[0].text=rd+" "+qa.tokens[0].text,qa.tokens[0].tokens&&qa.tokens[0].tokens.length>0&&qa.tokens[0].tokens[0].type==="text"&&(qa.tokens[0].tokens[0].text=rd+" "+qa.tokens[0].tokens[0].text)):qa.tokens.unshift({type:"text",raw:rd+" ",text:rd+" "}):td+=rd+" "}return td+=this.parser.parse(qa.tokens,!!qa.loose), ` < li > $ { td } < / l i >
2024-09-18 09:46:23 +08:00
` }checkbox({checked:qa}){return"<input "+(qa?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:qa}){return ` < p > $ { this . parser . parseInline ( qa ) } < / p >
2024-09-25 14:23:53 +08:00
` }table(qa){let td="",rd="";for(let ad=0;ad<qa.header.length;ad++)rd+=this.tablecell(qa.header[ad]);td+=this.tablerow({text:rd});let nd="";for(let ad=0;ad<qa.rows.length;ad++){const sd=qa.rows[ad];rd="";for(let ud=0;ud<sd.length;ud++)rd+=this.tablecell(sd[ud]);nd+=this.tablerow({text:rd})}return nd&&(nd= ` < tbody > $ { nd } < / t b o d y > ` ) , ` < t a b l e >
2024-09-18 09:46:23 +08:00
< thead >
2024-09-25 14:23:53 +08:00
` +td+ ` < / t h e a d >
` +nd+ ` < / t a b l e >
2024-09-18 09:46:23 +08:00
` }tablerow({text:qa}){return ` < tr >
$ { qa } < / t r >
2024-09-25 14:23:53 +08:00
` }tablecell(qa){const td=this.parser.parseInline(qa.tokens),rd=qa.header?"th":"td";return(qa.align? ` < $ { rd } align = "${qa.align}" > ` : ` < $ { rd } > ` )+td+ ` < / $ { r d } >
` }strong({tokens:qa}){return ` < strong > $ { this . parser . parseInline ( qa ) } < / s t r o n g > ` } e m ( { t o k e n s : q a } ) { r e t u r n ` < e m > $ { t h i s . p a r s e r . p a r s e I n l i n e ( q a ) } < / e m > ` } c o d e s p a n ( { t e x t : q a } ) { r e t u r n ` < c o d e > $ { q a } < / c o d e > ` } b r ( q a ) { r e t u r n " < b r > " } d e l ( { t o k e n s : q a } ) { r e t u r n ` < d e l > $ { t h i s . p a r s e r . p a r s e I n l i n e ( q a ) } < / d e l > ` } l i n k ( { h r e f : q a , t i t l e : t d , t o k e n s : r d } ) { c o n s t n d = t h i s . p a r s e r . p a r s e I n l i n e ( r d ) , a d = c l e a n U r l ( q a ) ; i f ( a d = = = n u l l ) r e t u r n n d ; q a = a d ; l e t s d = ' < a h r e f = " ' + q a + ' " ' ; r e t u r n t d & & ( s d + = ' t i t l e = " ' + t d + ' " ' ) , s d + = " > " + n d + " < / a > " , s d } i m a g e ( { h r e f : q a , t i t l e : t d , t e x t : r d } ) { c o n s t n d = c l e a n U r l ( q a ) ; i f ( n d = = = n u l l ) r e t u r n r d ; q a = n d ; l e t a d = ` < i m g s r c = " $ { q a } " a l t = " $ { r d } " ` ; r e t u r n t d & & ( a d + = ` t i t l e = " $ { t d } " ` ) , a d + = " > " , a d } t e x t ( q a ) { r e t u r n " t o k e n s " i n q a & & q a . t o k e n s ? t h i s . p a r s e r . p a r s e I n l i n e ( q a . t o k e n s ) : q a . t e x t } } c l a s s _ T e x t R e n d e r e r { s t r o n g ( { t e x t : q a } ) { r e t u r n q a } e m ( { t e x t : q a } ) { r e t u r n q a } c o d e s p a n ( { t e x t : q a } ) { r e t u r n q a } d e l ( { t e x t : q a } ) { r e t u r n q a } h t m l ( { t e x t : q a } ) { r e t u r n q a } t e x t ( { t e x t : q a } ) { r e t u r n q a } l i n k ( { t e x t : q a } ) { r e t u r n " " + q a } i m a g e ( { t e x t : q a } ) { r e t u r n " " + q a } b r ( ) { r e t u r n " " } } c l a s s _ P a r s e r { c o n s t r u c t o r ( q a ) { Q m ( t h i s , " o p t i o n s " ) ; Q m ( t h i s , " r e n d e r e r " ) ; Q m ( t h i s , " t e x t R e n d e r e r " ) ; t h i s . o p t i o n s = q a | | _ d e f a u l t s , t h i s . o p t i o n s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r | | n e w _ R e n d e r e r , t h i s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r , t h i s . r e n d e r e r . o p t i o n s = t h i s . o p t i o n s , t h i s . r e n d e r e r . p a r s e r = t h i s , t h i s . t e x t R e n d e r e r = n e w _ T e x t R e n d e r e r } s t a t i c p a r s e ( q a , t d ) { r e t u r n n e w _ P a r s e r ( t d ) . p a r s e ( q a ) } s t a t i c p a r s e I n l i n e ( q a , t d ) { r e t u r n n e w _ P a r s e r ( t d ) . p a r s e I n l i n e ( q a ) } p a r s e ( q a , t d = ! 0 ) { l e t r d = " " ; f o r ( l e t n d = 0 ; n d < q a . l e n g t h ; n d + + ) { c o n s t a d = q a [ n d ] ; i f ( t h i s . o p t i o n s . e x t e n s i o n s & & t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s & & t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ a d . t y p e ] ) { c o n s t u d = a d , c d = t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ u d . t y p e ] . c a l l ( { p a r s e r : t h i s } , u d ) ; i f ( c d ! = = ! 1 | | ! [ " s p a c e " , " h r " , " h e a d i n g " , " c o d e " , " t a b l e " , " b l o c k q u o t e " , " l i s t " , " h t m l " , " p a r a g r a p h " , " t e x t " ] . i n c l u d e s ( u d . t y p e ) ) { r d + = c d | | " " ; c o n t i n u e } } c o n s t s d = a d ; s w i t c h ( s d . t y p e ) { c a s e " s p a c e " : { r d + = t h i s . r e n d e r e r . s p a c e ( s d ) ; c o n t i n u e } c a s e " h r " : { r d + = t h i s . r e n d e r e r . h r ( s d ) ; c o n t i n u e } c a s e " h e a d i n g " : { r d + = t h i s . r e n d e r e r . h e a d i n g ( s d ) ; c o n t i n u e } c a s e " c o d e " : { r d + = t h i s . r e n d e r e r . c o d e ( s d ) ; c o n t i n u e } c a s e " t a b l e " : { r d + = t h i s . r e n d e r e r . t a b l e ( s d ) ; c o n t i n u e } c a s e " b l o c k q u o t e " : { r d + = t h i s . r e n d e r e r . b l o c k q u o t e ( s d ) ; c o n t i n u e } c a s e " l i s t " : { r d + = t h i s . r e n d e r e r . l i s t ( s d ) ; c o n t i n u e } c a s e " h t m l " : { r d + = t h i s . r e n d e r e r . h t m l ( s d ) ; c o n t i n u e } c a s e " p a r a g r a p h " : { r d + = t h i s . r e n d e r e r . p a r a g r a p h ( s d ) ; c o n t i n u e } c a s e " t e x t " : { l e t u d = s d , c d = t h i s . r e n d e r e r . t e x t ( u d ) ; f o r ( ; n d + 1 < q a . l e n g t h & & q a [ n d + 1 ] . t y p e = = = " t e x t " ; ) u d = q a [ + + n d ] , c d + = `
2024-11-27 11:30:55 +08:00
` +this.renderer.text(ud);td?rd+=this.renderer.paragraph({type:"paragraph",raw:cd,text:cd,tokens:[{type:"text",raw:cd,text:cd}]}):rd+=cd;continue}default:{const ud='Token with "'+sd.type+'" type was not found.';if(this.options.silent)return console.error(ud),"";throw new Error(ud)}}}return rd}parseInline(qa,td){td=td||this.renderer;let rd="";for(let nd=0;nd<qa.length;nd++){const ad=qa[nd];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ad.type]){const ud=this.options.extensions.renderers[ad.type].call({parser:this},ad);if(ud!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(ad.type)){rd+=ud||"";continue}}const sd=ad;switch(sd.type){case"escape":{rd+=td.text(sd);break}case"html":{rd+=td.html(sd);break}case"link":{rd+=td.link(sd);break}case"image":{rd+=td.image(sd);break}case"strong":{rd+=td.strong(sd);break}case"em":{rd+=td.em(sd);break}case"codespan":{rd+=td.codespan(sd);break}case"br":{rd+=td.br(sd);break}case"del":{rd+=td.del(sd);break}case"text":{rd+=td.text(sd);break}default:{const ud='Token with "'+sd.type+'" type was not found.';if(this.options.silent)return console.error(ud),"";throw new Error(ud)}}}return rd}}class _Hooks{constructor(qa){Qm(this,"options");this.options=qa||_defaults}preprocess(qa){return qa}postprocess(qa){return qa}processAllTokens(qa){return qa}}Qm(_Hooks,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var tv,lS,xT,uS;class Marked{constructor(...qa){nS(this,tv);Qm(this,"defaults",_getDefaults());Qm(this,"options",this.setOptions);Qm(this,"parse",wE(this,tv,xT).call(this,_Lexer.lex,_Parser.parse));Qm(this,"parseInline",wE(this,tv,xT).call(this,_Lexer.lexInline,_Parser.parseInline));Qm(this,"Parser",_Parser);Qm(this,"Renderer",_Renderer);Qm(this,"TextRenderer",_TextRenderer);Qm(this,"Lexer",_Lexer);Qm(this,"Tokenizer",_Tokenizer);Qm(this,"Hooks",_Hooks);this.use(...qa)}walkTokens(qa,td){var nd,ad;let rd=[];for(const sd of qa)switch(rd=rd.concat(td.call(this,sd)),sd.type){case"table":{const ud=sd;for(const cd of ud.header)rd=rd.concat(this.walkTokens(cd.tokens,td));for(const cd of ud.rows)for(const dd of cd)rd=rd.concat(this.walkTokens(dd.tokens,td));break}case"list":{const ud=sd;rd=rd.concat(this.walkTokens(ud.items,td));break}default:{const ud=sd;(ad=(nd=this.defaults.extensions)==null?void 0:nd.childTokens)!=null&&ad[ud.type]?this.defaults.extensions.childTokens[ud.type].forEach(cd=>{const dd=ud[cd].flat(1/0);rd=rd.concat(this.walkTokens(dd,td))}):ud.tokens&&(rd=rd.concat(this.walkTokens(ud.tokens,td)))}}return rd}use(...qa){const td=this.defaults.extensions||{renderers:{},childTokens:{}};return qa.forEach(rd=>{const nd={...rd};if(nd.async=this.defaults.async||nd.async||!1,rd.extensions&&(rd.extensions.forEach(ad=>{if(!ad.name)throw new Error("extension name required");if("renderer"in ad){const sd=td.renderers[ad.name];sd?td.renderers[ad.name]=function(...ud){let cd=ad.renderer.apply(this,ud);return cd===!1&&(cd=sd.apply(this,ud)),cd}:td.renderers[ad.name]=ad.renderer}if("tokenizer"in ad){if(!ad.level||ad.level!=="block"&&ad.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const sd=td[ad.level];sd?sd.unshift(ad.tokenizer):td[ad.level]=[ad.tokenizer],ad.start&&(ad.level==="block"?td.startBlock?td.startBlock.push(ad.start):td.startBlock=[ad.start]:ad.level==="inline"&&(td.startInline?td.startInline.push(ad.start):td.startInline=[ad.start]))}"childTokens"in ad&&ad.childTokens&&(td.childTokens[ad.name]=ad.childTokens)}),nd.extensions=td),rd.renderer){const ad=this.defaults.renderer||new _Renderer(this.defaults);for(const sd in rd.renderer){if(!(sd in ad))throw new Error( ` renderer '${sd}' does not exist ` );if(["options","parser"].includes(sd))continue;const ud=sd;let cd=rd.renderer[ud];rd.useNewRenderer||(cd=wE(this,tv,lS).call(this,cd,ud,ad));const dd=ad[ud];ad[ud]=(...pd)=>{let fd=cd.apply(ad,pd);return fd===!1&&(fd=dd.apply(ad,pd)),fd||""}}nd.renderer=ad}if(rd.tokenizer){const ad=this.defaults.tokenizer||new _Tokenizer(this.defaults);for(const sd in
2024-09-25 14:23:53 +08:00
Please report this to https : //github.com/markedjs/marked.`,qa){const nd="<p>An error occurred:</p><pre>"+escape$1(rd.message+"",!0)+"</pre>";return td?Promise.resolve(nd):nd}if(td)return Promise.reject(rd);throw rd}};const markedInstance=new Marked;function marked(Ra,qa){return markedInstance.parse(Ra,qa)}marked.options=marked.setOptions=function(Ra){return markedInstance.setOptions(Ra),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.getDefaults=_getDefaults;marked.defaults=_defaults;marked.use=function(...Ra){return markedInstance.use(...Ra),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.walkTokens=function(Ra,qa){return markedInstance.walkTokens(Ra,qa)};marked.parseInline=markedInstance.parseInline;marked.Parser=_Parser;marked.parser=_Parser.parse;marked.Renderer=_Renderer;marked.TextRenderer=_TextRenderer;marked.Lexer=_Lexer;marked.lexer=_Lexer.lex;marked.Tokenizer=_Tokenizer;marked.Hooks=_Hooks;marked.parse=marked;marked.options;marked.setOptions;marked.use;marked.walkTokens;marked.parseInline;_Parser.parse;_Lexer.lex;function dedent(Ra){for(var qa=[],td=1;td<arguments.length;td++)qa[td-1]=arguments[td];var rd=Array.from(typeof Ra=="string"?[Ra]:Ra);rd[rd.length-1]=rd[rd.length-1].replace(/\r?\n([\t ]*)$/,"");var nd=rd.reduce(function(ud,cd){var dd=cd.match(/\n([\t ]+|(?!\s).)/g);return dd?ud.concat(dd.map(function(pd){var fd,Td;return(Td=(fd=pd.match(/[\t ]/g))===null||fd===void 0?void 0:fd.length)!==null&&Td!==void 0?Td:0})):ud},[]);if(nd.length){var ad=new RegExp(`
[ ] { ` +Math.min.apply(Math,nd)+"}","g");rd=rd.map(function(ud){return ud.replace(ad, `
` )})}rd[0]=rd[0].replace(/^ \r ? \n /,"");var sd=rd[0];return qa.forEach(function(ud,cd){var dd=sd.match(/(?:^| \n )( *) $ /),pd=dd?dd[1]:"",fd=ud;typeof ud=="string"&&ud.includes( `
` )&&(fd=String(ud).split( `
2024-11-27 11:30:55 +08:00
` ).map(function(Td,Sd){return Sd===0?Td:""+pd+Td}).join( `
2024-09-25 14:23:53 +08:00
` )),sd+=fd+rd[cd+1]}),sd}function preprocessMarkdown(Ra,{markdownAutoWrap:qa}){const rd=Ra.replace(/<br \/ >/g, `
2024-09-18 09:46:23 +08:00
` ).replace(/ \n {2,}/g, `
2024-09-25 14:23:53 +08:00
` ),nd=dedent(rd);return qa===!1?nd.replace(/ /g," "):nd}__name(preprocessMarkdown,"preprocessMarkdown");function markdownToLines(Ra,qa={}){const td=preprocessMarkdown(Ra,qa),rd=marked.lexer(td),nd=[[]];let ad=0;function sd(ud,cd="normal"){ud.type==="text"?ud.text.split( `
2024-11-27 11:30:55 +08:00
` ).forEach((pd,fd)=>{fd!==0&&(ad++,nd.push([])),pd.split(" ").forEach(Td=>{Td=Td.replace(/'/g,"'"),Td&&nd[ad].push({content:Td,type:cd})})}):ud.type==="strong"||ud.type==="em"?ud.tokens.forEach(dd=>{sd(dd,ud.type)}):ud.type==="html"&&nd[ad].push({content:ud.text,type:"normal"})}return __name(sd,"processNode"),rd.forEach(ud=>{var cd;ud.type==="paragraph"?(cd=ud.tokens)==null||cd.forEach(dd=>{sd(dd)}):ud.type==="html"&&nd[ad].push({content:ud.text,type:"normal"})}),nd}__name(markdownToLines,"markdownToLines");function markdownToHTML(Ra,{markdownAutoWrap:qa}={}){const td=marked.lexer(Ra);function rd(nd){var ad,sd,ud;return nd.type==="text"?qa===!1?nd.text.replace(/ \n */g,"<br/>").replace(/ /g," "):nd.text.replace(/ \n */g,"<br/>"):nd.type==="strong"? ` < strong > $ { ( ad = nd . tokens ) == null ? void 0 : ad . map ( rd ) . join ( "" ) } < / s t r o n g > ` : n d . t y p e = = = " e m " ? ` < e m > $ { ( s d = n d . t o k e n s ) = = n u l l ? v o i d 0 : s d . m a p ( r d ) . j o i n ( " " ) } < / e m > ` : n d . t y p e = = = " p a r a g r a p h " ? ` < p > $ { ( u d = n d . t o k e n s ) = = n u l l ? v o i d 0 : u d . m a p ( r d ) . j o i n ( " " ) } < / p > ` : n d . t y p e = = = " s p a c e " ? " " : n d . t y p e = = = " h t m l " ? ` $ { n d . t e x t } ` : n d . t y p e = = = " e s c a p e " ? n d . t e x t : ` U n s u p p o r t e d m a r k d o w n : $ { n d . t y p e } ` } r e t u r n _ _ n a m e ( r d , " o u t p u t " ) , t d . m a p ( r d ) . j o i n ( " " ) } _ _ n a m e ( m a r k d o w n T o H T M L , " m a r k d o w n T o H T M L " ) ; f u n c t i o n s p l i t T e x t T o C h a r s ( R a ) { r e t u r n I n t l . S e g m e n t e r ? [ . . . n e w I n t l . S e g m e n t e r ( ) . s e g m e n t ( R a ) ] . m a p ( q a = > q a . s e g m e n t ) : [ . . . R a ] } _ _ n a m e ( s p l i t T e x t T o C h a r s , " s p l i t T e x t T o C h a r s " ) ; f u n c t i o n s p l i t W o r d T o F i t W i d t h ( R a , q a ) { c o n s t t d = s p l i t T e x t T o C h a r s ( q a . c o n t e n t ) ; r e t u r n s p l i t W o r d T o F i t W i d t h R e c u r s i o n ( R a , [ ] , t d , q a . t y p e ) } _ _ n a m e ( s p l i t W o r d T o F i t W i d t h , " s p l i t W o r d T o F i t W i d t h " ) ; f u n c t i o n s p l i t W o r d T o F i t W i d t h R e c u r s i o n ( R a , q a , t d , r d ) { i f ( t d . l e n g t h = = = 0 ) r e t u r n [ { c o n t e n t : q a . j o i n ( " " ) , t y p e : r d } , { c o n t e n t : " " , t y p e : r d } ] ; c o n s t [ n d , . . . a d ] = t d , s d = [ . . . q a , n d ] ; r e t u r n R a ( [ { c o n t e n t : s d . j o i n ( " " ) , t y p e : r d } ] ) ? s p l i t W o r d T o F i t W i d t h R e c u r s i o n ( R a , s d , a d , r d ) : ( q a . l e n g t h = = = 0 & & n d & & ( q a . p u s h ( n d ) , t d . s h i f t ( ) ) , [ { c o n t e n t : q a . j o i n ( " " ) , t y p e : r d } , { c o n t e n t : t d . j o i n ( " " ) , t y p e : r d } ] ) } _ _ n a m e ( s p l i t W o r d T o F i t W i d t h R e c u r s i o n , " s p l i t W o r d T o F i t W i d t h R e c u r s i o n " ) ; f u n c t i o n s p l i t L i n e T o F i t W i d t h ( R a , q a ) { i f ( R a . s o m e ( ( { c o n t e n t : t d } ) = > t d . i n c l u d e s ( `
2024-09-25 14:23:53 +08:00
` )))throw new Error("splitLineToFitWidth does not support newlines in the line");return splitLineToFitWidthRecursion(Ra,qa)}__name(splitLineToFitWidth,"splitLineToFitWidth");function splitLineToFitWidthRecursion(Ra,qa,td=[],rd=[]){if(Ra.length===0)return rd.length>0&&td.push(rd),td.length>0?td:[];let nd="";Ra[0].content===" "&&(nd=" ",Ra.shift());const ad=Ra.shift()??{content:" ",type:"normal"},sd=[...rd];if(nd!==""&&sd.push({content:nd,type:"normal"}),sd.push(ad),qa(sd))return splitLineToFitWidthRecursion(Ra,qa,td,sd);if(rd.length>0)td.push(rd),Ra.unshift(ad);else if(ad.content){const[ud,cd]=splitWordToFitWidth(qa,ad);td.push([ud]),cd.content&&Ra.unshift(cd)}return splitLineToFitWidthRecursion(Ra,qa,td)}__name(splitLineToFitWidthRecursion,"splitLineToFitWidthRecursion");function applyStyle $ 1(Ra,qa){qa&&Ra.attr("style",qa)}__name(applyStyle $ 1,"applyStyle");async function addHtmlSpan(Ra,qa,td,rd,nd=!1){const ad=Ra.append("foreignObject");ad.attr("width", ` $ { 10 * td } px ` ),ad.attr("height", ` $ { 10 * td } px ` );const sd=ad.append("xhtml:div");let ud=qa.label;qa.label&&hasKatex(qa.label)&&(ud=await renderKatex(qa.label.replace(common_default.lineBreakRegex, `
2024-11-27 11:30:55 +08:00
` ),getConfig2()));const cd=qa.isNode?"nodeLabel":"edgeLabel",dd=sd.append("span");dd.html(ud),applyStyle $ 1(dd,qa.labelStyle),dd.attr("class", ` $ { cd } $ { rd } ` ),applyStyle $ 1(sd,qa.labelStyle),sd.style("display","table-cell"),sd.style("white-space","nowrap"),sd.style("line-height","1.5"),sd.style("max-width",td+"px"),sd.style("text-align","center"),sd.attr("xmlns","http://www.w3.org/1999/xhtml"),nd&&sd.attr("class","labelBkg");let pd=sd.node().getBoundingClientRect();return pd.width===td&&(sd.style("display","table"),sd.style("white-space","break-spaces"),sd.style("width",td+"px"),pd=sd.node().getBoundingClientRect()),ad.node()}__name(addHtmlSpan,"addHtmlSpan");function createTspan(Ra,qa,td){return Ra.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",qa*td-.1+"em").attr("dy",td+"em")}__name(createTspan,"createTspan");function computeWidthOfText(Ra,qa,td){const rd=Ra.append("text"),nd=createTspan(rd,1,qa);updateTextContentAndStyles(nd,td);const ad=nd.node().getComputedTextLength();return rd.remove(),ad}__name(computeWidthOfText,"computeWidthOfText");function computeDimensionOfText(Ra,qa,td){var sd;const rd=Ra.append("text"),nd=createTspan(rd,1,qa);updateTextContentAndStyles(nd,[{content:td,type:"normal"}]);const ad=(sd=nd.node())==null?void 0:sd.getBoundingClientRect();return ad&&rd.remove(),ad}__name(computeDimensionOfText,"computeDimensionOfText");function createFormattedText(Ra,qa,td,rd=!1){const ad=qa.append("g"),sd=ad.insert("rect").attr("class","background").attr("style","stroke: none"),ud=ad.append("text").attr("y","-10.1");let cd=0;for(const dd of td){const pd=__name(Td=>computeWidthOfText(ad,1.1,Td)<=Ra,"checkWidth"),fd=pd(dd)?[dd]:splitLineToFitWidth(dd,pd);for(const Td of fd){const Sd=createTspan(ud,cd,1.1);updateTextContentAndStyles(Sd,Td),cd++}}if(rd){const dd=ud.node().getBBox(),pd=2;return sd.attr("x",dd.x-pd).attr("y",dd.y-pd).attr("width",dd.width+2*pd).attr("height",dd.height+2*pd),ad.node()}else return ud.node()}__name(createFormattedText,"createFormattedText");function updateTextContentAndStyles(Ra,qa){Ra.text(""),qa.forEach((td,rd)=>{const nd=Ra.append("tspan").attr("font-style",td.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",td.type==="strong"?"bold":"normal");rd===0?nd.text(td.content):nd.text(" "+td.content)})}__name(updateTextContentAndStyles,"updateTextContentAndStyles");function replaceIconSubstring(Ra){return Ra.replace(/fa[bklrs]?:fa-[ \w -]+/g,qa=> ` < i class = '${qa.replace(":"," ")}' > < /i>`)}__name(replaceIconSubstring,"replaceIconSubstring");var createText=__name(async(Ra,qa="",{style:td="",isTitle:rd=!1,classes:nd="",useHtmlLabels:ad=!0,isNode:sd=!0,width:ud=200,addSvgBackground:cd=!1}={},dd)=>{if(log$1.debug("XYZ createText",qa,td,rd,nd,ad,sd,"addSvgBackground: ",cd),ad){const pd=markdownToHTML(qa,dd),fd=replaceIconSubstring(decodeEntities(pd)),Td=qa.replace(/ \ \ \ \ / g , "\\" ) , Sd = { isNode : sd , label : hasKatex ( qa ) ? Td : fd , labelStyle : td . replace ( "fill:" , "color:" ) } ; return await addHtmlSpan ( Ra , Sd , ud , nd , cd ) } else { const pd = qa . replace ( /<br\s*\/?>/g , "<br/>" ) , fd = markdownToLines ( pd . replace ( "<br>" , "<br/>" ) , dd ) , Td = createFormattedText ( ud , Ra , fd , qa ? cd : ! 1 ) ; if ( sd ) { /stroke:/ . exec ( td ) && ( td = td . replace ( "stroke:" , "lineColor:" ) ) ; const Sd = td . replace ( /stroke:[^;]+;?/g , "" ) . replace ( /stroke-width:[^;]+;?/g , "" ) . replace ( /fill:[^;]+;?/g , "" ) . replace ( /color:/g , "fill:" ) ; select ( Td ) . attr ( "style" , Sd ) } else { const Sd = td . replace ( /stroke:[^;]+;?/g , "" ) . replace ( /stroke-width:[^;]+;?/g , "" ) . replace ( /fill:[^;]+;?/g , "" ) . replace ( /background:/g , "fill:" ) ; select ( Td ) . select ( "rect" ) . attr ( "style" , Sd . replace ( /background:/g , "fill:" ) ) ; const Ad = td . replace ( /stroke:[^;]+;?/g , "" ) . replace ( /stroke-width:[^;]+;?/g , "" ) . replace ( /fill:[^;]+;?/g , "" ) . replace ( /color:/g , "fill:" ) ; select ( Td ) . select ( "text" ) . attr ( "style" , Ad ) } return Td } } , "createText" ) ; function t ( Ra , qa , td ) { if ( Ra && Ra . length ) { const [ rd , nd ] = qa , ad = Math . PI / 180 * td , sd = Math . cos ( ad ) , ud = Math . sin ( ad ) ; for ( const cd of Ra ) { const [ dd , pd ] = cd ; cd [ 0 ] = ( dd - rd ) * sd - ( pd - nd ) * ud + rd , cd [ 1 ] = ( dd - rd ) * ud + ( pd - nd ) * sd + nd } } } function e ( Ra , qa ) { return Ra [ 0 ] === qa [ 0 ] && Ra [ 1 ] === qa [ 1 ] } function s ( Ra , qa , td , rd = 1 )
` ),getConfig2()));const nd=Ra.isNode?"nodeLabel":"edgeLabel";return td.html('<span class="'+nd+'" '+(Ra.labelStyle?'style="'+Ra.labelStyle+'"':"")+">"+rd+"</span>"),applyStyle(td,Ra.labelStyle),td.style("display","inline-block"),td.style("padding-right","1px"),td.style("white-space","nowrap"),td.attr("xmlns","http://www.w3.org/1999/xhtml"),qa.node()}__name(addHtmlLabel,"addHtmlLabel");var createLabel=__name(async(Ra,qa,td,rd)=>{let nd=Ra||"";if(typeof nd=="object"&&(nd=nd[0]),evaluate(getConfig2().flowchart.htmlLabels)){nd=nd.replace(/ \\ n| \n /g,"<br />"),log $ 1.info("vertexText"+nd);const ad={isNode:rd,label:decodeEntities(nd).replace(/fa[blrs]?:fa-[ \w -]+/g,ud=> ` < i class = '${ud.replace(":"," ")}' > < /i>`),labelStyle:qa&&qa.replace("fill:","color:")};return await addHtmlLabel(ad)}else{const ad=document.createElementNS("http:/ / www . w3 . org / 2000 / svg "," text ");ad.setAttribute(" style ",qa.replace(" color : "," fill : "));let sd=[];typeof nd==" string "?sd=nd.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(nd)?sd=nd:sd=[];for(const ud of sd){const cd=document.createElementNS(" http : //www.w3.org/2000/svg","tspan");cd.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),cd.setAttribute("dy","1em"),cd.setAttribute("x","0"),td?cd.setAttribute("class","title-row"):cd.setAttribute("class","row"),cd.textContent=ud.trim(),ad.appendChild(cd)}return ad}},"createLabel"),createLabel_default=createLabel,createRoundedRectPathD=__name((Ra,qa,td,rd,nd)=>["M",Ra+nd,qa,"H",Ra+td-nd,"A",nd,nd,0,0,1,Ra+td,qa+nd,"V",qa+rd-nd,"A",nd,nd,0,0,1,Ra+td-nd,qa+rd,"H",Ra+nd,"A",nd,nd,0,0,1,Ra,qa+rd-nd,"V",qa+nd,"A",nd,nd,0,0,1,Ra+nd,qa,"Z"].join(" "),"createRoundedRectPathD"),solidStateFill=__name(Ra=>{const{handDrawnSeed:qa}=getConfig2();return{fill:Ra,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:Ra,seed:qa}},"solidStateFill"),compileStyles=__name(Ra=>{const qa=styles2Map([...Ra.cssCompiledStyles||[],...Ra.cssStyles||[]]);return{stylesMap:qa,stylesArray:[...qa]}},"compileStyles"),styles2Map=__name(Ra=>{const qa=new Map;return Ra.forEach(td=>{const[rd,nd]=td.split(":");qa.set(rd.trim(),nd==null?void 0:nd.trim())}),qa},"styles2Map"),styles2String=__name(Ra=>{const{stylesArray:qa}=compileStyles(Ra),td=[],rd=[],nd=[],ad=[];return qa.forEach(sd=>{const ud=sd[0];ud==="color"||ud==="font-size"||ud==="font-family"||ud==="font-weight"||ud==="font-style"||ud==="text-decoration"||ud==="text-align"||ud==="text-transform"||ud==="line-height"||ud==="letter-spacing"||ud==="word-spacing"||ud==="text-shadow"||ud==="text-overflow"||ud==="white-space"||ud==="word-wrap"||ud==="word-break"||ud==="overflow-wrap"||ud==="hyphens"?td.push(sd.join(":")+" !important"):(rd.push(sd.join(":")+" !important"),ud.includes("stroke")&&nd.push(sd.join(":")+" !important"),ud==="fill"&&ad.push(sd.join(":")+" !important"))}),{labelStyles:td.join(";"),nodeStyles:rd.join(";"),stylesArray:qa,borderStyles:nd,backgroundStyles:ad}},"styles2String"),userNodeOverrides=__name((Ra,qa)=>{var cd;const{themeVariables:td,handDrawnSeed:rd}=getConfig2(),{nodeBorder:nd,mainBkg:ad}=td,{stylesMap:sd}=compileStyles(Ra);return Object.assign({roughness:.7,fill:sd.get("fill")||ad,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:sd.get("stroke")||nd,seed:rd,strokeWidth:((cd=sd.get("stroke-width"))==null?void 0:cd.replace("px",""))||1.3,fillLineDash:[0,0]},qa)},"userNodeOverrides"),rect=__name(async(Ra,qa)=>{log$1.info("Creating subgraph rect for ",qa.id,qa);const td=getConfig2(),{themeVariables:rd,handDrawnSeed:nd}=td,{clusterBkg:ad,clusterBorder:sd}=rd,{labelStyles:ud,nodeStyles:cd,borderStyles:dd,backgroundStyles:pd}=styles2String(qa),fd=Ra.insert("g").attr("class","cluster "+qa.cssClasses).attr("id",qa.id).attr("data-look",qa.look),Td=evaluate(td.flowchart.htmlLabels),Sd=fd.insert("g").attr("class","cluster-label "),Ad=await createText(Sd,qa.label,{style:qa.labelStyle,useHtmlLabels:Td,isNode:!0});let Nd=Ad.getBBox();if(evaluate(td.flowchart.htmlLabels)){const Vd=Ad.children[0],Zd=select(Ad);Nd=Vd.getBoundingClientRect(),Zd.attr("width",Nd.width),Zd.attr("height",Nd.height)}const Ld=qa.wi
M $ { nd . x } , $ { nd . y } L $ { sd . x } , $ { sd . y } ` }__name(createLine,"createLine");function crossedCircle(Ra,qa){const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td,qa.label="";const nd=Ra.insert("g").attr("class",getNodeClasses(qa)).attr("id",qa.domId??qa.id),ad=Math.max(30,(qa==null?void 0:qa.width)??0),{cssStyles:sd}=qa,ud=at $ 1.svg(nd),cd=userNodeOverrides(qa,{});qa.look!=="handDrawn"&&(cd.roughness=0,cd.fillStyle="solid");const dd=ud.circle(0,0,ad*2,cd),pd=createLine(ad),fd=ud.path(pd,cd),Td=nd.insert(()=>dd,":first-child");return Td.insert(()=>fd),sd&&qa.look!=="handDrawn"&&Td.selectAll("path").attr("style",sd),rd&&qa.look!=="handDrawn"&&Td.selectAll("path").attr("style",rd),updateNodeBounds(qa,Td),qa.intersect=function(Sd){return log $ 1.info("crossedCircle intersect",qa,{radius:ad,point:Sd}),intersect_default.circle(qa,ad,Sd)},nd}__name(crossedCircle,"crossedCircle");function generateCirclePoints2(Ra,qa,td,rd=100,nd=0,ad=180){const sd=[],ud=nd*Math.PI/180,pd=(ad*Math.PI/180-ud)/(rd-1);for(let fd=0;fd<rd;fd++){const Td=ud+fd*pd,Sd=Ra+td*Math.cos(Td),Ad=qa+td*Math.sin(Td);sd.push({x:-Sd,y:-Ad})}return sd}__name(generateCirclePoints2,"generateCirclePoints");async function curlyBraceLeft(Ra,qa){const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;const{shapeSvg:nd,bbox:ad,label:sd}=await labelHelper(Ra,qa,getNodeClasses(qa)),ud=ad.width+(qa.padding??0),cd=ad.height+(qa.padding??0),dd=Math.max(5,cd*.1),{cssStyles:pd}=qa,fd=[...generateCirclePoints2(ud/2,-cd/2,dd,30,-90,0),{x:-ud/2-dd,y:dd},...generateCirclePoints2(ud/2+dd*2,-dd,dd,20,-180,-270),...generateCirclePoints2(ud/2+dd*2,dd,dd,20,-90,-180),{x:-ud/2-dd,y:-cd/2},...generateCirclePoints2(ud/2,cd/2,dd,20,0,90)],Td=[{x:ud/2,y:-cd/2-dd},{x:-ud/2,y:-cd/2-dd},...generateCirclePoints2(ud/2,-cd/2,dd,20,-90,0),{x:-ud/2-dd,y:-dd},...generateCirclePoints2(ud/2+ud*.1,-dd,dd,20,-180,-270),...generateCirclePoints2(ud/2+ud*.1,dd,dd,20,-90,-180),{x:-ud/2-dd,y:cd/2},...generateCirclePoints2(ud/2,cd/2,dd,20,0,90),{x:-ud/2,y:cd/2+dd},{x:ud/2,y:cd/2+dd}],Sd=at $ 1.svg(nd),Ad=userNodeOverrides(qa,{fill:"none"});qa.look!=="handDrawn"&&(Ad.roughness=0,Ad.fillStyle="solid");const Ld=createPathFromPoints(fd).replace("Z",""),Rd=Sd.path(Ld,Ad),Od=createPathFromPoints(Td),kd=Sd.path(Od,{...Ad}),Fd=nd.insert("g",":first-child");return Fd.insert(()=>kd,":first-child").attr("stroke-opacity",0),Fd.insert(()=>Rd,":first-child"),Fd.attr("class","text"),pd&&qa.look!=="handDrawn"&&Fd.selectAll("path").attr("style",pd),rd&&qa.look!=="handDrawn"&&Fd.selectAll("path").attr("style",rd),Fd.attr("transform", ` translate ( $ { dd } , 0 ) ` ),sd.attr("transform", ` translate ( $ { - ud / 2 + dd - ( ad . x - ( ad . left ? ? 0 ) ) } , $ { - cd / 2 + ( qa . padding ? ? 0 ) / 2 - ( ad . y - ( ad . top ? ? 0 ) ) } ) ` ),updateNodeBounds(qa,Fd),qa.intersect=function(Ud){return intersect_default.polygon(qa,Td,Ud)},nd}__name(curlyBraceLeft,"curlyBraceLeft");function generateCirclePoints3(Ra,qa,td,rd=100,nd=0,ad=180){const sd=[],ud=nd*Math.PI/180,pd=(ad*Math.PI/180-ud)/(rd-1);for(let fd=0;fd<rd;fd++){const Td=ud+fd*pd,Sd=Ra+td*Math.cos(Td),Ad=qa+td*Math.sin(Td);sd.push({x:Sd,y:Ad})}return sd}__name(generateCirclePoints3,"generateCirclePoints");async function curlyBraceRight(Ra,qa){const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;const{shapeSvg:nd,bbox:ad,label:sd}=await labelHelper(Ra,qa,getNodeClasses(qa)),ud=ad.width+(qa.padding??0),cd=ad.height+(qa.padding??0),dd=Math.max(5,cd*.1),{cssStyles:pd}=qa,fd=[...generateCirclePoints3(ud/2,-cd/2,dd,20,-90,0),{x:ud/2+dd,y:-dd},...generateCirclePoints3(ud/2+dd*2,-dd,dd,20,-180,-270),...generateCirclePoints3(ud/2+dd*2,dd,dd,20,-90,-180),{x:ud/2+dd,y:cd/2},...generateCirclePoints3(ud/2,cd/2,dd,20,0,90)],Td=[{x:-ud/2,y:-cd/2-dd},{x:ud/2,y:-cd/2-dd},...generateCirclePoints3(ud/2,-cd/2,dd,20,-90,0),{x:ud/2+dd,y:-dd},...generateCirclePoints3(ud/2+dd*2,-dd,dd,20,-180,-270),...generateCirclePoints3(ud/2+dd*2,dd,dd,20,-90,-180),{x:ud/2+dd,y:cd/2},...generateCirclePoints3(ud/2,cd/2,dd,20,0,90),{x:ud/2,y:cd/2+dd},{x:-ud/2,y:cd/2+dd}],Sd=at $ 1.svg(nd),Ad=userNodeOverrides(qa,{fill:"none"});qa.look!
2024-09-25 14:23:53 +08:00
point : ` ,Td, `
2024-09-18 09:46:23 +08:00
node :
` ,qa, `
2024-11-27 11:30:55 +08:00
res : ` ,intersect_default.polygon(qa,dd,Td)),intersect_default.polygon(qa,dd,Td)},nd}__name(question,"question");async function rect_left_inv_arrow(Ra,qa){const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;const{shapeSvg:nd,bbox:ad,label:sd}=await labelHelper(Ra,qa,getNodeClasses(qa)),ud=Math.max(ad.width+(qa.padding??0),(qa==null?void 0:qa.width)??0),cd=Math.max(ad.height+(qa.padding??0),(qa==null?void 0:qa.height)??0),dd=-ud/2,pd=-cd/2,fd=pd/2,Td=[{x:dd+fd,y:pd},{x:dd,y:0},{x:dd+fd,y:-pd},{x:-dd,y:-pd},{x:-dd,y:pd}],{cssStyles:Sd}=qa,Ad=at $ 1.svg(nd),Nd=userNodeOverrides(qa,{});qa.look!=="handDrawn"&&(Nd.roughness=0,Nd.fillStyle="solid");const Ld=createPathFromPoints(Td),Rd=Ad.path(Ld,Nd),Od=nd.insert(()=>Rd,":first-child");return Od.attr("class","basic label-container"),Sd&&qa.look!=="handDrawn"&&Od.selectAll("path").attr("style",Sd),rd&&qa.look!=="handDrawn"&&Od.selectAll("path").attr("style",rd),Od.attr("transform", ` translate ( $ { - fd / 2 } , 0 ) ` ),sd.attr("transform", ` translate ( $ { - fd / 2 - ad . width / 2 - ( ad . x - ( ad . left ? ? 0 ) ) } , $ { - ( ad . height / 2 ) - ( ad . y - ( ad . top ? ? 0 ) ) } ) ` ),updateNodeBounds(qa,Od),qa.intersect=function(kd){return intersect_default.polygon(qa,Td,kd)},nd}__name(rect_left_inv_arrow,"rect_left_inv_arrow");async function rectWithTitle(Ra,qa){var Zd,zd;const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;let nd;qa.cssClasses?nd="node "+qa.cssClasses:nd="node default";const ad=Ra.insert("g").attr("class",nd).attr("id",qa.domId||qa.id),sd=ad.insert("g"),ud=ad.insert("g").attr("class","label").attr("style",rd),cd=qa.description,dd=qa.label,pd=ud.node().appendChild(await createLabel_default(dd,qa.labelStyle,!0,!0));let fd={width:0,height:0};if(evaluate((zd=(Zd=getConfig2())==null?void 0:Zd.flowchart)==null?void 0:zd.htmlLabels)){const Xd=pd.children[0],Qd=select(pd);fd=Xd.getBoundingClientRect(),Qd.attr("width",fd.width),Qd.attr("height",fd.height)}log $ 1.info("Text 2",cd);const Td=cd||[],Sd=pd.getBBox(),Ad=ud.node().appendChild(await createLabel_default(Td.join?Td.join("<br/>"):Td,qa.labelStyle,!0,!0)),Nd=Ad.children[0],Ld=select(Ad);fd=Nd.getBoundingClientRect(),Ld.attr("width",fd.width),Ld.attr("height",fd.height);const Rd=(qa.padding||0)/2;select(Ad).attr("transform","translate( "+(fd.width>Sd.width?0:(Sd.width-fd.width)/2)+", "+(Sd.height+Rd+5)+")"),select(pd).attr("transform","translate( "+(fd.width<Sd.width?0:-(Sd.width-fd.width)/2)+", 0)"),fd=ud.node().getBBox(),ud.attr("transform","translate("+-fd.width/2+", "+(-fd.height/2-Rd+3)+")");const Od=fd.width+(qa.padding||0),kd=fd.height+(qa.padding||0),Fd=-fd.width/2-Rd,Ud=-fd.height/2-Rd;let Hd,Vd;if(qa.look==="handDrawn"){const Xd=at $ 1.svg(ad),Qd=userNodeOverrides(qa,{}),hf=Xd.path(createRoundedRectPathD(Fd,Ud,Od,kd,qa.rx||0),Qd),bf=Xd.line(-fd.width/2-Rd,-fd.height/2-Rd+Sd.height+Rd,fd.width/2+Rd,-fd.height/2-Rd+Sd.height+Rd,Qd);Vd=ad.insert(()=>(log $ 1.debug("Rough node insert CXC",hf),bf),":first-child"),Hd=ad.insert(()=>(log $ 1.debug("Rough node insert CXC",hf),hf),":first-child")}else Hd=sd.insert("rect",":first-child"),Vd=sd.insert("line"),Hd.attr("class","outer title-state").attr("style",rd).attr("x",-fd.width/2-Rd).attr("y",-fd.height/2-Rd).attr("width",fd.width+(qa.padding||0)).attr("height",fd.height+(qa.padding||0)),Vd.attr("class","divider").attr("x1",-fd.width/2-Rd).attr("x2",fd.width/2+Rd).attr("y1",-fd.height/2-Rd+Sd.height+Rd).attr("y2",-fd.height/2-Rd+Sd.height+Rd);return updateNodeBounds(qa,Hd),qa.intersect=function(Xd){return intersect_default.rect(qa,Xd)},ad}__name(rectWithTitle,"rectWithTitle");async function roundedRect(Ra,qa){const td={rx:5,ry:5,classes:"",labelPaddingX:((qa==null?void 0:qa.padding)||0)*1,labelPaddingY:((qa==null?void 0:qa.padding)||0)*1};return drawRect(Ra,qa,td)}__name(roundedRect,"roundedRect");async function shadedProcess(Ra,qa){const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;const{shapeSvg:nd,bbox:ad,label:sd}=await labelHelper(Ra,qa,getNodeClasses(qa)),ud=(qa==null?void 0:qa.padding)??0,cd=Math.max(ad.width+(qa.padding??0)*2,(qa==null?void 0:qa.width)??0),dd=Math.max(ad.height+(
a$ { nd } , $ { ad } 0 , 0 , 1 0 , $ { - rd }
l$ { td } , 0
a$ { nd } , $ { ad } 0 , 0 , 1 0 , $ { rd }
M$ { td } , $ { - rd }
a$ { nd } , $ { ad } 0 , 0 , 0 0 , $ { rd }
l$ { - td } , 0 ` ,"createCylinderPathD"),createOuterCylinderPathD3=__name((Ra,qa,td,rd,nd,ad)=>[ ` M$ { Ra } , $ { qa } ` , ` M$ { Ra + td } , $ { qa } ` , ` a$ { nd } , $ { ad } 0 , 0 , 0 0 , $ { - rd } ` , ` l$ { - td } , 0 ` , ` a$ { nd } , $ { ad } 0 , 0 , 0 0 , $ { rd } ` , ` l$ { td } , 0 ` ].join(" "),"createOuterCylinderPathD"),createInnerCylinderPathD3=__name((Ra,qa,td,rd,nd,ad)=>[ ` M$ { Ra + td / 2 } , $ { - rd / 2 } ` , ` a$ { nd } , $ { ad } 0 , 0 , 0 0 , $ { rd } ` ].join(" "),"createInnerCylinderPathD");async function tiltedCylinder(Ra,qa){const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;const{shapeSvg:nd,bbox:ad,label:sd,halfPadding:ud}=await labelHelper(Ra,qa,getNodeClasses(qa)),cd=qa.look==="neo"?ud*2:ud,dd=ad.height+cd,pd=dd/2,fd=pd/(2.5+dd/50),Td=ad.width+fd+cd,{cssStyles:Sd}=qa;let Ad;if(qa.look==="handDrawn"){const Nd=at $ 1.svg(nd),Ld=createOuterCylinderPathD3(0,0,Td,dd,fd,pd),Rd=createInnerCylinderPathD3(0,0,Td,dd,fd,pd),Od=Nd.path(Ld,userNodeOverrides(qa,{})),kd=Nd.path(Rd,userNodeOverrides(qa,{fill:"none"}));Ad=nd.insert(()=>kd,":first-child"),Ad=nd.insert(()=>Od,":first-child"),Ad.attr("class","basic label-container"),Sd&&Ad.attr("style",Sd)}else{const Nd=createCylinderPathD3(0,0,Td,dd,fd,pd);Ad=nd.insert("path",":first-child").attr("d",Nd).attr("class","basic label-container").attr("style",handleUndefinedAttr(Sd)).attr("style",rd),Ad.attr("class","basic label-container"),Sd&&Ad.selectAll("path").attr("style",Sd),rd&&Ad.selectAll("path").attr("style",rd)}return Ad.attr("label-offset-x",fd),Ad.attr("transform", ` translate ( $ { - Td / 2 } , $ { dd / 2 } ) ` ),sd.attr("transform", ` translate ( $ { - ( ad . width / 2 ) - fd - ( ad . x - ( ad . left ? ? 0 ) ) } , $ { - ( ad . height / 2 ) - ( ad . y - ( ad . top ? ? 0 ) ) } ) ` ),updateNodeBounds(qa,Ad),qa.intersect=function(Nd){const Ld=intersect_default.rect(qa,Nd),Rd=Ld.y-(qa.y??0);if(pd!=0&&(Math.abs(Rd)<(qa.height??0)/2||Math.abs(Rd)==(qa.height??0)/2&&Math.abs(Ld.x-(qa.x??0))>(qa.width??0)/2-fd)){let Od=fd*fd*(1-Rd*Rd/(pd*pd));Od!=0&&(Od=Math.sqrt(Od)),Od=fd-Od,Nd.x-(qa.x??0)>0&&(Od=-Od),Ld.x+=Od}return Ld},nd}__name(tiltedCylinder,"tiltedCylinder");async function trapezoid(Ra,qa){const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;const{shapeSvg:nd,bbox:ad}=await labelHelper(Ra,qa,getNodeClasses(qa)),sd=ad.width+qa.padding,ud=ad.height+qa.padding,cd=[{x:-3*ud/6,y:0},{x:sd+3*ud/6,y:0},{x:sd,y:-ud},{x:0,y:-ud}];let dd;const{cssStyles:pd}=qa;if(qa.look==="handDrawn"){const fd=at $ 1.svg(nd),Td=userNodeOverrides(qa,{}),Sd=createPathFromPoints(cd),Ad=fd.path(Sd,Td);dd=nd.insert(()=>Ad,":first-child").attr("transform", ` translate ( $ { - sd / 2 } , $ { ud / 2 } ) ` ),pd&&dd.attr("style",pd)}else dd=insertPolygonShape(nd,sd,ud,cd);return rd&&dd.attr("style",rd),qa.width=sd,qa.height=ud,updateNodeBounds(qa,dd),qa.intersect=function(fd){return intersect_default.polygon(qa,cd,fd)},nd}__name(trapezoid,"trapezoid");async function trapezoidalPentagon(Ra,qa){const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;const{shapeSvg:nd,bbox:ad}=await labelHelper(Ra,qa,getNodeClasses(qa)),sd=60,ud=20,cd=Math.max(sd,ad.width+(qa.padding??0)*2,(qa==null?void 0:qa.width)??0),dd=Math.max(ud,ad.height+(qa.padding??0)*2,(qa==null?void 0:qa.height)??0),{cssStyles:pd}=qa,fd=at $ 1.svg(nd),Td=userNodeOverrides(qa,{});qa.look!=="handDrawn"&&(Td.roughness=0,Td.fillStyle="solid");const Sd=[{x:-cd/2*.8,y:-dd/2},{x:cd/2*.8,y:-dd/2},{x:cd/2,y:-dd/2*.6},{x:cd/2,y:dd/2},{x:-cd/2,y:dd/2},{x:-cd/2,y:-dd/2*.6}],Ad=createPathFromPoints(Sd),Nd=fd.path(Ad,Td),Ld=nd.insert(()=>Nd,":first-child");return Ld.attr("class","basic label-container"),pd&&qa.look!=="handDrawn"&&Ld.selectChildren("path").attr("style",pd),rd&&qa.look!=="handDrawn"&&Ld.selectChildren("path").attr("style",rd),updateNodeBounds(qa,Ld),qa.intersect=function(Rd){return intersect_default.polygon(qa,Sd,Rd)},nd}__name(trapezoidalPentagon,"trapezoidalPentagon");async function triangle(Ra,qa){var Od;const{labelStyles:td,nodeStyles:rd}=styles2String(qa);qa.labelStyle=td;const{shapeSvg:nd,bbox:ad,label:sd}=await labelHelper(Ra,qa,getNodeClasses(qa)),ud=evaluate((Od=getConfig2().flowchart)==null?void 0:Od.htmlLabels),cd=ad.width+(qa.padding??0),dd=cd+ad.height,pd=cd+ad.height,fd=[{x:0,y:0},{x:pd,
M$ { pd - dd } , $ { fd } L$ { pd + ud } , $ { fd }
M$ { pd } , $ { fd - dd } L$ { pd } , $ { fd + cd } ` ;qa.look!=="handDrawn"&&(Ad.roughness=0,Ad.fillStyle="solid");const Rd=Sd.path(Ld,Ad),Od=nd.insert(()=>Rd,":first-child");return Od.attr("transform", ` translate ( $ { dd / 2 } , $ { dd / 2 } ) ` ),Od.attr("class","basic label-container"),Td&&qa.look!=="handDrawn"&&Od.selectAll("path").attr("style",Td),rd&&qa.look!=="handDrawn"&&Od.selectAll("path").attr("style",rd),sd.attr("transform", ` translate ( $ { - ( ad . width / 2 ) + dd / 2 - ( ad . x - ( ad . left ? ? 0 ) ) } , $ { - ( ad . height / 2 ) + dd / 2 - ( ad . y - ( ad . top ? ? 0 ) ) } ) ` ),updateNodeBounds(qa,Od),qa.intersect=function(kd){return intersect_default.polygon(qa,Nd,kd)},nd}__name(windowPane,"windowPane");async function textHelper(Ra,qa,td,rd,nd=td.class.padding??12){const ad=rd?0:3,sd=Ra.insert("g").attr("class",getNodeClasses(qa)).attr("id",qa.domId||qa.id);let ud=null,cd=null,dd=null,pd=null,fd=0,Td=0,Sd=0;if(ud=sd.insert("g").attr("class","annotation-group text"),qa.annotations.length>0){const Od=qa.annotations[0];await addText(ud,{text: ` « $ { Od } » ` },0),fd=ud.node().getBBox().height}cd=sd.insert("g").attr("class","label-group text"),await addText(cd,qa,0,["font-weight: bolder"]);const Ad=cd.node().getBBox();Td=Ad.height,dd=sd.insert("g").attr("class","members-group text");let Nd=0;for(const Od of qa.members){const kd=await addText(dd,Od,Nd,[Od.parseClassifier()]);Nd+=kd+ad}Sd=dd.node().getBBox().height,Sd<=0&&(Sd=nd/2),pd=sd.insert("g").attr("class","methods-group text");let Ld=0;for(const Od of qa.methods){const kd=await addText(pd,Od,Ld,[Od.parseClassifier()]);Ld+=kd+ad}let Rd=sd.node().getBBox();if(ud!==null){const Od=ud.node().getBBox();ud.attr("transform", ` translate ( $ { - Od . width / 2 } ) ` )}return cd.attr("transform", ` translate ( $ { - Ad . width / 2 } , $ { fd } ) ` ),Rd=sd.node().getBBox(),dd.attr("transform", ` translate ( 0 , $ { fd + Td + nd * 2 } ) ` ),Rd=sd.node().getBBox(),pd.attr("transform", ` translate ( 0 , $ { fd + Td + ( Sd ? Sd + nd * 4 : nd * 2 ) } ) ` ),Rd=sd.node().getBBox(),{shapeSvg:sd,bbox:Rd}}__name(textHelper,"textHelper");async function addText(Ra,qa,td,rd=[]){const nd=Ra.insert("g").attr("class","label").attr("style",rd.join("; ")),ad=getConfig $ 1();let sd="useHtmlLabels"in qa?qa.useHtmlLabels:evaluate(ad.htmlLabels)??!0,ud="";"text"in qa?ud=qa.text:ud=qa.label,!sd&&ud.startsWith(" \\ ")&&(ud=ud.substring(1)),hasKatex(ud)&&(sd=!0);const cd=await createText(nd,sanitizeText3(decodeEntities(ud)),{width:calculateTextWidth(ud,ad)+50,classes:"markdown-node-label",useHtmlLabels:sd},ad);let dd,pd=1;if(sd){const fd=cd.children[0],Td=select(cd);pd=fd.innerHTML.split("<br>").length,fd.innerHTML.includes("</math>")&&(pd+=fd.innerHTML.split("<mrow>").length-1);const Sd=fd.getElementsByTagName("img");if(Sd){const Ad=ud.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...Sd].map(Nd=>new Promise(Ld=>{function Rd(){var Od;if(Nd.style.display="flex",Nd.style.flexDirection="column",Ad){const kd=((Od=ad.fontSize)==null?void 0:Od.toString())??window.getComputedStyle(document.body).fontSize,Ud=parseInt(kd,10)*5+"px";Nd.style.minWidth=Ud,Nd.style.maxWidth=Ud}else Nd.style.width="100%";Ld(Nd)}__name(Rd,"setupImage"),setTimeout(()=>{Nd.complete&&Rd()}),Nd.addEventListener("error",Rd),Nd.addEventListener("load",Rd)})))}dd=fd.getBoundingClientRect(),Td.attr("width",dd.width),Td.attr("height",dd.height)}else{rd.includes("font-weight: bolder")&&select(cd).selectAll("tspan").attr("font-weight",""),pd=cd.children.length;const fd=cd.children[0];(cd.textContent===""||cd.textContent.includes(">"))&&(fd.textContent=ud[0]+ud.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),ud[1]===" "&&(fd.textContent=fd.textContent[0]+" "+fd.textContent.substring(1))),fd.textContent==="undefined"&&(fd.textContent=""),dd=cd.getBBox()}return nd.attr("transform","translate(0,"+(-dd.height/(2*pd)+td)+")"),dd.height}__name(addText,"addText");async function classBox(Ra,qa){var zd,Xd;const td=getConfig2(),rd=td.class.padding??12,nd=rd,ad=qa.useHtmlLabels??evaluate(td.htmlLabels)??!0,sd=qa;sd.annotations=sd.annotations??[],sd.members=sd.members??[],sd.methods=sd.methods??[];const{shapeSvg:ud,bbox:cd}=await textHelper(Ra,qa,td,ad,nd),{labelStyles:dd,nodeSty
outsidePoint : $ { JSON . stringify ( qa ) }
insidePoint : $ { JSON . stringify ( td ) }
node : x : $ { Ra . x } y : $ { Ra . y } w : $ { Ra . width } h : $ { Ra . height } ` );const rd=Ra.x,nd=Ra.y,ad=Math.abs(rd-td.x),sd=Ra.width/2;let ud=td.x<qa.x?sd-ad:sd+ad;const cd=Ra.height/2,dd=Math.abs(qa.y-td.y),pd=Math.abs(qa.x-td.x);if(Math.abs(nd-qa.y)*sd>Math.abs(rd-qa.x)*cd){let fd=td.y<qa.y?qa.y-cd-nd:nd-cd-qa.y;ud=pd*fd/dd;const Td={x:td.x<qa.x?td.x+ud:td.x-pd+ud,y:td.y<qa.y?td.y+dd-fd:td.y-dd+fd};return ud===0&&(Td.x=qa.x,Td.y=qa.y),pd===0&&(Td.x=qa.x),dd===0&&(Td.y=qa.y),log $ 1.debug( ` abc89 top / bottom calc , Q $ { dd } , q $ { fd } , R $ { pd } , r $ { ud } ` ,Td),Td}else{td.x<qa.x?ud=qa.x-sd-rd:ud=rd-sd-qa.x;let fd=dd*ud/pd,Td=td.x<qa.x?td.x+pd-ud:td.x-pd+ud,Sd=td.y<qa.y?td.y+fd:td.y-fd;return log $ 1.debug( ` sides calc abc89 , Q $ { dd } , q $ { fd } , R $ { pd } , r $ { ud } ` ,{_x:Td,_y:Sd}),ud===0&&(Td=qa.x,Sd=qa.y),pd===0&&(Td=qa.x),dd===0&&(Sd=qa.y),{x:Td,y:Sd}}},"intersection"),cutPathAtIntersect=__name((Ra,qa)=>{log $ 1.warn("abc88 cutPathAtIntersect",Ra,qa);let td=[],rd=Ra[0],nd=!1;return Ra.forEach(ad=>{if(log $ 1.info("abc88 checking point",ad,qa),!outsideNode(qa,ad)&&!nd){const sd=intersection(qa,rd,ad);log $ 1.debug("abc88 inside",ad,rd,sd),log $ 1.debug("abc88 intersection",sd,qa);let ud=!1;td.forEach(cd=>{ud=ud||cd.x===sd.x&&cd.y===sd.y}),td.some(cd=>cd.x===sd.x&&cd.y===sd.y)?log $ 1.warn("abc88 no intersect",sd,td):td.push(sd),nd=!0}else log $ 1.warn("abc88 outside",ad,rd),rd=ad,nd||td.push(ad)}),log $ 1.debug("returning points",td),td},"cutPathAtIntersect");function extractCornerPoints(Ra){const qa=[],td=[];for(let rd=1;rd<Ra.length-1;rd++){const nd=Ra[rd-1],ad=Ra[rd],sd=Ra[rd+1];(nd.x===ad.x&&ad.y===sd.y&&Math.abs(ad.x-sd.x)>5&&Math.abs(ad.y-nd.y)>5||nd.y===ad.y&&ad.x===sd.x&&Math.abs(ad.x-nd.x)>5&&Math.abs(ad.y-sd.y)>5)&&(qa.push(ad),td.push(rd))}return{cornerPoints:qa,cornerPointPositions:td}}__name(extractCornerPoints,"extractCornerPoints");var findAdjacentPoint=__name(function(Ra,qa,td){const rd=qa.x-Ra.x,nd=qa.y-Ra.y,ad=Math.sqrt(rd*rd+nd*nd),sd=td/ad;return{x:qa.x-sd*rd,y:qa.y-sd*nd}},"findAdjacentPoint"),fixCorners=__name(function(Ra){const{cornerPointPositions:qa}=extractCornerPoints(Ra),td=[];for(let rd=0;rd<Ra.length;rd++)if(qa.includes(rd)){const nd=Ra[rd-1],ad=Ra[rd+1],sd=Ra[rd],ud=findAdjacentPoint(nd,sd,5),cd=findAdjacentPoint(ad,sd,5),dd=cd.x-ud.x,pd=cd.y-ud.y;td.push(ud);const fd=Math.sqrt(2)*2;let Td={x:sd.x,y:sd.y};if(Math.abs(ad.x-nd.x)>10&&Math.abs(ad.y-nd.y)>=10){log $ 1.debug("Corner point fixing",Math.abs(ad.x-nd.x),Math.abs(ad.y-nd.y));const Sd=5;sd.x===ud.x?Td={x:dd<0?ud.x-Sd+fd:ud.x+Sd-fd,y:pd<0?ud.y-fd:ud.y+fd}:Td={x:dd<0?ud.x-fd:ud.x+fd,y:pd<0?ud.y-Sd+fd:ud.y+Sd-fd}}else log $ 1.debug("Corner point skipping fixing",Math.abs(ad.x-nd.x),Math.abs(ad.y-nd.y));td.push(Td,cd)}else td.push(Ra[rd]);return td},"fixCorners"),insertEdge=__name(function(Ra,qa,td,rd,nd,ad,sd){const{handDrawnSeed:ud}=getConfig2();let cd=qa.points,dd=!1;const pd=nd;var fd=ad;fd.intersect&&pd.intersect&&(cd=cd.slice(1,qa.points.length-1),cd.unshift(pd.intersect(cd[0])),log $ 1.debug("Last point APA12",qa.start,"-->",qa.end,cd[cd.length-1],fd,fd.intersect(cd[cd.length-1])),cd.push(fd.intersect(cd[cd.length-1]))),qa.toCluster&&(log $ 1.info("to cluster abc88",td.get(qa.toCluster)),cd=cutPathAtIntersect(qa.points,td.get(qa.toCluster).node),dd=!0),qa.fromCluster&&(log $ 1.debug("from cluster abc88",td.get(qa.fromCluster),JSON.stringify(cd,null,2)),cd=cutPathAtIntersect(cd.reverse(),td.get(qa.fromCluster).node).reverse(),dd=!0);let Td=cd.filter(Vd=>!Number.isNaN(Vd.y));Td=fixCorners(Td);let Sd=curveBasis;qa.curve&&(Sd=qa.curve);const{x:Ad,y:Nd}=getLineFunctionsWithOffset(qa),Ld=line $ 1().x(Ad).y(Nd).curve(Sd);let Rd;switch(qa.thickness){case"normal":Rd="edge-thickness-normal";break;case"thick":Rd="edge-thickness-thick";break;case"invisible":Rd="edge-thickness-invisible";break;default:Rd="edge-thickness-normal"}switch(qa.pattern){case"solid":Rd+=" edge-pattern-solid";break;case"dotted":Rd+=" edge-pattern-dotted";break;case"dashed":Rd+=" edge-pattern-dashed";break;default:Rd+=" edge-pattern-solid"}let Od,kd=Ld(Td);const Fd=Array.isArray(qa.style)?qa.style:[qa.style];if(qa.look==="ha
` );const rd=selectSvgElement(qa),nd=rd.append("g");rd.attr("viewBox","0 0 2412 512"),configureSvgSize(rd,100,512,!0),nd.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),nd.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),nd.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),nd.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),nd.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),nd.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),nd.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),nd.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text( ` mermaid version $ { td } ` )},"draw"),renderer={draw},errorRenderer_default=renderer,diagram={db:{},renderer,parser:{parse:__name(()=>{},"parse")}},errorDiagram_default=diagram,id18="flowchart-elk",detector18=__name((Ra,qa={})=>{var td;return/^ \s *flowchart-elk/.test(Ra)||/^ \s *flowchart|graph/.test(Ra)&&((td=qa==null?void 0:qa.flowchart)==null?void 0:td.defaultRenderer)==="elk"?(qa.layout="elk",!0):!1},"detector"),loader18=__name(async()=>{const{diagram:Ra}=await __vitePreload(async()=>{const{diagram:qa}=await import("./flowDiagram-TSWR6T2D-WNnQE_wY.js");return{diagram:qa}},__vite__mapDeps([7,8,9]));return{id:id18,diagram:Ra}},"loader"),plugin16={id:id18,detector:detector18,loader:loader18},detector_default=plugin16,id19="timeline",detector19=__name(Ra=>/^ \s *timeline/.test(Ra),"detector"),loader19=__name(async()=>{const{diagram:Ra}=await __vitePreload(async()=>{const{diagram:qa}=await import("./timeline-definition-27KQCCZ3-CLfLRRzw.js");return{diagram:qa}},__vite__mapDeps([33,20]));return{id:id19,diagram:Ra}},"loader"),plugin17={id:id19,detector:detector19,loader:loader19},detector_default2=plugin17,id20="mindmap",detector20=__name(Ra=>/^ \s *mindmap/.test(Ra),"detector"),loader20=__name(async()=>{const{diagram:Ra}=await __vitePreload(async()=>{const{diagram:qa}=await import("./mindmap-definition-R7LC4OIY-1ZfQFz0p.js");return{diagram:qa}},__vite__mapDeps([34,35]));return{id:id20,diagram:Ra}},"loader"),plugin18={id:id20,detector:detector20,loader:loader20},detector_default3=plugin18,id21="kanban",detector21=__name(Ra=>/^ \s *kanban/.test(Ra),"detector"),loader21=__name(async()=>{const{diagram:Ra}=await __vitePreload(async()=>{const{diagram:qa}=await import("./kanban-definition-KMT3NSR2-pNJ3bqBe.js");return{diagram:qa}},[]);return{id:id21,diagram:Ra}},"loader"),plugin19={id:id21,detector:detector21,loader:loader21},detector_default4=plugin19,id22="sankey",detector22=__name(Ra=>/^ \s *sankey-beta/.test(Ra),"detector"),loader22=__name(async()=>{con
` ;try{getDiagram(nd)}catch{const fd=getDiagramLoader(nd);if(!fd)throw new UnknownDiagramError( ` Diagram $ { nd } not found . ` );const{id:Td,diagram:Sd}=await fd();registerDiagram(Td,Sd)}const{db:ad,parser:sd,renderer:ud,init:cd}=getDiagram(nd);return sd.parser&&(sd.parser.yy=ad),(dd=ad.clear)==null||dd.call(ad),cd==null||cd(rd),td.title&&((pd=ad.setDiagramTitle)==null||pd.call(ad,td.title)),await sd.parse(qa),new g1(nd,qa,ad,sd,ud)}async render(qa,td){await this.renderer.draw(this.text,qa,td,this)}getParser(){return this.parser}getType(){return this.type}},__name(g1,"Diagram"),g1),interactionFunctions=[],attachFunctions=__name(()=>{interactionFunctions.forEach(Ra=>{Ra()}),interactionFunctions=[]},"attachFunctions"),cleanupComments=__name(Ra=>Ra.replace(/^ \s *%%(?!{)[^ \n ]+ \n ?/gm,"").trimStart(),"cleanupComments");function extractFrontMatter(Ra){const qa=Ra.match(frontMatterRegex);if(!qa)return{text:Ra,metadata:{}};let td=load(qa[1],{schema:JSON_SCHEMA})??{};td=typeof td=="object"&&!Array.isArray(td)?td:{};const rd={};return td.displayMode&&(rd.displayMode=td.displayMode.toString()),td.title&&(rd.title=td.title.toString()),td.config&&(rd.config=td.config),{text:Ra.slice(qa[0].length),metadata:rd}}__name(extractFrontMatter,"extractFrontMatter");var cleanupText=__name(Ra=>Ra.replace(/ \r \n ?/g, `
2024-09-25 14:23:53 +08:00
` ).replace(/<( \w +)([^>]*)>/g,(qa,td,rd)=>"<"+td+rd.replace(/="([^"]*)"/g,"=' $ 1'")+">"),"cleanupText"),processFrontmatter=__name(Ra=>{const{text:qa,metadata:td}=extractFrontMatter(Ra),{displayMode:rd,title:nd,config:ad={}}=td;return rd&&(ad.gantt||(ad.gantt={}),ad.gantt.displayMode=rd),{title:nd,config:ad,text:qa}},"processFrontmatter"),processDirectives=__name(Ra=>{const qa=utils_default.detectInit(Ra)??{},td=utils_default.detectDirective(Ra,"wrap");return Array.isArray(td)?qa.wrap=td.some(({type:rd})=>rd==="wrap"):(td==null?void 0:td.type)==="wrap"&&(qa.wrap=!0),{text:removeDirectives(Ra),directive:qa}},"processDirectives");function preprocessDiagram(Ra){const qa=cleanupText(Ra),td=processFrontmatter(qa),rd=processDirectives(td.text),nd=cleanAndMerge(td.config,rd.directive);return Ra=cleanupComments(rd.text),{code:Ra,title:td.title,config:nd}}__name(preprocessDiagram,"preprocessDiagram");function toBase64(Ra){const qa=new TextEncoder().encode(Ra),td=Array.from(qa,rd=>String.fromCodePoint(rd)).join("");return btoa(td)}__name(toBase64,"toBase64");var MAX_TEXTLENGTH=5e4,MAX_TEXTLENGTH_EXCEEDED_MSG="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",SECURITY_LVL_SANDBOX="sandbox",SECURITY_LVL_LOOSE="loose",XMLNS_SVG_STD="http://www.w3.org/2000/svg",XMLNS_XLINK_STD="http://www.w3.org/1999/xlink",XMLNS_XHTML_STD="http://www.w3.org/1999/xhtml",IFRAME_WIDTH="100%",IFRAME_HEIGHT="100%",IFRAME_STYLES="border:0;margin:0;",IFRAME_BODY_STYLE="margin:0",IFRAME_SANDBOX_OPTS="allow-top-navigation-by-user-activation allow-popups",IFRAME_NOT_SUPPORTED_MSG='The "iframe" tag is not supported by your browser.',DOMPURIFY_TAGS=["foreignobject"],DOMPURIFY_ATTR=["dominant-baseline"];function processAndSetConfigs(Ra){const qa=preprocessDiagram(Ra);return reset(),addDirective(qa.config??{}),qa}__name(processAndSetConfigs,"processAndSetConfigs");async function parse(Ra,qa){addDiagrams();try{const{code:td,config:rd}=processAndSetConfigs(Ra);return{diagramType:(await getDiagramFromText(td)).type,config:rd}}catch(td){if(qa!=null&&qa.suppressErrors)return!1;throw td}}__name(parse,"parse");var cssImportantStyles=__name((Ra,qa,td=[])=> `
. $ { Ra } $ { qa } { $ { td . join ( " !important; " ) } ! important ; } ` ,"cssImportantStyles"),createCssStyles=__name((Ra,qa=new Map)=>{var rd;let td="";if(Ra.themeCSS!==void 0&&(td+= `
$ { Ra . themeCSS } ` ),Ra.fontFamily!==void 0&&(td+= `
: root { -- mermaid - font - family : $ { Ra . fontFamily } } ` ),Ra.altFontFamily!==void 0&&(td+= `
: root { -- mermaid - alt - font - family : $ { Ra . altFontFamily } } ` ),qa instanceof Map){const ud=Ra.htmlLabels??((rd=Ra.flowchart)==null?void 0:rd.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];qa.forEach(cd=>{isEmpty $ 1(cd.styles)||ud.forEach(dd=>{td+=cssImportantStyles(cd.id,dd,cd.styles)}),isEmpty $ 1(cd.textStyles)||(td+=cssImportantStyles(cd.id,"tspan",((cd==null?void 0:cd.textStyles)||[]).map(dd=>dd.replace("color","fill"))))})}return td},"createCssStyles"),createUserStyles=__name((Ra,qa,td,rd)=>{const nd=createCssStyles(Ra,td),ad=styles_default(qa,nd,Ra.themeVariables);return serialize(compile( ` $ { rd } { $ { ad } } ` ),stringify $ 1)},"createUserStyles"),cleanUpSvgCode=__name((Ra="",qa,td)=>{let rd=Ra;return!td&&!qa&&(rd=rd.replace(/marker-end="url \( [ \d +./:=?A-Za-z-]*?#/g,'marker-end="url(#')),rd=decodeEntities(rd),rd=rd.replace(/<br>/g,"<br/>"),rd},"cleanUpSvgCode"),putIntoIFrame=__name((Ra="",qa)=>{var nd,ad;const td=(ad=(nd=qa==null?void 0:qa.viewBox)==null?void 0:nd.baseVal)!=null&&ad.height?qa.viewBox.baseVal.height+"px":IFRAME_HEIGHT,rd=toBase64( ` < body style = "${IFRAME_BODY_STYLE}" > $ { Ra } < / b o d y > ` ) ; r e t u r n ` < i f r a m e s t y l e = " w i d t h : $ { I F R A M E _ W I D T H } ; h e i g h t : $ { t d } ; $ { I F R A M E _ S T Y L E S } " s r c = " d a t a : t e x t / h t m l ; c h a r s e t = U T F - 8 ; b a s e 6 4 , $ { r d } " s a n d b o x = " $ { I F R A M E _ S A N D B O X _ O P T S } " >
2024-09-18 09:46:23 +08:00
$ { IFRAME _NOT _SUPPORTED _MSG }
2024-11-27 11:30:55 +08:00
< / i f r a m e > ` } , " p u t I n t o I F r a m e " ) , a p p e n d D i v S v g G = _ _ n a m e ( ( R a , q a , t d , r d , n d ) = > { c o n s t a d = R a . a p p e n d ( " d i v " ) ; a d . a t t r ( " i d " , t d ) , r d & & a d . a t t r ( " s t y l e " , r d ) ; c o n s t s d = a d . a p p e n d ( " s v g " ) . a t t r ( " i d " , q a ) . a t t r ( " w i d t h " , " 1 0 0 % " ) . a t t r ( " x m l n s " , X M L N S _ S V G _ S T D ) ; r e t u r n n d & & s d . a t t r ( " x m l n s : x l i n k " , n d ) , s d . a p p e n d ( " g " ) , R a } , " a p p e n d D i v S v g G " ) ; f u n c t i o n s a n d b o x e d I f r a m e ( R a , q a ) { r e t u r n R a . a p p e n d ( " i f r a m e " ) . a t t r ( " i d " , q a ) . a t t r ( " s t y l e " , " w i d t h : 1 0 0 % ; h e i g h t : 1 0 0 % ; " ) . a t t r ( " s a n d b o x " , " " ) } _ _ n a m e ( s a n d b o x e d I f r a m e , " s a n d b o x e d I f r a m e " ) ; v a r r e m o v e E x i s t i n g E l e m e n t s = _ _ n a m e ( ( R a , q a , t d , r d ) = > { v a r n d , a d , s d ; ( n d = R a . g e t E l e m e n t B y I d ( q a ) ) = = n u l l | | n d . r e m o v e ( ) , ( a d = R a . g e t E l e m e n t B y I d ( t d ) ) = = n u l l | | a d . r e m o v e ( ) , ( s d = R a . g e t E l e m e n t B y I d ( r d ) ) = = n u l l | | s d . r e m o v e ( ) } , " r e m o v e E x i s t i n g E l e m e n t s " ) , r e n d e r = _ _ n a m e ( a s y n c f u n c t i o n ( R a , q a , t d ) { v a r h f , b f , y f , _ f , g f , x f ; a d d D i a g r a m s ( ) ; c o n s t r d = p r o c e s s A n d S e t C o n f i g s ( q a ) ; q a = r d . c o d e ; c o n s t n d = g e t C o n f i g $ 1 ( ) ; l o g $ 1 . d e b u g ( n d ) , q a . l e n g t h > ( ( n d = = n u l l ? v o i d 0 : n d . m a x T e x t S i z e ) ? ? M A X _ T E X T L E N G T H ) & & ( q a = M A X _ T E X T L E N G T H _ E X C E E D E D _ M S G ) ; c o n s t a d = " # " + R a , s d = " i " + R a , u d = " # " + s d , c d = " d " + R a , d d = " # " + c d , p d = _ _ n a m e ( ( ) = > { c o n s t Y f = s e l e c t ( T d ? u d : d d ) . n o d e ( ) ; Y f & & " r e m o v e " i n Y f & & Y f . r e m o v e ( ) } , " r e m o v e T e m p E l e m e n t s " ) ; l e t f d = s e l e c t ( " b o d y " ) ; c o n s t T d = n d . s e c u r i t y L e v e l = = = S E C U R I T Y _ L V L _ S A N D B O X , S d = n d . s e c u r i t y L e v e l = = = S E C U R I T Y _ L V L _ L O O S E , A d = n d . f o n t F a m i l y ; i f ( t d ! = = v o i d 0 ) { i f ( t d & & ( t d . i n n e r H T M L = " " ) , T d ) { c o n s t M f = s a n d b o x e d I f r a m e ( s e l e c t ( t d ) , s d ) ; f d = s e l e c t ( M f . n o d e s ( ) [ 0 ] . c o n t e n t D o c u m e n t . b o d y ) , f d . n o d e ( ) . s t y l e . m a r g i n = 0 } e l s e f d = s e l e c t ( t d ) ; a p p e n d D i v S v g G ( f d , R a , c d , ` f o n t - f a m i l y : $ { A d } ` , X M L N S _ X L I N K _ S T D ) } e l s e { i f ( r e m o v e E x i s t i n g E l e m e n t s ( d o c u m e n t , R a , c d , s d ) , T d ) { c o n s t M f = s a n d b o x e d I f r a m e ( s e l e c t ( " b o d y " ) , s d ) ; f d = s e l e c t ( M f . n o d e s ( ) [ 0 ] . c o n t e n t D o c u m e n t . b o d y ) , f d . n o d e ( ) . s t y l e . m a r g i n = 0 } e l s e f d = s e l e c t ( " b o d y " ) ; a p p e n d D i v S v g G ( f d , R a , c d ) } l e t N d , L d ; t r y { N d = a w a i t D i a g r a m . f r o m T e x t ( q a , { t i t l e : r d . t i t l e } ) } c a t c h ( M f ) { i f ( n d . s u p p r e s s E r r o r R e n d e r i n g ) t h r o w p d ( ) , M f ; N d = a w a i t D i a g r a m . f r o m T e x t ( " e r r o r " ) , L d = M f } c o n s t R d = f d . s e l e c t ( d d ) . n o d e ( ) , O d = N d . t y p e , k d = R d . f i r s t C h i l d , F d = k d . f i r s t C h i l d , U d = ( b f = ( h f = N d . r e n d e r e r ) . g e t C l a s s e s ) = = n u l l ? v o i d 0 : b f . c a l l ( h f , q a , N d ) , H d = c r e a t e U s e r S t y l e s ( n d , O d , U d , a d ) , V d = d o c u m e n t . c r e a t e E l e m e n t ( " s t y l e " ) ; V d . i n n e r H T M L = H d , k d . i n s e r t B e f o r e ( V d , F d ) ; t r y { a w a i t N d . r e n d e r e r . d r a w ( q a , R a , v e r s i o n , N d ) } c a t c h ( M f ) { t h r o w n d . s u p p r e s s E r r o r R e n d e r i n g ? p d ( ) : e r r o r R e n d e r e r _ d e f a u l t . d r a w ( q a , R a , v e r s i o n ) , M f } c o n s t Z d = f d . s e l e c t ( ` $ { d d } s v g ` ) , z d = ( _ f = ( y f = N d . d b ) . g e t A c c T i t l e ) = = n u l l ? v o i d 0 : _ f . c a l l ( y f ) , X d = ( x f = ( g f = N d . d b ) . g e t A c c D e s c r i p t i o n ) = = n u l l ? v o i d 0 : x f . c a l l ( g f ) ; a d d A 1 1 y I n f o ( O d , Z d , z d , X d ) , f d . s e l e c t ( ` [ i d = " $ { R a } " ] ` ) . s e l e c t A l l ( " f o r e i g n o b j e c t > * " ) . a t t r ( " x m l n s " , X M L N S _ X H T M L _ S T D ) ; l e t Q d = f d . s e l e c t ( d d ) . n o d e ( ) . i n n e r H T M L ; i f ( l o g $ 1 . d e b u g ( " c o n f i g . a r r o w M a r k e r A b s o l u t e " , n d . a r r o w M a r k e r A b s o l u t e ) , Q d = c l e a n U p S v g C o d e ( Q d , T d , e v a l u a t e ( n d . a r r o w M a r k e r A b s o l u t e ) ) , T d ) { c o n s t M f = f d . s e l e c t ( d d + " s v g " ) . n o d e ( ) ; Q d = p u t I n t o I F r a m e ( Q d , M f ) } e l s e S d | | ( Q d = p u r i f y . s a n i t i z e ( Q d , { A D D _ T A G S : D O M P U R I F Y _ T A G S , A D D _ A T T R : D O M P U R I F Y _ A T T R } ) ) ; i f ( a t t a c h F u n c t i o n s ( ) , L d ) t h r o w L d ; r e t u r n p d ( ) , { d i a g r a m T y p e : O d , s v g : Q d , b i n d F u n c t i o n s : N d . d b . b i n d F u n c t i o n s } } , " r e n d e r " ) ; f u n c t i o n i n i t i a l i z e ( R a = { } ) { v a r r d ; c o n s t q a = a s s i g n W i t h D e p t h _ d e f a u l t ( { } , R a ) ; q a ! = n u l l & & q a . f o n t F a m i l y & & ! ( ( r d = q a . t h e m e V a r i a b l e s ) ! = n u l l & & r d . f o n t F a m i l y ) & & ( q a . t h e m e V a r i a b l e s | | ( q a . t h e m e V a r i a b l e s = { } ) , q a . t h e m e V a r i a b l e s . f o n t F a m i l y = q a . f o n t F a m i l y ) , s a v e C o n f i g F r o m I n i t i a l i z e ( q a ) , q a ! = n u l l & & q a . t h e m e & & q a . t h e m e i n t h e m e s _ d e f a u l t ? q a . t h e m e V a r i a b l e s = t h e m e s _ d e f a u l t [ q a . t h e m e ] . g e t T h e m e V a r i a b l e s ( q a . t h e m e V a r i a b l e s ) : q a & & ( q a . t h e m e V a r i a b l e s = t h e m e s _ d e f a u l t . d e f a u l t . g e t T h e m e V a r i a b l e s ( q a . t h e m e V a r i a b l e s ) ) ; c o n s t t d = t y p e o f q a = = " o b j e c t " ? s e t S i t e C o n f i g ( q a ) : g e t S i t e C o n f i g ( ) ; s e t L o g L e v e l ( t d . l o g L e v e l ) , a d d D i a g r a m s ( ) } _ _ n a m e ( i n i t i a l i z e , " i n i t i a l i z e " ) ; v a r g e t D i a g r a m F r o m T e x t = _ _ n a m e ( ( R a , q a = { } ) = > { c o n s t { c o d e : t d } = p r e p r o c e s s D i a g r a m ( R a ) ; r e t u r n D i a g r a m . f r o m T e x t ( t d , q a ) } , " g e t D i a g r a m F r o m T e x t " ) ; f u n c t i o n a d d A 1 1 y I n f o ( R a , q a , t d , r d ) { s e t A 1 1 y D i a g r a m I n f o ( q a , R a ) , a d d S V G a 1 1 y T i t l e D e s c r i p t i o n ( q a , t d , r d , q a . a t t r ( " i d " ) ) } _ _ n a m e ( a d d A 1 1 y I n f o , " a d d A 1 1 y I n f o " ) ; v a r m e r m a i d A P I = O b j e c t . f r e e z e ( { r e n d e r , p a r s e , g e t D i a g r a m F r o m T e x t , i n i t i a l i z e , g e t C o n f i g : g e t C o n f i g $ 1 , s e t C o n f i g , g e t S i t e C o n f i g , u p d a t e S i t e C o n f i g , r e s e t : _ _ n a m e ( ( ) = > { r e s e t ( ) } , " r e s e t " ) , g l o b a l R e s e t : _ _ n a m e ( ( ) = > { r e s e t ( d e f a u l t C o n f i g ) } , " g l o b a l R e s e t " ) , d e f a u l t C o n f i g } ) ; s e t L o g L e v e l ( g e t C o n f i g $ 1 ( ) . l o g L e v e
2024-09-18 09:46:23 +08:00
* Wait for document loaded before starting the execution
2024-11-27 11:30:55 +08:00
* /function markedAlert(Ra={}){const{className:qa="markdown-alert",variants:td=[]}=Ra,rd=resolveVariants(td);return{walkTokens(nd){var sd,ud,cd,dd;if(nd.type!=="blockquote")return;const ad=rd.find(({type:pd})=>new RegExp(createSyntaxPattern(pd),"i").test(nd.text));if(ad){const{type:pd,icon:fd,title:Td=ucfirst(pd),titleClassName:Sd=`${qa}-title`}=ad,Ad=new RegExp(createSyntaxPattern(pd),"i"),{styles:Nd}=Ra;Object.assign(nd,{type:"alert",meta:{className:qa,variant:pd,icon:fd,title:Td,titleClassName:Sd,wrapperStyle:{...Nd==null?void 0:Nd.blockquote,...Nd==null?void 0:Nd[`blockquote_${pd}`]},titleStyle:{...Nd==null?void 0:Nd.blockquote_title,...Nd==null?void 0:Nd[`blockquote_title_${pd}`]},contentStyle:{...Nd==null?void 0:Nd.blockquote_p,...Nd==null?void 0:Nd[`blockquote_p_${pd}`]}}});const Ld=(sd=nd.tokens)==null?void 0:sd[0];if((ud=Ld.raw)==null?void 0:ud.replace(Ad,"").trim()){const Od=Ld.tokens[0];Object.assign(Od,{raw:Od.raw.replace(Ad,""),text:Od.text.replace(Ad,"")}),((cd=Ld.tokens[1])==null?void 0:cd.type)==="br"&&Ld.tokens.splice(1,1)}else(dd=nd.tokens)==null||dd.shift()}},extensions:[{name:"alert",level:"block",renderer({meta:nd,tokens:ad=[]}){var cd;let sd=this.parser.parse(ad);sd=sd.replace(/ < p . * ? > / g , ` < p s t y l e = " $ { g e t S t y l e S t r i n g ( n d . c o n t e n t S t y l e ) } " > ` ) ; l e t u d = ` < b l o c k q u o t e c l a s s = " $ { n d . c l a s s N a m e } $ { n d . c l a s s N a m e } - $ { n d . v a r i a n t } " s t y l e = " $ { g e t S t y l e S t r i n g ( n d . w r a p p e r S t y l e ) } " >
2024-11-22 15:41:57 +08:00
` ;return ud+= ` < p class = "${nd.titleClassName}" style = "${getStyleString(nd.titleStyle)}" > ` ,ud+=nd.icon.replace("<svg", ` < svg style = "fill: ${((cd=nd.titleStyle)==null?void 0:cd.color)??" inherit "}" ` ),ud+=nd.title,ud+= ` < / p >
` ,ud+=sd,ud+= ` < / b l o c k q u o t e >
` ,ud}}]}}const defaultAlertVariant=[{type:"note",icon:'<svg class="octicon octicon-info" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'},{type:"tip",icon:'<svg class="octicon octicon-light-bulb" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>'},{type:"important",icon:'<svg class="octicon octicon-report" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>'},{type:"warning",icon:'<svg class="octicon octicon-alert" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>'},{type:"caution",icon:'<svg class="octicon octicon-stop" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'}];function resolveVariants(Ra){return Ra.length?Object.values([...defaultAlertVariant,...Ra].reduce((qa,td)=>(qa[td.type]=td,qa),{})):defaultAlertVariant}function createSyntaxPattern(Ra){return ` ^ ( ? : \ \ [ ! $ { Ra } ] ) \ \ s * ?
* ` }function ucfirst(Ra){return Ra.slice(0,1).toUpperCase()+Ra.slice(1).toLowerCase()}const inlineRule=/^( \$ {1,2})(?! \$ )((?: \\ .|[^ \\ \n ])*?(?: \\ .|[^ \\ \n $ ])) \1 (?=[ \s ?!.,:?!。,:]| $ )/,inlineRuleNonStandard=/^( \$ {1,2})(?! \$ )((?: \\ .|[^ \\ \n ])*?(?: \\ .|[^ \\ \n $ ])) \1 /,blockRule=/^( \$ {1,2}) \n ((?: \\ [ \s \S ]|[^ \\ ])+?) \n \1 (?: \n | $ )/;function createRenderer(Ra){return qa=>{window.MathJax.texReset();const rd=window.MathJax.tex2svg(qa.text,{display:Ra}).firstChild,nd=rd.style["min-width"]||rd.getAttribute("width");return rd.removeAttribute("width"),rd.style="max-width: 300vw !important;",rd.style.width=nd,rd.style.display="initial",Ra? ` < section style = "text-align: center; overflow: auto;" > $ { rd . outerHTML } < / s e c t i o n > ` : ` < s p a n s t y l e = " v e r t i c a l - a l i g n : m i d d l e ; l i n e - h e i g h t : 1 ; " > $ { r d . o u t e r H T M L } < / s p a n > ` } } f u n c t i o n i n l i n e K a t e x ( R a , q a ) { c o n s t t d = R a & & R a . n o n S t a n d a r d , r d = t d ? i n l i n e R u l e N o n S t a n d a r d : i n l i n e R u l e ; r e t u r n { n a m e : " i n l i n e K a t e x " , l e v e l : " i n l i n e " , s t a r t ( n d ) { l e t a d , s d = n d ; f o r ( ; s d ; ) { i f ( a d = s d . i n d e x O f ( " $ " ) , a d = = = - 1 ) r e t u r n ; i f ( ( t d ? a d > - 1 : a d = = = 0 | | s d . c h a r A t ( a d - 1 ) = = = " " ) & & s d . s u b s t r i n g ( a d ) . m a t c h ( r d ) ) r e t u r n a d ; s d = s d . s u b s t r i n g ( a d + 1 ) . r e p l a c e ( / ^ \ $ + / , " " ) } } , t o k e n i z e r ( n d ) { c o n s t a d = n d . m a t c h ( r d ) ; i f ( a d ) r e t u r n { t y p e : " i n l i n e K a t e x " , r a w : a d [ 0 ] , t e x t : a d [ 2 ] . t r i m ( ) , d i s p l a y M o d e : a d [ 1 ] . l e n g t h = = = 2 } } , r e n d e r e r : q a } } f u n c t i o n b l o c k K a t e x ( R a , q a ) { r e t u r n { n a m e : " b l o c k K a t e x " , l e v e l : " b l o c k " , t o k e n i z e r ( t d ) { c o n s t r d = t d . m a t c h ( b l o c k R u l e ) ; i f ( r d ) r e t u r n { t y p e : " b l o c k K a t e x " , r a w : r d [ 0 ] , t e x t : r d [ 2 ] . t r i m ( ) , d i s p l a y M o d e : r d [ 1 ] . l e n g t h = = = 2 } } , r e n d e r e r : q a } } f u n c t i o n M D K a t e x ( R a = { } ) { r e t u r n { e x t e n s i o n s : [ i n l i n e K a t e x ( R a , c r e a t e R e n d e r e r ( ! 1 ) ) , b l o c k K a t e x ( R a , c r e a t e R e n d e r e r ( ! 0 ) ) ] } } m a r k e d $ 1 . u s e ( M D K a t e x ( { n o n S t a n d a r d : ! 0 } ) ) ; f u n c t i o n b u i l d T h e m e ( { t h e m e : R a , f o n t s : q a , s i z e : t d , i s U s e I n d e n t : r d } ) { c o n s t n d = c l o n e D e e p ( R a ) , a d = t o M e r g e d ( n d . b a s e , { " f o n t - f a m i l y " : q a , " f o n t - s i z e " : t d } ) ; r d & & ( n d . b l o c k . p = { " t e x t - i n d e n t " : " 2 e m " , . . . n d . b l o c k . p } ) ; c o n s t s d = u d = > O b j e c t . f r o m E n t r i e s ( O b j e c t . e n t r i e s ( u d ) . m a p ( ( [ c d , d d ] ) = > [ c d , t o M e r g e d ( a d , d d ) ] ) ) ; r e t u r n { . . . s d ( n d . i n l i n e ) , . . . s d ( n d . b l o c k ) } } f u n c t i o n b u i l d A d d i t i o n ( ) { r e t u r n `
2024-09-18 09:46:23 +08:00
< style >
. preview - wrapper pre : : before {
position : absolute ;
top : 0 ;
right : 0 ;
color : # ccc ;
text - align : center ;
font - size : 0.8 em ;
padding : 5 px 10 px 0 ;
line - height : 15 px ;
height : 15 px ;
font - weight : 600 ;
}
< / s t y l e >
2024-11-22 15:41:57 +08:00
` }function getStyles(Ra,qa,td=""){const rd=Ra[qa];return rd? ` style = "${getStyleString(rd)}${td}" ` :""}function buildFootnoteArray(Ra){return Ra.map(([qa,td,rd])=>rd===td? ` < code style = "font-size: 90%; opacity: 0.6;" > [ $ { qa } ] < /code>: <i style="word-break: break-all">${td}</i > < br / > ` : ` < code style = "font-size: 90%; opacity: 0.6;" > [ $ { qa } ] < /code> ${td}: <i style="word-break: break-all">${rd}</i > < br / > ` ).join( `
2024-09-25 14:23:53 +08:00
` )}function transform $ 1(Ra,qa,td){const rd=Ra.split("-");for(const nd of rd){if(nd==="alt"&&qa)return qa;if(nd==="title"&&td)return td}return""}const macCodeSvg= `
2024-09-18 09:46:23 +08:00
< svg xmlns = "http://www.w3.org/2000/svg" version = "1.1" x = "0px" y = "0px" width = "45px" height = "13px" viewBox = "0 0 450 130" >
2024-11-22 15:41:57 +08:00
< ellipse cx = "50" cy = "65" rx = "50" ry = "52" stroke = "rgb(220,60,54)" stroke - width = "2" fill = "rgb(237,108,96)" / >
2024-09-18 09:46:23 +08:00
< ellipse cx = "225" cy = "65" rx = "50" ry = "52" stroke = "rgb(218,151,33)" stroke - width = "2" fill = "rgb(247,193,81)" / >
2024-11-22 15:41:57 +08:00
< ellipse cx = "400" cy = "65" rx = "50" ry = "52" stroke = "rgb(27,161,37)" stroke - width = "2" fill = "rgb(100,200,86)" / >
2024-09-18 09:46:23 +08:00
< / s v g >
2024-11-27 11:30:55 +08:00
` .trim();function initRenderer(Ra){const qa=[];let td=0,rd=buildTheme(Ra),nd=0,ad=0,sd=!1;function ud(Ad,Nd=""){return getStyles(rd,Ad,Nd)}function cd(Ad,Nd,Ld){const Rd=Ld??Ad;return ` < $ { Rd } $ { ud ( Ad ) } > $ { Nd } < /${Rd}>`}function dd(Ad,Nd){return qa.push([++td,Ad,Nd]),td}function pd(Ad){qa.length=0,td=0,fd(Ad)}function fd(Ad){Ra={...Ra,...Ad},rd=buildTheme(Ra),marked$1.use(markedAlert({styles:rd}))}const Td=()=>qa.length?cd("h4","引用链接")+cd("footnotes",buildFootnoteArray(qa),"p"):"",Sd={heading({tokens:Ad,depth:Nd}){const Ld=this.parser.parseInline(Ad),Rd=`h${Nd}`;return cd(Rd,Ld)},paragraph({tokens:Ad}){const Nd=this.parser.parseInline(Ad),Ld=Nd.includes("<figure")&&Nd.includes("<img"),Rd=Nd.trim()==="";return Ld||Rd?Nd:cd("p",Nd)},blockquote({tokens:Ad}){let Nd=this.parser.parse(Ad);return Nd=Nd.replace(/ < p . * ? > / g , ` < p $ { u d ( " b l o c k q u o t e _ p " ) } > ` ) , c d ( " b l o c k q u o t e " , N d ) } , c o d e ( { t e x t : A d , l a n g : N d = " " } ) { i f ( N d . s t a r t s W i t h ( " m e r m a i d " ) ) r e t u r n c l e a r T i m e o u t ( n d ) , n d = s e t T i m e o u t ( ( ) = > { m e r m a i d _ d e f a u l t . r u n ( ) } , 0 ) , ` < p r e c l a s s = " m e r m a i d " > $ { A d } < / p r e > ` ; c o n s t L d = N d . s p l i t ( " " ) [ 0 ] , R d = H i g h l i g h t J S . g e t L a n g u a g e ( L d ) ? L d : " p l a i n t e x t " ; l e t O d = H i g h l i g h t J S . h i g h l i g h t ( A d , { l a n g u a g e : R d } ) . v a l u e ; O d = O d . r e p l a c e ( / \ r \ n / g , " < b r / > " ) . r e p l a c e ( / \ n / g , " < b r / > " ) . r e p l a c e ( / ( > [ ^ < ] + ) | ( ^ [ ^ < ] + ) / g , U d = > U d . r e p l a c e ( / \ s / g , " & n b s p ; " ) ) ; c o n s t k d = ` < s p a n c l a s s = " m a c - s i g n " s t y l e = " p a d d i n g : 1 0 p x 1 4 p x 0 ; " h i d d e n > $ { m a c C o d e S v g } < / s p a n > ` , F d = ` < c o d e c l a s s = " l a n g u a g e - $ { N d } " $ { u d ( " c o d e " ) } > $ { O d } < / c o d e > ` ; r e t u r n ` < p r e c l a s s = " h l j s c o d e _ _ p r e " $ { u d ( " c o d e _ p r e " ) } > $ { k d } $ { F d } < / p r e > ` } , c o d e s p a n ( { t e x t : A d } ) { r e t u r n c d ( " c o d e s p a n " , A d , " c o d e " ) } , l i s t i t e m ( A d ) { c o n s t N d = s d ? ` $ { a d + 1 } . ` : " • " , L d = A d . t o k e n s . m a p ( R d = > t h i s [ R d . t y p e ] ( R d ) ) . j o i n ( " " ) ; r e t u r n c d ( " l i s t i t e m " , ` $ { N d } $ { L d } ` , " l i " ) } , l i s t ( { o r d e r e d : A d , i t e m s : N d } ) { c o n s t L d = [ ] ; f o r ( l e t O d = 0 ; O d < N d . l e n g t h ; O d + + ) { s d = A d , a d = O d ; c o n s t k d = N d [ O d ] ; L d . p u s h ( t h i s . l i s t i t e m ( k d ) ) } r e t u r n c d ( A d ? " o l " : " u l " , L d . j o i n ( " " ) ) } , i m a g e ( { h r e f : A d , t i t l e : N d , t e x t : L d } ) { c o n s t R d = c d ( " f i g c a p t i o n " , t r a n s f o r m $ 1 ( R a . l e g e n d , L d , N d ) ) , O d = u d ( " f i g u r e " ) , k d = u d ( " i m a g e " ) ; r e t u r n ` < f i g u r e $ { O d } > < i m g $ { k d } s r c = " $ { A d } " t i t l e = " $ { N d } " a l t = " $ { L d } " / > $ { R d } < / f i g u r e > ` } , l i n k ( { h r e f : A d , t i t l e : N d , t e x t : L d , t o k e n s : R d } ) { c o n s t O d = t h i s . p a r s e r . p a r s e I n l i n e ( R d ) ; i f ( A d . s t a r t s W i t h ( " h t t p s : / / m p . w e i x i n . q q . c o m " ) ) r e t u r n ` < a h r e f = " $ { A d } " t i t l e = " $ { N d | | L d } " $ { u d ( " w x _ l i n k " ) } > $ { O d } < / a > ` ; i f ( A d = = = L d ) r e t u r n O d ; i f ( R a . c i t e S t a t u s ) { c o n s t k d = d d ( N d | | L d , A d ) ; r e t u r n ` < s p a n $ { u d ( " l i n k " ) } > $ { O d } < s u p > [ $ { k d } ] < / s u p > < / s p a n > ` } r e t u r n c d ( " l i n k " , O d , " s p a n " ) } , s t r o n g ( { t o k e n s : A d } ) { r e t u r n c d ( " s t r o n g " , t h i s . p a r s e r . p a r s e I n l i n e ( A d ) ) } , e m ( { t o k e n s : A d } ) { r e t u r n c d ( " e m " , t h i s . p a r s e r . p a r s e I n l i n e ( A d ) , " s p a n " ) } , t a b l e ( { h e a d e r : A d , r o w s : N d } ) { c o n s t L d = A d . m a p ( O d = > t h i s . t a b l e c e l l ( O d ) ) . j o i n ( " " ) , R d = N d . m a p ( O d = > { c o n s t k d = O d . m a p ( F d = > t h i s . t a b l e c e l l ( F d ) ) . j o i n ( " " ) ; r e t u r n c d ( " t r " , k d ) } ) . j o i n ( " " ) ; r e t u r n `
2024-09-18 09:46:23 +08:00
< section style = "padding:0 8px; max-width: 100%; overflow: auto" >
< table class = "preview-table" >
2024-09-25 14:23:53 +08:00
< thead $ { ud ( "thead" ) } > $ { Ld } < / t h e a d >
2024-09-18 09:46:23 +08:00
< tbody > $ { Rd } < / t b o d y >
< / t a b l e >
< / s e c t i o n >
2024-11-27 11:30:55 +08:00
` },tablecell(Ad){const Nd=this.parser.parseInline(Ad.tokens);return cd("td",Nd)},hr(Ad){return cd("hr","")}};return marked $ 1.use({renderer:Sd}),{buildAddition,buildFootnotes:Td,setOptions:fd,reset:pd}}function tryOnScopeDispose(Ra){return getCurrentScope()?(onScopeDispose(Ra),!0):!1}function toValue $ 2(Ra){return typeof Ra=="function"?Ra():unref(Ra)}const isClient=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const toString $ 2=Object.prototype.toString,isObject $ 2=Ra=>toString $ 2.call(Ra)==="[object Object]",noop $ 3=()=>{};function createFilterWrapper(Ra,qa){function td(...rd){return new Promise((nd,ad)=>{Promise.resolve(Ra(()=>qa.apply(this,rd),{fn:qa,thisArg:this,args:rd})).then(nd).catch(ad)})}return td}const bypassFilter=Ra=>Ra();function pausableFilter(Ra=bypassFilter){const qa=ref $ 1(!0);function td(){qa.value=!1}function rd(){qa.value=!0}const nd=(...ad)=>{qa.value&&Ra(...ad)};return{isActive:readonly(qa),pause:td,resume:rd,eventFilter:nd}}function getLifeCycleTarget(Ra){return getCurrentInstance()}function toRef(...Ra){if(Ra.length!==1)return toRef $ 1(...Ra);const qa=Ra[0];return typeof qa=="function"?readonly(customRef(()=>({get:qa,set:noop $ 3}))):ref $ 1(qa)}function watchWithFilter(Ra,qa,td={}){const{eventFilter:rd=bypassFilter,...nd}=td;return watch(Ra,createFilterWrapper(rd,qa),nd)}function watchPausable(Ra,qa,td={}){const{eventFilter:rd,...nd}=td,{eventFilter:ad,pause:sd,resume:ud,isActive:cd}=pausableFilter(rd);return{stop:watchWithFilter(Ra,qa,{...nd,eventFilter:ad}),pause:sd,resume:ud,isActive:cd}}function tryOnMounted(Ra,qa=!0,td){getLifeCycleTarget()?onMounted(Ra,td):qa?Ra():nextTick $ 1(Ra)}function useToggle(Ra=!1,qa={}){const{truthyValue:td=!0,falsyValue:rd=!1}=qa,nd=isRef(Ra),ad=ref $ 1(Ra);function sd(ud){if(arguments.length)return ad.value=ud,ad.value;{const cd=toValue $ 2(td);return ad.value=ad.value===cd?toValue $ 2(rd):cd,ad.value}}return nd?sd:[ad,sd]}const defaultWindow=isClient?window:void 0;function unrefElement(Ra){var qa;const td=toValue $ 2(Ra);return(qa=td==null?void 0:td. $ el)!=null?qa:td}function useEventListener(...Ra){let qa,td,rd,nd;if(typeof Ra[0]=="string"||Array.isArray(Ra[0])?([td,rd,nd]=Ra,qa=defaultWindow):[qa,td,rd,nd]=Ra,!qa)return noop $ 3;Array.isArray(td)||(td=[td]),Array.isArray(rd)||(rd=[rd]);const ad=[],sd=()=>{ad.forEach(pd=>pd()),ad.length=0},ud=(pd,fd,Td,Sd)=>(pd.addEventListener(fd,Td,Sd),()=>pd.removeEventListener(fd,Td,Sd)),cd=watch(()=>[unrefElement(qa),toValue $ 2(nd)],([pd,fd])=>{if(sd(),!pd)return;const Td=isObject $ 2(fd)?{...fd}:fd;ad.push(...td.flatMap(Sd=>rd.map(Ad=>ud(pd,Sd,Ad,Td))))},{immediate:!0,flush:"post"}),dd=()=>{cd(),sd()};return tryOnScopeDispose(dd),dd}function useMounted(){const Ra=ref $ 1(!1),qa=getCurrentInstance();return qa&&onMounted(()=>{Ra.value=!0},qa),Ra}function useSupported(Ra){const qa=useMounted();return computed(()=>(qa.value,!!Ra()))}function useMediaQuery(Ra,qa={}){const{window:td=defaultWindow}=qa,rd=useSupported(()=>td&&"matchMedia"in td&&typeof td.matchMedia=="function");let nd;const ad=ref $ 1(!1),sd=dd=>{ad.value=dd.matches},ud=()=>{nd&&("removeEventListener"in nd?nd.removeEventListener("change",sd):nd.removeListener(sd))},cd=watchEffect(()=>{rd.value&&(ud(),nd=td.matchMedia(toValue $ 2(Ra)),"addEventListener"in nd?nd.addEventListener("change",sd):nd.addListener(sd),ad.value=nd.matches)});return tryOnScopeDispose(()=>{cd(),ud(),nd=void 0}),ad}const _global $ 1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global $ 1<"u"?global $ 1:typeof self<"u"?self:{},globalKey="__vueuse_ssr_handlers__",handlers=getHandlers();function getHandlers(){return globalKey in _global $ 1||(_global $ 1[globalKey]=_global $ 1[globalKey]||{}),_global $ 1[globalKey]}function getSSRHandler(Ra,qa){return handlers[Ra]||qa}function usePreferredDark(Ra){return useMediaQuery("(prefers-color-scheme: dark)",Ra)}function guessSerializerType(Ra){return Ra==null?"any":Ra instanceof Set?"set":Ra instanceof Map?"map":Ra instanceof Date?"date":typeof Ra=="boolean"?"boolean":typeof Ra=="string"?"string":typeof Ra=="obje
2024-09-25 14:23:53 +08:00
2024-11-27 11:30:55 +08:00
b ` .split(/ \n /).length!=3?function(Dd){for(var jd=0,Kd=[],Yd=Dd.length;jd<=Yd;){var df=Dd.indexOf( `
` ,jd);df==-1&&(df=Dd.length);var Sf=Dd.slice(jd,Dd.charAt(df-1)==" \r "?df-1:df),kf=Sf.indexOf(" \r ");kf!=-1?(Kd.push(Sf.slice(0,kf)),jd+=kf+1):(Kd.push(Sf),jd=df+1)}return Kd}:function(Dd){return Dd.split(/ \r \n ?| \n /)},ch=window.getSelection?function(Dd){try{return Dd.selectionStart!=Dd.selectionEnd}catch{return!1}}:function(Dd){var jd;try{jd=Dd.ownerDocument.selection.createRange()}catch{}return!jd||jd.parentElement()!=Dd?!1:jd.compareEndPoints("StartToEnd",jd)!=0},eh=function(){var Dd=_f("div");return"oncopy"in Dd?!0:(Dd.setAttribute("oncopy","return;"),typeof Dd.oncopy=="function")}(),dh=null;function yh(Dd){if(dh!=null)return dh;var jd=yf(Dd,_f("span","x")),Kd=jd.getBoundingClientRect(),Yd=xf(jd,0,1).getBoundingClientRect();return dh=Math.abs(Kd.left-Yd.left)>1}var vh={},kh={};function Rh(Dd,jd){arguments.length>2&&(jd.dependencies=Array.prototype.slice.call(arguments,2)),vh[Dd]=jd}function mh(Dd,jd){kh[Dd]=jd}function im(Dd){if(typeof Dd=="string"&&kh.hasOwnProperty(Dd))Dd=kh[Dd];else if(Dd&&typeof Dd.name=="string"&&kh.hasOwnProperty(Dd.name)){var jd=kh[Dd.name];typeof jd=="string"&&(jd={name:jd}),Dd=hh(jd,Dd),Dd.name=jd.name}else{if(typeof Dd=="string"&&/^[ \w \- ]+ \/ [ \w \- ]+ \+ xml $ /.test(Dd))return im("application/xml");if(typeof Dd=="string"&&/^[ \w \- ]+ \/ [ \w \- ]+ \+ json $ /.test(Dd))return im("application/json")}return typeof Dd=="string"?{name:Dd}:Dd||{name:"null"}}function fm(Dd,jd){jd=im(jd);var Kd=vh[jd.name];if(!Kd)return fm(Dd,"text/plain");var Yd=Kd(Dd,jd);if(Gm.hasOwnProperty(jd.name)){var df=Gm[jd.name];for(var Sf in df)df.hasOwnProperty(Sf)&&(Yd.hasOwnProperty(Sf)&&(Yd["_"+Sf]=Yd[Sf]),Yd[Sf]=df[Sf])}if(Yd.name=jd.name,jd.helperType&&(Yd.helperType=jd.helperType),jd.modeProps)for(var kf in jd.modeProps)Yd[kf]=jd.modeProps[kf];return Yd}var Gm={};function Nm(Dd,jd){var Kd=Gm.hasOwnProperty(Dd)?Gm[Dd]:Gm[Dd]={};vf(jd,Kd)}function Ym(Dd,jd){if(jd===!0)return jd;if(Dd.copyState)return Dd.copyState(jd);var Kd={};for(var Yd in jd){var df=jd[Yd];df instanceof Array&&(df=df.concat([])),Kd[Yd]=df}return Kd}function S_(Dd,jd){for(var Kd;Dd.innerMode&&(Kd=Dd.innerMode(jd),!(!Kd||Kd.mode==Dd));)jd=Kd.state,Dd=Kd.mode;return Kd||{mode:Dd,state:jd}}function w_(Dd,jd,Kd){return Dd.startState?Dd.startState(jd,Kd):!0}var p_=function(Dd,jd,Kd){this.pos=this.start=0,this.string=Dd,this.tabSize=jd||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Kd};p_.prototype.eol=function(){return this.pos>=this.string.length},p_.prototype.sol=function(){return this.pos==this.lineStart},p_.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},p_.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},p_.prototype.eat=function(Dd){var jd=this.string.charAt(this.pos),Kd;if(typeof Dd=="string"?Kd=jd==Dd:Kd=jd&&(Dd.test?Dd.test(jd):Dd(jd)),Kd)return++this.pos,jd},p_.prototype.eatWhile=function(Dd){for(var jd=this.pos;this.eat(Dd););return this.pos>jd},p_.prototype.eatSpace=function(){for(var Dd=this.pos;/[ \s \u 00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>Dd},p_.prototype.skipToEnd=function(){this.pos=this.string.length},p_.prototype.skipTo=function(Dd){var jd=this.string.indexOf(Dd,this.pos);if(jd>-1)return this.pos=jd,!0},p_.prototype.backUp=function(Dd){this.pos-=Dd},p_.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Pf(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Pf(this.string,this.lineStart,this.tabSize):0)},p_.prototype.indentation=function(){return Pf(this.string,null,this.tabSize)-(this.lineStart?Pf(this.string,this.lineStart,this.tabSize):0)},p_.prototype.match=function(Dd,jd,Kd){if(typeof Dd=="string"){var Yd=function(kf){return Kd?kf.toLowerCase():kf},df=this.string.substr(this.pos,Dd.length);if(Yd(df)==Yd(Dd))return jd!==!1&&(this.pos+=Dd.length),!0}else{var Sf=this.string.slice(this.pos).match(Dd);return Sf&&Sf.index>0?null:(Sf&&jd!==!1&&(this.pos+=Sf[0].length),Sf)}},p_.prototype.current=funct
` ?(mm=bh.appendChild(_f("span",Hh[0]==" \r "?"␍":"","cm-invalidchar")),mm.setAttribute("cm-text",Hh[0]),Dd.col+=1):(mm=Dd.cm.options.specialCharPlaceholder(Hh[0]),mm.setAttribute("cm-text",Hh[0]),cd&&dd<9?bh.appendChild(_f("span",[mm])):bh.appendChild(mm),Dd.col+=1);Dd.map.push(Dd.pos,Dd.pos+1,mm),Dd.pos++}}if(Dd.trailingSpace=Ff.charCodeAt(jd.length-1)==32,Kd||Yd||df||th||Sf||kf){var Vm=Kd||"";Yd&&(Vm+=Yd),df&&(Vm+=df);var Fm=_f("span",[bh],Vm,Sf);if(kf)for(var Wm in kf)kf.hasOwnProperty(Wm)&&Wm!="style"&&Wm!="class"&&Fm.setAttribute(Wm,kf[Wm]);return Dd.content.appendChild(Fm)}Dd.content.appendChild(bh)}}function ov(Dd,jd){if(Dd.length>1&&!/ /.test(Dd))return Dd;for(var Kd=jd,Yd="",df=0;df<Dd.length;df++){var Sf=Dd.charAt(df);Sf==" "&&Kd&&(df==Dd.length-1||Dd.charCodeAt(df+1)==32)&&(Sf=" "),Yd+=Sf,Kd=Sf==" "}return Yd}function Y_(Dd,jd){return function(Kd,Yd,df,Sf,kf,Ff,Kf){df=df?df+" cm-force-border":"cm-force-border";for(var th=Kd.pos,bh=th+Yd.length;;){for(var Ah=void 0,Hh=0;Hh<jd.length&&(Ah=jd[Hh],!(Ah.to>th&&Ah.from<=th));Hh++);if(Ah.to>=bh)return Dd(Kd,Yd,df,Sf,kf,Ff,Kf);Dd(Kd,Yd.slice(0,Ah.to-th),df,Sf,null,Ff,Kf),Sf=null,Yd=Yd.slice(Ah.to-th),th=Ah.to}}}function b0(Dd,jd,Kd,Yd){var df=!Yd&&Kd.widgetNode;df&&Dd.map.push(Dd.pos,Dd.pos+jd,df),!Yd&&Dd.cm.display.input.needsContentAttribute&&(df||(df=Dd.content.appendChild(document.createElement("span"))),df.setAttribute("cm-marker",Kd.id)),df&&(Dd.cm.display.input.setUneditable(df),Dd.content.appendChild(df)),Dd.pos+=jd,Dd.trailingSpace=!1}function Gv(Dd,jd,Kd){var Yd=Dd.markedSpans,df=Dd.text,Sf=0;if(!Yd){for(var kf=1;kf<Kd.length;kf+=2)jd.addToken(jd,df.slice(Sf,Sf=Kd[kf]),A1(Kd[kf+1],jd.cm.options));return}for(var Ff=df.length,Kf=0,th=1,bh="",Ah,Hh,jh=0,cm,mm,Im,jm,Vm;;){if(jh==Kf){cm=mm=Im=Hh="",Vm=null,jm=null,jh=1/0;for(var Fm=[],Wm=void 0,n_=0;n_<Yd.length;++n_){var t_=Yd[n_],__=t_.marker;if(__.type=="bookmark"&&t_.from==Kf&&__.widgetNode)Fm.push(__);else if(t_.from<=Kf&&(t_.to==null||t_.to>Kf||__.collapsed&&t_.to==Kf&&t_.from==Kf)){if(t_.to!=null&&t_.to!=Kf&&jh>t_.to&&(jh=t_.to,mm=""),__.className&&(cm+=" "+__.className),__.css&&(Hh=(Hh?Hh+";":"")+__.css),__.startStyle&&t_.from==Kf&&(Im+=" "+__.startStyle),__.endStyle&&t_.to==jh&&(Wm||(Wm=[])).push(__.endStyle,t_.to),__.title&&((Vm||(Vm={})).title=__.title),__.attributes)for(var j_ in __.attributes)(Vm||(Vm={}))[j_]=__.attributes[j_];__.collapsed&&(!jm||Fv(jm.marker,__)<0)&&(jm=t_)}else t_.from>Kf&&jh>t_.from&&(jh=t_.from)}if(Wm)for(var sg=0;sg<Wm.length;sg+=2)Wm[sg+1]==jh&&(mm+=" "+Wm[sg]);if(!jm||jm.from==Kf)for(var X_=0;X_<Fm.length;++X_)b0(jd,0,Fm[X_]);if(jm&&(jm.from||0)==Kf){if(b0(jd,(jm.to==null?Ff+1:jm.to)-Kf,jm.marker,jm.from==null),jm.to==null)return;jm.to==Kf&&(jm=!1)}}if(Kf>=Ff)break;for(var rg=Math.min(Ff,jh);;){if(bh){var ug=Kf+bh.length;if(!jm){var cg=ug>rg?bh.slice(0,rg-Kf):bh;jd.addToken(jd,cg,Ah?Ah+cm:cm,Im,Kf+cg.length==jh?mm:"",Hh,Vm)}if(ug>=rg){bh=bh.slice(rg-Kf),Kf=rg;break}Kf=ug,Im=""}bh=df.slice(Sf,Sf=Kd[th++]),Ah=A1(Kd[th++],jd.cm.options)}}}function w1(Dd,jd,Kd){this.line=jd,this.rest=K0(jd),this.size=this.rest?Um(uh(this.rest))-Kd+1:1,this.node=this.text=null,this.hidden=ig(Dd,jd)}function ub(Dd,jd,Kd){for(var Yd=[],df,Sf=jd;Sf<Kd;Sf=df){var kf=new w1(Dd.doc,Om(Dd.doc,Sf),Sf);df=Sf+kf.size,Yd.push(kf)}return Yd}var s0=null;function N1(Dd){s0?s0.ops.push(Dd):Dd.ownsGroup=s0={ops:[Dd],delayedCallbacks:[]}}function Iy(Dd){var jd=Dd.delayedCallbacks,Kd=0;do{for(;Kd<jd.length;Kd++)jd[Kd].call(null);for(var Yd=0;Yd<Dd.ops.length;Yd++){var df=Dd.ops[Yd];if(df.cursorActivityHandlers)for(;df.cursorActivityCalled<df.cursorActivityHandlers.length;)df.cursorActivityHandlers[df.cursorActivityCalled++].call(null,df.cm)}}while(Kd<jd.length)}function qd(Dd,jd){var Kd=Dd.ownsGroup;if(Kd)try{Iy(Kd)}finally{s0=null,jd(Kd)}}var Md=null;function Wd(Dd,jd){var Kd=Hm(Dd,jd);if(Kd.length){var Yd=Array.prototype.slice.call(arguments,2),df;s0?df=s0.delayedCallbacks:Md?df=Md:(df=Md=[],setTimeout(pf,0));for(var Sf=function(Ff){df.push(function(){return Kd[Ff].apply(null,Yd)})},kf=0;kf<Kd.length;++kf)S
2024-09-28 20:51:35 +08:00
top : ` +Wm+"px; width: "+(n_??Kf-Fm)+ ` px ;
2024-11-27 11:30:55 +08:00
height : ` +(t_-Wm)+"px"))}function Ah(Fm,Wm,n_){var t_=Om(df,Fm),__=t_.text.length,j_,sg;function X_(cg,Bg){return pm(Dd,_m(Fm,cg),"div",t_,Bg)}function rg(cg,Bg,Dg){var mg=G_(Dd,t_,null,cg),dg=Bg=="ltr"==(Dg=="after")?"left":"right",ng=Dg=="after"?mg.begin:mg.end-(/ \s /.test(t_.text.charAt(mg.end-1))?2:1);return X_(ng,dg)[dg]}var ug=Xh(t_,df.direction);return Jf(ug,Wm||0,n_??__,function(cg,Bg,Dg,mg){var dg=Dg=="ltr",ng=X_(cg,dg?"left":"right"),Ug=X_(Bg-1,dg?"right":"left"),Mv=Wm==null&&cg==0,Sb=n_==null&&Bg==__,Og=mg==0,H0=!ug||mg==ug.length-1;if(Ug.top-ng.top<=3){var xg=(th?Mv:Sb)&&Og,xE=(th?Sb:Mv)&&H0,G0=xg?Ff:(dg?ng:Ug).left,xb=xE?Kf:(dg?Ug:ng).right;bh(G0,ng.top,xb-G0,ng.bottom)}else{var Cb, $ g,Pv,CE;dg?(Cb=th&&Mv&&Og?Ff:ng.left, $ g=th?Kf:rg(cg,Dg,"before"),Pv=th?Ff:rg(Bg,Dg,"after"),CE=th&&Sb&&H0?Kf:Ug.right):(Cb=th?rg(cg,Dg,"before"):Ff, $ g=!th&&Mv&&Og?Kf:ng.right,Pv=!th&&Sb&&H0?Ff:Ug.left,CE=th?rg(Bg,Dg,"after"):Kf),bh(Cb,ng.top, $ g-Cb,ng.bottom),ng.bottom<Ug.top&&bh(Ff,ng.bottom,null,Ug.top),bh(Pv,Ug.top,CE-Pv,Ug.bottom)}(!j_|| $ b(ng,j_)<0)&&(j_=ng), $ b(Ug,j_)<0&&(j_=Ug),(!sg|| $ b(ng,sg)<0)&&(sg=ng), $ b(Ug,sg)<0&&(sg=Ug)}),{start:j_,end:sg}}var Hh=jd.from(),jh=jd.to();if(Hh.line==jh.line)Ah(Hh.line,Hh.ch,jh.ch);else{var cm=Om(df,Hh.line),mm=Om(df,jh.line),Im=B_(cm)==B_(mm),jm=Ah(Hh.line,Hh.ch,Im?cm.text.length+1:null).end,Vm=Ah(jh.line,Im?0:null,jh.ch).start;Im&&(jm.top<Vm.top-2?(bh(jm.right,jm.top,null,jm.bottom),bh(Ff,Vm.top,Vm.left,Vm.bottom)):bh(jm.right,jm.top,Vm.left-jm.right,jm.bottom)),jm.bottom<Vm.top&&bh(Ff,jm.bottom,null,Vm.top)}Kd.appendChild(Sf)}function Lb(Dd){if(Dd.state.focused){var jd=Dd.display;clearInterval(jd.blinker);var Kd=!0;jd.cursorDiv.style.visibility="",Dd.options.cursorBlinkRate>0?jd.blinker=setInterval(function(){Dd.hasFocus()||fv(Dd),jd.cursorDiv.style.visibility=(Kd=!Kd)?"":"hidden"},Dd.options.cursorBlinkRate):Dd.options.cursorBlinkRate<0&&(jd.cursorDiv.style.visibility="hidden")}}function pb(Dd){Dd.hasFocus()||(Dd.display.input.focus(),Dd.state.focused||Hy(Dd))}function pv(Dd){Dd.state.delayingBlurEvent=!0,setTimeout(function(){Dd.state.delayingBlurEvent&&(Dd.state.delayingBlurEvent=!1,Dd.state.focused&&fv(Dd))},100)}function Hy(Dd,jd){Dd.state.delayingBlurEvent&&!Dd.state.draggingText&&(Dd.state.delayingBlurEvent=!1),Dd.options.readOnly!="nocursor"&&(Dd.state.focused||(Pm(Dd,"focus",Dd,jd),Dd.state.focused=!0,Qf(Dd.display.wrapper,"CodeMirror-focused"),!Dd.curOp&&Dd.display.selForContextMenu!=Dd.doc.sel&&(Dd.display.input.reset(),pd&&setTimeout(function(){return Dd.display.input.reset(!0)},20)),Dd.display.input.receivedFocus()),Lb(Dd))}function fv(Dd,jd){Dd.state.delayingBlurEvent||(Dd.state.focused&&(Pm(Dd,"blur",Dd,jd),Dd.state.focused=!1,hf(Dd.display.wrapper,"CodeMirror-focused")),clearInterval(Dd.display.blinker),setTimeout(function(){Dd.state.focused||(Dd.display.shift=!1)},150))}function P1(Dd){for(var jd=Dd.display,Kd=jd.lineDiv.offsetTop,Yd=Math.max(0,jd.scroller.getBoundingClientRect().top),df=jd.lineDiv.getBoundingClientRect().top,Sf=0,kf=0;kf<jd.view.length;kf++){var Ff=jd.view[kf],Kf=Dd.options.lineWrapping,th=void 0,bh=0;if(!Ff.hidden){if(df+=Ff.line.height,cd&&dd<8){var Ah=Ff.node.offsetTop+Ff.node.offsetHeight;th=Ah-Kd,Kd=Ah}else{var Hh=Ff.node.getBoundingClientRect();th=Hh.bottom-Hh.top,!Kf&&Ff.text.firstChild&&(bh=Ff.text.firstChild.getBoundingClientRect().right-Hh.left-1)}var jh=Ff.line.height-th;if((jh>.005||jh<-.005)&&(df<Yd&&(Sf-=jh),a_(Ff.line,th),zv(Ff.line),Ff.rest))for(var cm=0;cm<Ff.rest.length;cm++)zv(Ff.rest[cm]);if(bh>Dd.display.sizerWidth){var mm=Math.ceil(bh/Q0(Dd.display));mm>Dd.display.maxLineLength&&(Dd.display.maxLineLength=mm,Dd.display.maxLine=Ff.line,Dd.display.maxLineChanged=!0)}}}Math.abs(Sf)>2&&(jd.scroller.scrollTop+=Sf)}function zv(Dd){if(Dd.widgets)for(var jd=0;jd<Dd.widgets.length;++jd){var Kd=Dd.widgets[jd],Yd=Kd.node.parentNode;Yd&&(Kd.height=Yd.offsetHeight)}}function Fb(Dd,jd,Kd){var Yd=Kd&&Kd.top!=null?Math.max(0,Kd.top):Dd.scroller.scrollTop;Yd=Math.floor(Yd-vg(Dd));var df=Kd&&Kd.bottom!=null?Kd.bottom:Yd+Dd
top : ` +(jd.top-Kd.viewOffset-vg(Dd.display))+ ` px ;
height : ` +(jd.bottom-jd.top+P0(Dd)+Kd.barHeight)+ ` px ;
left : ` +jd.left+"px; width: "+Math.max(2,jd.right-jd.left)+"px;");Dd.display.lineSpace.appendChild(kf),kf.scrollIntoView(df),Dd.display.lineSpace.removeChild(kf)}}}function k2(Dd,jd,Kd,Yd){Yd==null&&(Yd=0);var df;!Dd.options.lineWrapping&&jd==Kd&&(Kd=jd.sticky=="before"?_m(jd.line,jd.ch+1,"before"):jd,jd=jd.ch?_m(jd.line,jd.sticky=="before"?jd.ch-1:jd.ch,"after"):jd);for(var Sf=0;Sf<5;Sf++){var kf=!1,Ff=Zh(Dd,jd),Kf=!Kd||Kd==jd?Ff:Zh(Dd,Kd);df={left:Math.min(Ff.left,Kf.left),top:Math.min(Ff.top,Kf.top)-Yd,right:Math.max(Ff.left,Kf.left),bottom:Math.max(Ff.bottom,Kf.bottom)+Yd};var th=Xy(Dd,df),bh=Dd.doc.scrollTop,Ah=Dd.doc.scrollLeft;if(th.scrollTop!=null&&(Wv(Dd,th.scrollTop),Math.abs(Dd.doc.scrollTop-bh)>1&&(kf=!0)),th.scrollLeft!=null&&(S0(Dd,th.scrollLeft),Math.abs(Dd.doc.scrollLeft-Ah)>1&&(kf=!0)),!kf)break}return df}function BE(Dd,jd){var Kd=Xy(Dd,jd);Kd.scrollTop!=null&&Wv(Dd,Kd.scrollTop),Kd.scrollLeft!=null&&S0(Dd,Kd.scrollLeft)}function Xy(Dd,jd){var Kd=Dd.display,Yd=y0(Dd.display);jd.top<0&&(jd.top=0);var df=Dd.curOp&&Dd.curOp.scrollTop!=null?Dd.curOp.scrollTop:Kd.scroller.scrollTop,Sf=Ry(Dd),kf={};jd.bottom-jd.top>Sf&&(jd.bottom=jd.top+Sf);var Ff=Dd.doc.height+kb(Kd),Kf=jd.top<Yd,th=jd.bottom>Ff-Yd;if(jd.top<df)kf.scrollTop=Kf?0:jd.top;else if(jd.bottom>df+Sf){var bh=Math.min(jd.top,(th?Ff:jd.bottom)-Sf);bh!=df&&(kf.scrollTop=bh)}var Ah=Dd.options.fixedGutter?0:Kd.gutters.offsetWidth,Hh=Dd.curOp&&Dd.curOp.scrollLeft!=null?Dd.curOp.scrollLeft:Kd.scroller.scrollLeft-Ah,jh=Mb(Dd)-Kd.gutters.offsetWidth,cm=jd.right-jd.left>jh;return cm&&(jd.right=jd.left+jh),jd.left<10?kf.scrollLeft=0:jd.left<Hh?kf.scrollLeft=Math.max(0,jd.left+Ah-(cm?0:10)):jd.right>jh+Hh-3&&(kf.scrollLeft=jd.right+(cm?0:10)-jh),kf}function Qy(Dd,jd){jd!=null&&(B1(Dd),Dd.curOp.scrollTop=(Dd.curOp.scrollTop==null?Dd.doc.scrollTop:Dd.curOp.scrollTop)+jd)}function J_(Dd){B1(Dd);var jd=Dd.getCursor();Dd.curOp.scrollToPos={from:jd,to:jd,margin:Dd.options.cursorScrollMargin}}function hg(Dd,jd,Kd){(jd!=null||Kd!=null)&&B1(Dd),jd!=null&&(Dd.curOp.scrollLeft=jd),Kd!=null&&(Dd.curOp.scrollTop=Kd)}function M2(Dd,jd){B1(Dd),Dd.curOp.scrollToPos=jd}function B1(Dd){var jd=Dd.curOp.scrollToPos;if(jd){Dd.curOp.scrollToPos=null;var Kd=Jm(Dd,jd.from),Yd=Jm(Dd,jd.to);Jy(Dd,Kd,Yd,jd.margin)}}function Jy(Dd,jd,Kd,Yd){var df=Xy(Dd,{left:Math.min(jd.left,Kd.left),top:Math.min(jd.top,Kd.top)-Yd,right:Math.max(jd.right,Kd.right),bottom:Math.max(jd.bottom,Kd.bottom)+Yd});hg(Dd,df.scrollLeft,df.scrollTop)}function Wv(Dd,jd){Math.abs(Dd.doc.scrollTop-jd)<2||(nd||x0(Dd,{top:jd}), $ 1(Dd,jd,!0),nd&&x0(Dd),Xv(Dd,100))}function $ 1(Dd,jd,Kd){jd=Math.max(0,Math.min(Dd.display.scroller.scrollHeight-Dd.display.scroller.clientHeight,jd)),!(Dd.display.scroller.scrollTop==jd&&!Kd)&&(Dd.doc.scrollTop=jd,Dd.display.scrollbars.setScrollTop(jd),Dd.display.scroller.scrollTop!=jd&&(Dd.display.scroller.scrollTop=jd))}function S0(Dd,jd,Kd,Yd){jd=Math.max(0,Math.min(jd,Dd.display.scroller.scrollWidth-Dd.display.scroller.clientWidth)),!((Kd?jd==Dd.doc.scrollLeft:Math.abs(Dd.doc.scrollLeft-jd)<2)&&!Yd)&&(Dd.doc.scrollLeft=jd,jE(Dd),Dd.display.scroller.scrollLeft!=jd&&(Dd.display.scroller.scrollLeft=jd),Dd.display.scrollbars.setScrollLeft(jd))}function jb(Dd){var jd=Dd.display,Kd=jd.gutters.offsetWidth,Yd=Math.round(Dd.doc.height+kb(Dd.display));return{clientHeight:jd.scroller.clientHeight,viewHeight:jd.wrapper.clientHeight,scrollWidth:jd.scroller.scrollWidth,clientWidth:jd.scroller.clientWidth,viewWidth:jd.wrapper.clientWidth,barLeft:Dd.options.fixedGutter?Kd:0,docHeight:Yd,scrollHeight:Yd+P0(Dd)+jd.barHeight,nativeBarWidth:jd.nativeBarWidth,gutterWidth:Kd}}var l0=function(Dd,jd,Kd){this.cm=Kd;var Yd=this.vert=_f("div",[_f("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),df=this.horiz=_f("div",[_f("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Yd.tabIndex=df.tabIndex=-1,Dd(Yd),Dd(df),lm(Yd,"scroll",function(){Yd.clientHeight&&jd(Yd.scrollTop,"vertical")}),lm(df,"scroll",function(){df.clientWidth&&jd(df.scrollLeft,"horizontal")}),thi
` },setDirection:yg(function(Dd){Dd!="rtl"&&(Dd="ltr"),Dd!=this.direction&&(this.direction=Dd,this.iter(function(jd){return jd.order=null}),this.cm&&eb(this.cm))})}),Pg.prototype.eachLine=Pg.prototype.iter;var V1=0;function Y2(Dd){var jd=this;if(s2(jd),!(e_(jd,Dd)||R_(jd.display,Dd))){Zm(Dd),cd&&(V1=+new Date);var Kd=B0(jd,Dd,!0),Yd=Dd.dataTransfer.files;if(!(!Kd||jd.isReadOnly()))if(Yd&&Yd.length&&window.FileReader&&window.File)for(var df=Yd.length,Sf=Array(df),kf=0,Ff=function(){++kf==df&& $ _(jd,function(){Kd=o_(jd.doc,Kd);var jh={from:Kd,to:Kd,text:jd.doc.splitLines(Sf.filter(function(cm){return cm!=null}).join(jd.doc.lineSeparator())),origin:"paste"};Sv(jd.doc,jh),gb(jd.doc,hb(o_(jd.doc,Kd),o_(jd.doc,mb(jh))))})()},Kf=function(jh,cm){if(jd.options.allowDropFileTypes&&ah(jd.options.allowDropFileTypes,jh.type)==-1){Ff();return}var mm=new FileReader;mm.onerror=function(){return Ff()},mm.onload=function(){var Im=mm.result;if(/[ \x 00- \x 08 \x 0e- \x 1f]{2}/.test(Im)){Ff();return}Sf[cm]=Im,Ff()},mm.readAsText(jh)},th=0;th<Yd.length;th++)Kf(Yd[th],th);else{if(jd.state.draggingText&&jd.doc.sel.contains(Kd)>-1){jd.state.draggingText(Dd),setTimeout(function(){return jd.display.input.focus()},20);return}try{var bh=Dd.dataTransfer.getData("Text");if(bh){var Ah;if(jd.state.draggingText&&!jd.state.draggingText.copy&&(Ah=jd.listSelections()),Ng(jd.doc,hb(Kd,Kd)),Ah)for(var Hh=0;Hh<Ah.length;++Hh)zb(jd.doc,"",Ah[Hh].anchor,Ah[Hh].head,"drag");jd.replaceSelection(bh,"around","paste"),jd.display.input.focus()}}catch{}}}}function fE(Dd,jd){if(cd&&(!Dd.state.draggingText||+new Date-V1<100)){Q_(jd);return}if(!(e_(Dd,jd)||R_(Dd.display,jd))&&(jd.dataTransfer.setData("Text",Dd.getSelection()),jd.dataTransfer.effectAllowed="copyMove",jd.dataTransfer.setDragImage&&!Nd)){var Kd=_f("img",null,null,"position: fixed; left: 0; top: 0;");Kd.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ad&&(Kd.width=Kd.height=1,Dd.display.wrapper.appendChild(Kd),Kd._top=Kd.offsetTop),jd.dataTransfer.setDragImage(Kd,0,0),Ad&&Kd.parentNode.removeChild(Kd)}}function b_(Dd,jd){var Kd=B0(Dd,jd);if(Kd){var Yd=document.createDocumentFragment();M1(Dd,Kd,Yd),Dd.display.dragCursor||(Dd.display.dragCursor=_f("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),Dd.display.lineSpace.insertBefore(Dd.display.dragCursor,Dd.display.cursorDiv)),yf(Dd.display.dragCursor,Yd)}}function s2(Dd){Dd.display.dragCursor&&(Dd.display.lineSpace.removeChild(Dd.display.dragCursor),Dd.display.dragCursor=null)}function o2(Dd){if(document.getElementsByClassName){for(var jd=document.getElementsByClassName("CodeMirror"),Kd=[],Yd=0;Yd<jd.length;Yd++){var df=jd[Yd].CodeMirror;df&&Kd.push(df)}Kd.length&&Kd[0].operation(function(){for(var Sf=0;Sf<Kd.length;Sf++)Dd(Kd[Sf])})}}var wv=!1;function l2(){wv||(K2(),wv=!0)}function K2(){var Dd;lm(window,"resize",function(){Dd==null&&(Dd=setTimeout(function(){Dd=null,o2(X2)},100))}),lm(window,"blur",function(){return o2(fv)})}function X2(Dd){var jd=Dd.display;jd.cachedCharWidth=jd.cachedTextHeight=jd.cachedPaddingH=null,jd.scrollbarsClipped=!1,Dd.setSize()}for(var Tg={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:" ` ",219:" [ ",220:" \ \ ",221:" ] ",222:" ' ",224:" Mod ",63232:" Up ",63233:" Down ",63234:" Left ",63235:" Right ",63272:" Delete ",63273:" Home ",63275:" End ",63276:" PageUp ",63277:" PageDown ",63302:" Insert "},r1=0;r1<10;r1++)Tg[r1+48]=Tg[r1+96]=String(r1);for(var Kb=65;Kb<=90;Kb++)Tg[Kb]=String.fromCharCode(Kb);for(var Xb=1;Xb<=12;Xb++)Tg[Xb+111]=Tg[Xb+63235]=" F "+Xb;var F0={};F0.basic={Left:" goCharLeft ",Right:" goCharRight ",Up:" goLineUp ",Down:" goLineDown ",End:" goLineEnd ",Home:" goLineStartSmart ",PageUp:" goPageUp ",PageDown:" goPageDown ",Delete:" delCharAfter ",Backspace:" delCharBefore "," Shift - Backspace ":"
` ,"start")},toggleOverwrite:function(Dd){return Dd.toggleOverwrite()}};function rb(Dd,jd){var Kd=Om(Dd.doc,jd),Yd=B_(Kd);return Yd!=Kd&&(jd=Um(Yd)),s1(!0,Dd,Yd,jd,1)}function c2(Dd,jd){var Kd=Om(Dd.doc,jd),Yd=Uv(Kd);return Yd!=Kd&&(jd=Um(Yd)),s1(!0,Dd,Kd,jd,-1)}function mE(Dd,jd){var Kd=rb(Dd,jd.line),Yd=Om(Dd.doc,Kd.line),df=Xh(Yd,Dd.doc.direction);if(!df||df[0].level==0){var Sf=Math.max(Kd.ch,Yd.text.search(/ \S /)),kf=jd.line==Kd.line&&jd.ch<=Sf&&jd.ch;return _m(Kd.line,kf?0:Sf,Kd.sticky)}return Kd}function Nv(Dd,jd,Kd){if(typeof jd=="string"&&(jd=o1[jd],!jd))return!1;Dd.display.input.ensurePolled();var Yd=Dd.display.shift,df=!1;try{Dd.isReadOnly()&&(Dd.state.suppressEdits=!0),Kd&&(Dd.display.shift=!1),df=jd(Dd)!=Rf}finally{Dd.display.shift=Yd,Dd.state.suppressEdits=!1}return df}function Q2(Dd,jd,Kd){for(var Yd=0;Yd<Dd.state.keyMaps.length;Yd++){var df=Qg(jd,Dd.state.keyMaps[Yd],Kd,Dd);if(df)return df}return Dd.options.extraKeys&&Qg(jd,Dd.options.extraKeys,Kd,Dd)||Qg(jd,Dd.options.keyMap,Kd,Dd)}var J2=new Gf;function l1(Dd,jd,Kd,Yd){var df=Dd.state.keySeq;if(df){if(z1(jd))return"handled";if(/ \' $ /.test(jd)?Dd.state.keySeq=null:J2.set(50,function(){Dd.state.keySeq==df&&(Dd.state.keySeq=null,Dd.display.input.reset())}),_E(Dd,df+" "+jd,Kd,Yd))return!0}return _E(Dd,jd,Kd,Yd)}function _E(Dd,jd,Kd,Yd){var df=Q2(Dd,jd,Yd);return df=="multi"&&(Dd.state.keySeq=jd),df=="handled"&&Wd(Dd,"keyHandled",Dd,jd,Kd),(df=="handled"||df=="multi")&&(Zm(Kd),Lb(Dd)),!!df}function gE(Dd,jd){var Kd=n1(jd,!0);return Kd?jd.shiftKey&&!Dd.state.keySeq?l1(Dd,"Shift-"+Kd,jd,function(Yd){return Nv(Dd,Yd,!0)})||l1(Dd,Kd,jd,function(Yd){if(typeof Yd=="string"?/^go[A-Z]/.test(Yd):Yd.motion)return Nv(Dd,Yd)}):l1(Dd,Kd,jd,function(Yd){return Nv(Dd,Yd)}):!1}function Z2(Dd,jd,Kd){return l1(Dd,"'"+Kd+"'",jd,function(Yd){return Nv(Dd,Yd,!0)})}var Y1=null;function bE(Dd){var jd=this;if(!(Dd.target&&Dd.target!=jd.display.input.getField())&&(jd.curOp.focus=Yf( $ f(jd)),!e_(jd,Dd))){cd&&dd<11&&Dd.keyCode==27&&(Dd.returnValue=!1);var Kd=Dd.keyCode;jd.display.shift=Kd==16||Dd.shiftKey;var Yd=gE(jd,Dd);Ad&&(Y1=Yd?Kd:null,!Yd&&Kd==88&&!eh&&(Ud?Dd.metaKey:Dd.ctrlKey)&&jd.replaceSelection("",null,"cut")),nd&&!Ud&&!Yd&&Kd==46&&Dd.shiftKey&&!Dd.ctrlKey&&document.execCommand&&document.execCommand("cut"),Kd==18&&!/ \b CodeMirror-crosshair \b /.test(jd.display.lineDiv.className)&&zg(jd)}}function zg(Dd){var jd=Dd.display.lineDiv;Qf(jd,"CodeMirror-crosshair");function Kd(Yd){(Yd.keyCode==18||!Yd.altKey)&&(hf(jd,"CodeMirror-crosshair"),Rm(document,"keyup",Kd),Rm(document,"mouseover",Kd))}lm(document,"keyup",Kd),lm(document,"mouseover",Kd)}function D0(Dd){Dd.keyCode==16&&(this.doc.sel.shift=!1),e_(this,Dd)}function d2(Dd){var jd=this;if(!(Dd.target&&Dd.target!=jd.display.input.getField())&&!(R_(jd.display,Dd)||e_(jd,Dd)||Dd.ctrlKey&&!Dd.altKey||Ud&&Dd.metaKey)){var Kd=Dd.keyCode,Yd=Dd.charCode;if(Ad&&Kd==Y1){Y1=null,Zm(Dd);return}if(!(Ad&&(!Dd.which||Dd.which<10)&&gE(jd,Dd))){var df=String.fromCharCode(Yd??Kd);df!=" \b "&&(Z2(jd,Dd,df)||jd.display.input.onKeyPress(Dd))}}}var eT=400,Dv=function(Dd,jd,Kd){this.time=Dd,this.pos=jd,this.button=Kd};Dv.prototype.compare=function(Dd,jd,Kd){return this.time+eT>Dd&&s_(jd,this.pos)==0&&Kd==this.button};var j0,Iv;function p2(Dd,jd){var Kd=+new Date;return Iv&&Iv.compare(Kd,Dd,jd)?(j0=Iv=null,"triple"):j0&&j0.compare(Kd,Dd,jd)?(Iv=new Dv(Kd,Dd,jd),j0=null,"double"):(j0=new Dv(Kd,Dd,jd),Iv=null,"single")}function f2(Dd){var jd=this,Kd=jd.display;if(!(e_(jd,Dd)||Kd.activeTouch&&Kd.input.supportsTouch())){if(Kd.input.ensurePolled(),Kd.shift=Dd.shiftKey,R_(Kd,Dd)){pd||(Kd.scroller.draggable=!1,setTimeout(function(){return Kd.scroller.draggable=!0},100));return}if(!Rv(jd,Dd)){var Yd=B0(jd,Dd),df=H_(Dd),Sf=Yd?p2(Yd,df):"single";Xf(jd).focus(),df==1&&jd.state.selectingText&&jd.state.selectingText(Dd),!(Yd&&h2(jd,df,Yd,Sf,Dd))&&(df==1?Yd?u1(jd,Yd,Sf,Dd):Z_(Dd)==Kd.scroller&&Zm(Dd):df==2?(Yd&&vv(jd.doc,Yd),setTimeout(function(){return Kd.input.focus()},20)):df==3&&(Xd?jd.display.input.onContextMenu(Dd):pv(jd)))}}}function h2(Dd,jd,Kd,Yd,df){var Sf="Click";
` )==jd){if(Yd.ranges.length%c0.text.length==0){th=[];for(var bh=0;bh<c0.text.length;bh++)th.push(Sf.splitLines(c0.text[bh]))}}else Kf.length==Yd.ranges.length&&Dd.options.pasteLinesPerSelection&&(th=_h(Kf,function(jm){return[jm]}));for(var Ah=Dd.curOp.updateInput,Hh=Yd.ranges.length-1;Hh>=0;Hh--){var jh=Yd.ranges[Hh],cm=jh.from(),mm=jh.to();jh.empty()&&(Kd&&Kd>0?cm=_m(cm.line,cm.ch-Kd):Dd.state.overwrite&&!Ff?mm=_m(mm.line,Math.min(Om(Sf,mm.line).text.length,mm.ch+uh(Kf).length)):Ff&&c0&&c0.lineWise&&c0.text.join( `
2024-09-28 20:51:35 +08:00
` )==Kf.join( `
2024-11-27 11:30:55 +08:00
` )&&(cm=mm=_m(cm.line,0)));var Im={from:cm,to:mm,text:th?th[Hh%th.length]:Kf,origin:df||(Ff?"paste":Dd.state.cutIncoming>kf?"cut":"+input")};Sv(Dd.doc,Im),Wd(Dd,"inputRead",Dd,Im)}jd&&!Ff&&ty(Dd,jd),J_(Dd),Dd.curOp.updateInput<2&&(Dd.curOp.updateInput=Ah),Dd.curOp.typing=!0,Dd.state.pasteIncoming=Dd.state.cutIncoming=-1}function U0(Dd,jd){var Kd=Dd.clipboardData&&Dd.clipboardData.getData("Text");if(Kd)return Dd.preventDefault(),!jd.isReadOnly()&&!jd.options.disableInput&&jd.hasFocus()&&Ig(jd,function(){return SE(jd,Kd,0,null,"paste")}),!0}function ty(Dd,jd){if(!(!Dd.options.electricChars||!Dd.options.smartIndent))for(var Kd=Dd.doc.sel,Yd=Kd.ranges.length-1;Yd>=0;Yd--){var df=Kd.ranges[Yd];if(!(df.head.ch>100||Yd&&Kd.ranges[Yd-1].head.line==df.head.line)){var Sf=Dd.getModeAt(df.head),kf=!1;if(Sf.electricChars){for(var Ff=0;Ff<Sf.electricChars.length;Ff++)if(jd.indexOf(Sf.electricChars.charAt(Ff))>-1){kf=p1(Dd,df.head.line,"smart");break}}else Sf.electricInput&&Sf.electricInput.test(Om(Dd.doc,df.head.line).text.slice(0,df.head.ch))&&(kf=p1(Dd,df.head.line,"smart"));kf&&Wd(Dd,"electricInput",Dd,df.head.line)}}}function ry(Dd){for(var jd=[],Kd=[],Yd=0;Yd<Dd.doc.sel.ranges.length;Yd++){var df=Dd.doc.sel.ranges[Yd].head.line,Sf={anchor:_m(df,0),head:_m(df+1,0)};Kd.push(Sf),jd.push(Dd.getRange(Sf.anchor,Sf.head))}return{text:jd,ranges:Kd}}function f1(Dd,jd,Kd,Yd){Dd.setAttribute("autocorrect",Kd?"on":"off"),Dd.setAttribute("autocapitalize",Yd?"on":"off"),Dd.setAttribute("spellcheck",!!jd)}function h1(){var Dd=_f("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),jd=_f("div",[Dd],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return pd?Dd.style.width="1000px":Dd.setAttribute("wrap","off"),Od&&(Dd.style.border="1px solid black"),jd}function kv(Dd){var jd=Dd.optionHandlers,Kd=Dd.helpers={};Dd.prototype={constructor:Dd,focus:function(){Xf(this).focus(),this.display.input.focus()},setOption:function(Yd,df){var Sf=this.options,kf=Sf[Yd];Sf[Yd]==df&&Yd!="mode"||(Sf[Yd]=df,jd.hasOwnProperty(Yd)&& $ _(this,jd[Yd])(this,df,kf),Pm(this,"optionChange",this,Yd))},getOption:function(Yd){return this.options[Yd]},getDoc:function(){return this.doc},addKeyMap:function(Yd,df){this.state.keyMaps[df?"push":"unshift"](i1(Yd))},removeKeyMap:function(Yd){for(var df=this.state.keyMaps,Sf=0;Sf<df.length;++Sf)if(df[Sf]==Yd||df[Sf].name==Yd)return df.splice(Sf,1),!0},addOverlay:u_(function(Yd,df){var Sf=Yd.token?Yd:Dd.getMode(this.options,Yd);if(Sf.startState)throw new Error("Overlays may not be stateful.");nh(this.state.overlays,{mode:Sf,modeSpec:Yd,opaque:df&&df.opaque,priority:df&&df.priority||0},function(kf){return kf.priority}),this.state.modeGen++,jg(this)}),removeOverlay:u_(function(Yd){for(var df=this.state.overlays,Sf=0;Sf<df.length;++Sf){var kf=df[Sf].modeSpec;if(kf==Yd||typeof Yd=="string"&&kf.name==Yd){df.splice(Sf,1),this.state.modeGen++,jg(this);return}}}),indentLine:u_(function(Yd,df,Sf){typeof df!="string"&&typeof df!="number"&&(df==null?df=this.options.smartIndent?"smart":"prev":df=df?"add":"subtract"),Zg(this.doc,Yd)&&p1(this,Yd,df,Sf)}),indentSelection:u_(function(Yd){for(var df=this.doc.sel.ranges,Sf=-1,kf=0;kf<df.length;kf++){var Ff=df[kf];if(Ff.empty())Ff.head.line>Sf&&(p1(this,Ff.head.line,Yd,!0),Sf=Ff.head.line,kf==this.doc.sel.primIndex&&J_(this));else{var Kf=Ff.from(),th=Ff.to(),bh=Math.max(Sf,Kf.line);Sf=Math.min(this.lastLine(),th.line-(th.ch?0:1))+1;for(var Ah=bh;Ah<Sf;++Ah)p1(this,Ah,Yd);var Hh=this.doc.sel.ranges;Kf.ch==0&&df.length==Hh.length&&Hh[kf].from().ch>0&&u0(this.doc,kf,new k_(Kf,Hh[kf].to()),Vf)}}}),getTokenAt:function(Yd,df){return sb(this,Yd,df)},getLineTokens:function(Yd,df){return sb(this,_m(Yd),df,!0)},getTokenTypeAt:function(Yd){Yd=o_(this.doc,Yd);var df=k0(this,Om(this.doc,Yd.line)),Sf=0,kf=(df.length-1)/2,Ff=Yd.ch,Kf;if(Ff==0)Kf=df[2];else for(;;){var th=Sf+kf>>1;if((th?df[th*2-1]:0)>=Ff)kf=th;else if(df[th*2+1]<Ff)Sf=th+1;else{Kf=df[th*2+2];break}}var bh=Kf?Kf.indexOf("overlay "):-1;return bh<0?Kf:bh==0?null:K
2024-09-25 14:23:53 +08:00
` ,Im=Bh(mm,jh)?"w":Hh&&mm== `
2024-11-27 11:30:55 +08:00
` ?"n":!Hh||/ \s /.test(mm)?null:"p";if(Hh&&!cm&&!Im&&(Im="s"),Ah&&Ah!=Im){Kd<0&&(Kd=1,bh(),jd.sticky="after");break}if(Im&&(Ah=Im),Kd>0&&!bh(!cm))break}var jm=Ev(Dd,jd,Sf,kf,!0);return kg(Sf,jm)&&(jm.hitSide=!0),jm}function m1(Dd,jd,Kd,Yd){var df=Dd.doc,Sf=jd.left,kf;if(Yd=="page"){var Ff=Math.min(Dd.display.wrapper.clientHeight,Xf(Dd).innerHeight||df(Dd).documentElement.clientHeight),Kf=Math.max(Ff-.5*y0(Dd.display),3);kf=(Kd>0?jd.bottom:jd.top)+Kd*Kf}else Yd=="line"&&(kf=Kd>0?jd.bottom+3:jd.top-3);for(var th;th=N_(Dd,Sf,kf),!!th.outside;){if(Kd<0?kf<=0:kf>=df.height){th.hitSide=!0;break}kf+=Kd*5}return th}var M_=function(Dd){this.cm=Dd,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Gf,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};M_.prototype.init=function(Dd){var jd=this,Kd=this,Yd=Kd.cm,df=Kd.div=Dd.lineDiv;df.contentEditable=!0,f1(df,Yd.options.spellcheck,Yd.options.autocorrect,Yd.options.autocapitalize);function Sf(Ff){for(var Kf=Ff.target;Kf;Kf=Kf.parentNode){if(Kf==df)return!0;if(/ \b CodeMirror-(?:line)?widget \b /.test(Kf.className))break}return!1}lm(df,"paste",function(Ff){!Sf(Ff)||e_(Yd,Ff)||U0(Ff,Yd)||dd<=11&&setTimeout( $ _(Yd,function(){return jd.updateFromDOM()}),20)}),lm(df,"compositionstart",function(Ff){jd.composing={data:Ff.data,done:!1}}),lm(df,"compositionupdate",function(Ff){jd.composing||(jd.composing={data:Ff.data,done:!1})}),lm(df,"compositionend",function(Ff){jd.composing&&(Ff.data!=jd.composing.data&&jd.readFromDOMSoon(),jd.composing.done=!0)}),lm(df,"touchstart",function(){return Kd.forceCompositionEnd()}),lm(df,"input",function(){jd.composing||jd.readFromDOMSoon()});function kf(Ff){if(!(!Sf(Ff)||e_(Yd,Ff))){if(Yd.somethingSelected())Z1({lineWise:!1,text:Yd.getSelections()}),Ff.type=="cut"&&Yd.replaceSelection("",null,"cut");else if(Yd.options.lineWiseCopyCut){var Kf=ry(Yd);Z1({lineWise:!0,text:Kf.text}),Ff.type=="cut"&&Yd.operation(function(){Yd.setSelections(Kf.ranges,0,Vf),Yd.replaceSelection("",null,"cut")})}else return;if(Ff.clipboardData){Ff.clipboardData.clearData();var th=c0.text.join( `
2024-09-28 20:51:35 +08:00
` );if(Ff.clipboardData.setData("Text",th),Ff.clipboardData.getData("Text")==th){Ff.preventDefault();return}}var bh=h1(),Ah=bh.firstChild;f1(Ah),Yd.display.lineSpace.insertBefore(bh,Yd.display.lineSpace.firstChild),Ah.value=c0.text.join( `
2024-11-27 11:30:55 +08:00
` );var Hh=Yf(Zf(df));Bf(Ah),setTimeout(function(){Yd.display.lineSpace.removeChild(bh),Hh.focus(),Hh==df&&Kd.showPrimarySelection()},50)}}lm(df,"copy",kf),lm(df,"cut",kf)},M_.prototype.screenReaderLabelChanged=function(Dd){Dd?this.div.setAttribute("aria-label",Dd):this.div.removeAttribute("aria-label")},M_.prototype.prepareSelection=function(){var Dd=Fy(this.cm,!1);return Dd.focus=Yf(Zf(this.div))==this.div,Dd},M_.prototype.showSelection=function(Dd,jd){!Dd||!this.cm.display.view.length||((Dd.focus||jd)&&this.showPrimarySelection(),this.showMultipleSelections(Dd))},M_.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},M_.prototype.showPrimarySelection=function(){var Dd=this.getSelection(),jd=this.cm,Kd=jd.doc.sel.primary(),Yd=Kd.from(),df=Kd.to();if(jd.display.viewTo==jd.display.viewFrom||Yd.line>=jd.display.viewTo||df.line<jd.display.viewFrom){Dd.removeAllRanges();return}var Sf=Sg(jd,Dd.anchorNode,Dd.anchorOffset),kf=Sg(jd,Dd.focusNode,Dd.focusOffset);if(!(Sf&&!Sf.bad&&kf&&!kf.bad&&s_(Gg(Sf,kf),Yd)==0&&s_(m0(Sf,kf),df)==0)){var Ff=jd.display.view,Kf=Yd.line>=jd.display.viewFrom&&Eb(jd,Yd)||{node:Ff[0].measure.map[2],offset:0},th=df.line<jd.display.viewTo&&Eb(jd,df);if(!th){var bh=Ff[Ff.length-1].measure,Ah=bh.maps?bh.maps[bh.maps.length-1]:bh.map;th={node:Ah[Ah.length-1],offset:Ah[Ah.length-2]-Ah[Ah.length-3]}}if(!Kf||!th){Dd.removeAllRanges();return}var Hh=Dd.rangeCount&&Dd.getRangeAt(0),jh;try{jh=xf(Kf.node,Kf.offset,th.offset,th.node)}catch{}jh&&(!nd&&jd.state.focused?(Dd.collapse(Kf.node,Kf.offset),jh.collapsed||(Dd.removeAllRanges(),Dd.addRange(jh))):(Dd.removeAllRanges(),Dd.addRange(jh)),Hh&&Dd.anchorNode==null?Dd.addRange(Hh):nd&&this.startGracePeriod()),this.rememberSelection()}},M_.prototype.startGracePeriod=function(){var Dd=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){Dd.gracePeriod=!1,Dd.selectionChanged()&&Dd.cm.operation(function(){return Dd.cm.curOp.selectionChanged=!0})},20)},M_.prototype.showMultipleSelections=function(Dd){yf(this.cm.display.cursorDiv,Dd.cursors),yf(this.cm.display.selectionDiv,Dd.selection)},M_.prototype.rememberSelection=function(){var Dd=this.getSelection();this.lastAnchorNode=Dd.anchorNode,this.lastAnchorOffset=Dd.anchorOffset,this.lastFocusNode=Dd.focusNode,this.lastFocusOffset=Dd.focusOffset},M_.prototype.selectionInEditor=function(){var Dd=this.getSelection();if(!Dd.rangeCount)return!1;var jd=Dd.getRangeAt(0).commonAncestorContainer;return Mf(this.div,jd)},M_.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||Yf(Zf(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},M_.prototype.blur=function(){this.div.blur()},M_.prototype.getField=function(){return this.div},M_.prototype.supportsTouch=function(){return!0},M_.prototype.receivedFocus=function(){var Dd=this,jd=this;this.selectionInEditor()?setTimeout(function(){return Dd.pollSelection()},20):Ig(this.cm,function(){return jd.cm.curOp.selectionChanged=!0});function Kd(){jd.cm.state.focused&&(jd.pollSelection(),jd.polling.set(jd.cm.options.pollInterval,Kd))}this.polling.set(this.cm.options.pollInterval,Kd)},M_.prototype.selectionChanged=function(){var Dd=this.getSelection();return Dd.anchorNode!=this.lastAnchorNode||Dd.anchorOffset!=this.lastAnchorOffset||Dd.focusNode!=this.lastFocusNode||Dd.focusOffset!=this.lastFocusOffset},M_.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var Dd=this.getSelection(),jd=this.cm;if(kd&&Td&&this.cm.display.gutterSpecs.length&&nT(Dd.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Kd=Sg(jd,Dd.anchorNode,Dd.anchorOffset),Yd=Sg(jd,Dd.focusNode,Dd.focusOffset);Kd&&Yd&&Ig(jd,function(){wg(jd.doc,hb(Kd,Yd),Vf),(Kd.bad||Yd.bad)&&(jd.curOp.selectionChanged=!0)})}}},M_.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMT
` ),Bf(df))}else return;kf.type=="cut"&&(Yd.state.cutIncoming=+new Date)}}lm(df,"cut",Sf),lm(df,"copy",Sf),lm(Dd.scroller,"paste",function(kf){if(!(R_(Dd,kf)||e_(Yd,kf))){if(!df.dispatchEvent){Yd.state.pasteIncoming=+new Date,Kd.focus();return}var Ff=new Event("paste");Ff.clipboardData=kf.clipboardData,df.dispatchEvent(Ff)}}),lm(Dd.lineSpace,"selectstart",function(kf){R_(Dd,kf)||Zm(kf)}),lm(df,"compositionstart",function(){var kf=Yd.getCursor("from");Kd.composing&&Kd.composing.range.clear(),Kd.composing={start:kf,range:Yd.markText(kf,Yd.getCursor("to"),{className:"CodeMirror-composing"})}}),lm(df,"compositionend",function(){Kd.composing&&(Kd.poll(),Kd.composing.range.clear(),Kd.composing=null)})},ag.prototype.createField=function(Dd){this.wrapper=h1(),this.textarea=this.wrapper.firstChild;var jd=this.cm.options;f1(this.textarea,jd.spellcheck,jd.autocorrect,jd.autocapitalize)},ag.prototype.screenReaderLabelChanged=function(Dd){Dd?this.textarea.setAttribute("aria-label",Dd):this.textarea.removeAttribute("aria-label")},ag.prototype.prepareSelection=function(){var Dd=this.cm,jd=Dd.display,Kd=Dd.doc,Yd=Fy(Dd);if(Dd.options.moveInputWithCursor){var df=Zh(Dd,Kd.sel.primary().head,"div"),Sf=jd.wrapper.getBoundingClientRect(),kf=jd.lineDiv.getBoundingClientRect();Yd.teTop=Math.max(0,Math.min(jd.wrapper.clientHeight-10,df.top+kf.top-Sf.top)),Yd.teLeft=Math.max(0,Math.min(jd.wrapper.clientWidth-10,df.left+kf.left-Sf.left))}return Yd},ag.prototype.showSelection=function(Dd){var jd=this.cm,Kd=jd.display;yf(Kd.cursorDiv,Dd.cursors),yf(Kd.selectionDiv,Dd.selection),Dd.teTop!=null&&(this.wrapper.style.top=Dd.teTop+"px",this.wrapper.style.left=Dd.teLeft+"px")},ag.prototype.reset=function(Dd){if(!(this.contextMenuPending||this.composing&&Dd)){var jd=this.cm;if(this.resetting=!0,jd.somethingSelected()){this.prevInput="";var Kd=jd.getSelection();this.textarea.value=Kd,jd.state.focused&&Bf(this.textarea),cd&&dd>=9&&(this.hasSelection=Kd)}else Dd||(this.prevInput=this.textarea.value="",cd&&dd>=9&&(this.hasSelection=null));this.resetting=!1}},ag.prototype.getField=function(){return this.textarea},ag.prototype.supportsTouch=function(){return!1},ag.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Fd||Yf(Zf(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},ag.prototype.blur=function(){this.textarea.blur()},ag.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ag.prototype.receivedFocus=function(){this.slowPoll()},ag.prototype.slowPoll=function(){var Dd=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){Dd.poll(),Dd.cm.state.focused&&Dd.slowPoll()})},ag.prototype.fastPoll=function(){var Dd=!1,jd=this;jd.pollingFast=!0;function Kd(){var Yd=jd.poll();!Yd&&!Dd?(Dd=!0,jd.polling.set(60,Kd)):(jd.pollingFast=!1,jd.slowPoll())}jd.polling.set(20,Kd)},ag.prototype.poll=function(){var Dd=this,jd=this.cm,Kd=this.textarea,Yd=this.prevInput;if(this.contextMenuPending||this.resetting||!jd.state.focused||ch(Kd)&&!Yd&&!this.composing||jd.isReadOnly()||jd.options.disableInput||jd.state.keySeq)return!1;var df=Kd.value;if(df==Yd&&!jd.somethingSelected())return!1;if(cd&&dd>=9&&this.hasSelection===df||Ud&&/[ \u f700- \u f7ff]/.test(df))return jd.display.input.reset(),!1;if(jd.doc.sel==jd.display.selForContextMenu){var Sf=df.charCodeAt(0);if(Sf==8203&&!Yd&&(Yd=" "),Sf==8666)return this.reset(),this.cm.execCommand("undo")}for(var kf=0,Ff=Math.min(Yd.length,df.length);kf<Ff&&Yd.charCodeAt(kf)==df.charCodeAt(kf);)++kf;return Ig(jd,function(){SE(jd,df.slice(kf),Yd.length-kf,null,Dd.composing?"*compose":null),df.length>1e3||df.indexOf( `
` )>-1?Kd.value=Dd.prevInput="":Dd.prevInput=df,Dd.composing&&(Dd.composing.range.clear(),Dd.composing.range=jd.markText(Dd.composing.start,jd.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ag.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ag.prototype.onKeyPress=function(){cd&&dd>=9&&(this.hasSelection=null),this.fastPoll()},ag.prototype.onContextMenu=function(Dd){var jd=this,Kd=jd.cm,Yd=Kd.display,df=jd.textarea;jd.contextMenuPending&&jd.contextMenuPending();var Sf=B0(Kd,Dd),kf=Yd.scroller.scrollTop;if(!Sf||Ad)return;var Ff=Kd.options.resetSelectionOnContextMenu;Ff&&Kd.doc.sel.contains(Sf)==-1&& $ _(Kd,wg)(Kd.doc,hb(Sf),Vf);var Kf=df.style.cssText,th=jd.wrapper.style.cssText,bh=jd.wrapper.offsetParent.getBoundingClientRect();jd.wrapper.style.cssText="position: static",df.style.cssText= ` position : absolute ; width : 30 px ; height : 30 px ;
top : ` +(Dd.clientY-bh.top-5)+"px; left: "+(Dd.clientX-bh.left-5)+ ` px ;
2024-09-25 14:23:53 +08:00
z - index : 1000 ; background : ` +(cd?"rgba(255, 255, 255, .05)":"transparent")+ ` ;
2024-11-27 11:30:55 +08:00
outline : none ; border - width : 0 ; outline : none ; overflow : hidden ; opacity : . 05 ; filter : alpha ( opacity = 5 ) ; ` ;var Ah;pd&&(Ah=df.ownerDocument.defaultView.scrollY),Yd.input.focus(),pd&&df.ownerDocument.defaultView.scrollTo(null,Ah),Yd.input.reset(),Kd.somethingSelected()||(df.value=jd.prevInput=" "),jd.contextMenuPending=jh,Yd.selForContextMenu=Kd.doc.sel,clearTimeout(Yd.detectingSelectAll);function Hh(){if(df.selectionStart!=null){var mm=Kd.somethingSelected(),Im=" "+(mm?df.value:"");df.value="⇚",df.value=Im,jd.prevInput=mm?"":" ",df.selectionStart=1,df.selectionEnd=Im.length,Yd.selForContextMenu=Kd.doc.sel}}function jh(){if(jd.contextMenuPending==jh&&(jd.contextMenuPending=!1,jd.wrapper.style.cssText=th,df.style.cssText=Kf,cd&&dd<9&&Yd.scrollbars.setScrollTop(Yd.scroller.scrollTop=kf),df.selectionStart!=null)){(!cd||cd&&dd<9)&&Hh();var mm=0,Im=function(){Yd.selForContextMenu==Kd.doc.sel&&df.selectionStart==0&&df.selectionEnd>0&&jd.prevInput==" "? $ _(Kd,Tv)(Kd):mm++<10?Yd.detectingSelectAll=setTimeout(Im,500):(Yd.selForContextMenu=null,Yd.input.reset())};Yd.detectingSelectAll=setTimeout(Im,200)}}if(cd&&dd>=9&&Hh(),Xd){Q_(Dd);var cm=function(){Rm(window,"mouseup",cm),setTimeout(jh,20)};lm(window,"mouseup",cm)}else setTimeout(jh,50)},ag.prototype.readOnlyChanged=function(Dd){Dd||this.reset(),this.textarea.disabled=Dd=="nocursor",this.textarea.readOnly=!!Dd},ag.prototype.setUneditable=function(){},ag.prototype.needsContentAttribute=!1;function y2(Dd,jd){if(jd=jd?vf(jd):{},jd.value=Dd.value,!jd.tabindex&&Dd.tabIndex&&(jd.tabindex=Dd.tabIndex),!jd.placeholder&&Dd.placeholder&&(jd.placeholder=Dd.placeholder),jd.autofocus==null){var Kd=Yf(Zf(Dd));jd.autofocus=Kd==Dd||Dd.getAttribute("autofocus")!=null&&Kd==document.body}function Yd(){Dd.value=Ff.getValue()}var df;if(Dd.form&&(lm(Dd.form,"submit",Yd),!jd.leaveSubmitMethodAlone)){var Sf=Dd.form;df=Sf.submit;try{var kf=Sf.submit=function(){Yd(),Sf.submit=df,Sf.submit(),Sf.submit=kf}}catch{}}jd.finishInit=function(Kf){Kf.save=Yd,Kf.getTextArea=function(){return Dd},Kf.toTextArea=function(){Kf.toTextArea=isNaN,Yd(),Dd.parentNode.removeChild(Kf.getWrapperElement()),Dd.style.display="",Dd.form&&(Rm(Dd.form,"submit",Yd),!jd.leaveSubmitMethodAlone&&typeof Dd.form.submit=="function"&&(Dd.form.submit=df))}},Dd.style.display="none";var Ff=D_(function(Kf){return Dd.parentNode.insertBefore(Kf,Dd.nextSibling)},jd);return Ff}function aT(Dd){Dd.off=Rm,Dd.on=lm,Dd.wheelEventPixels=G2,Dd.Doc=Pg,Dd.splitLines=Cf,Dd.countColumn=Pf,Dd.findColumn=wf,Dd.isWordChar=Vh,Dd.Pass=Rf,Dd.signal=Pm,Dd.Line=g0,Dd.changeEnd=mb,Dd.scrollbarModel=Ub,Dd.Pos=_m,Dd.cmpPos=s_,Dd.modes=vh,Dd.mimeModes=kh,Dd.resolveMode=im,Dd.getMode=fm,Dd.modeExtensions=Gm,Dd.extendMode=Nm,Dd.copyState=Ym,Dd.startState=w_,Dd.innerMode=S_,Dd.commands=o1,Dd.keyMap=F0,Dd.keyName=n1,Dd.isModifierKey=z1,Dd.lookupKey=Qg,Dd.normalizeKeyMap=Xg,Dd.StringStream=p_,Dd.SharedTextMarker=Av,Dd.TextMarker=N0,Dd.LineWidget=Yb,Dd.e_preventDefault=Zm,Dd.e_stopPropagation=L_,Dd.e_stop=Q_,Dd.addClass=Qf,Dd.contains=Mf,Dd.rmClass=hf,Dd.keyNames=Tg}TE(D_),kv(D_);var E2="iter insert remove copy getEditor constructor".split(" ");for(var ny in Pg.prototype)Pg.prototype.hasOwnProperty(ny)&&ah(E2,ny)<0&&(D_.prototype[ny]=function(Dd){return function(){return Dd.apply(this.doc,arguments)}}(Pg.prototype[ny]));return A_(Pg),D_.inputStyles={textarea:ag,contenteditable:M_},D_.defineMode=function(Dd){!D_.defaults.mode&&Dd!="null"&&(D_.defaults.mode=Dd),Rh.apply(this,arguments)},D_.defineMIME=mh,D_.defineMode("null",function(){return{token:function(Dd){return Dd.skipToEnd()}}}),D_.defineMIME("text/plain","null"),D_.defineExtension=function(Dd,jd){D_.prototype[Dd]=jd},D_.defineDocExtension=function(Dd,jd){Pg.prototype[Dd]=jd},D_.fromTextArea=y2,aT(D_),D_.version="5.65.18",D_})}(codemirror)),codemirror.exports}var codemirrorExports=requireCodemirror();const CodeMirror=getDefaultExportFromCjs(codemirrorExports),useStore=defineStore("store",()=>{const Ra=useDark(),qa=useToggle(Ra),td=useStorage("isMacCodeBlock",!0),rd=useToggle(td),nd=useStorage("isEditOnLeft",!
2024-09-18 09:46:23 +08:00
< style >
. hljs . code _ _pre > . mac - sign {
2024-11-22 15:41:57 +08:00
display : flex ;
2024-09-18 09:46:23 +08:00
}
< / s t y l e >
2024-11-27 11:30:55 +08:00
` ),Vf+= `
2024-11-22 15:41:57 +08:00
< style >
. code _ _pre {
padding : 0 ! important ;
}
. hljs . code _ _pre code {
display : - webkit - box ;
padding : 0.5 em 1 em 1 em ;
overflow - x : auto ;
text - indent : 0 ;
}
< / s t y l e >
2024-11-27 11:30:55 +08:00
` ,pd.value=Vf},xf=()=>{const Vf=css2json(Hd.value.getValue()),lh=customCssWithTemplate(Vf,Ad.value,customizeTheme(themeMap[fd.value],{fontSize:Rd.value,color:Ad.value}));_f.setOptions({theme:lh}),gf()};onMounted(()=>{const Vf=document.querySelector("#cssEditor");Vf.value=Xd().content;const lh=Ra.value?"darcula":"xq-light";Hd.value=markRaw(CodeMirror.fromTextArea(Vf,{mode:"css",theme:lh,lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,matchBrackets:!0,autofocus:!0,extraKeys:{[ ` $ { shiftKey } - $ { altKey } - F ` ]:function(wf){formatDoc(wf.getValue(),"css").then(Of=>{Xd().content=Of,wf.setValue(Of)})}}})),Hd.value.on("keyup",(Uf,wf)=>{(wf.keyCode>=65&&wf.keyCode<=90||wf.keyCode===189)&&Uf.showHint(wf)}),Hd.value.on("update",()=>{xf(),Xd().content=Hd.value.getValue()})}),watch(Ra,()=>{var lh,Uf;const Vf=Ra.value?"darcula":"xq-light";(Uf=(lh=toRaw(Hd.value))==null?void 0:lh.setOption)==null||Uf.call(lh,"theme",Vf)});const Mf=()=>{sd.value=!1,td.value=!0,fd.value=themeOptions[0].value,Td.value=fontFamilyOptions[0].value,Td.value=fontFamilyOptions[0].value,Sd.value=fontSizeOptions[2].value,Ad.value=colorOptions[0].value,Nd.value=codeBlockThemeOptions[2].value,Ld.value=legendOptions[3].value,zd.value={active:"方案 1",tabs:[{title:"方案 1",name:"方案 1",content:Zd.value||DEFAULT_CSS_CONTENT}]},Hd.value.setValue(DEFAULT_CSS_CONTENT),xf(),gf()},Yf=Vf=>(...lh)=>{Vf(...lh),gf()},Qf=(Vf,lh)=>{const Uf=themeMap[fd.value],wf=Number(Vf.replace("px",""));return customCssWithTemplate(css2json(Xd().content),lh,customizeTheme(Uf,{fontSize:wf,color:lh}))},qf=Yf(Vf=>{_f.setOptions({theme:customCssWithTemplate(css2json(Xd().content),Ad.value,customizeTheme(themeMap[Vf],{fontSize:Rd.value}))}),fd.value=Vf}),Bf=Yf(Vf=>{_f.setOptions({fonts:Vf}),Td.value=Vf}),Df=Yf(Vf=>{const lh=Qf(Vf,Ad.value);_f.setOptions({size:Vf,theme:lh}),Sd.value=Vf}), $ f=Yf(Vf=>{const lh=Qf(Sd.value,Vf);_f.setOptions({theme:lh}),Ad.value=Vf}),Zf=Yf(Vf=>{Nd.value=Vf}),Xf=Yf(Vf=>{Ld.value=Vf}),Tf=Yf(()=>{rd()}),vf=Yf(()=>{ud()}),Pf=Yf(()=>{dd()});return{isDark:Ra,toggleDark:qa,isEditOnLeft:nd,toggleEditOnLeft:ad,isMacCodeBlock:td,isCiteStatus:sd,citeStatusChanged:vf,isUseIndent:cd,useIndentChanged:Pf,output:pd,editor:Od,cssEditor:Hd,theme:fd,fontFamily:Td,fontSize:Sd,primaryColor:Ad,codeBlockTheme:Nd,legend:Ld,editorRefresh:gf,themeChanged:qf,fontChanged:Bf,sizeChanged:Df,colorChanged: $ f,codeBlockThemeChanged:Zf,legendChanged:Xf,macCodeBlockChanged:Tf,formatContent:Fd,exportEditorContent2HTML:()=>{exportHTML(),document.querySelector("#output").innerHTML=pd.value},exportEditorContent2MD:()=>{downloadMD(Od.value.getValue())},importMarkdownContent:()=>{const Vf=document.body,lh=document.createElement("input");lh.type="file",lh.name="filename",lh.accept=".md",lh.onchange=()=>{const Uf=lh.files[0];if(!Uf)return;const wf=new FileReader;wf.readAsText(Uf),wf.onload=Of=>{Od.value.setValue(Of.target.result),ElMessage.success("文档导入成功")}},Vf.appendChild(lh),lh.click(),Vf.removeChild(lh)},resetStyleConfirm:()=>{ElMessageBox.confirm("此操作将丢失本地自定义样式,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0}).then(()=>{Mf(),ElMessage({type:"success",message:"样式重置成功~"})}).catch(()=>{Od.value.focus()})},editorContent:kd,cssContentConfig:zd,addCssContentTab:bf,validatorTabName:yf,setCssEditorValue:Vd,tabChanged:Qd,renameTab:hf}}),useDisplayStore=defineStore("display",()=>{const Ra=ref $ 1(!1),qa=useToggle(Ra),td=ref $ 1(!1),rd=useToggle(td),nd=ref $ 1(!1),ad=useToggle(nd);return{isShowCssEditor:Ra,toggleShowCssEditor:qa,isShowInsertFormDialog:td,toggleShowInsertFormDialog:rd,isShowUploadImgDialog:nd,toggleShowUploadImgDialog:ad}}),_sfc_main $ N=defineComponent({__name:"CssEditor",setup(Ra){const qa=useStore(),td=useDisplayStore();function rd(){ElMessageBox.prompt("请输入新的方案名称","编辑方案名称",{confirmButtonText:"确认",cancelButtonText:"取消",inputValue:qa.cssContentConfig.active,inputErrorMessage:"不能与现有方案重名",inputValidator:qa.validatorTabName}).then(({value:ad})
2024-09-18 09:46:23 +08:00
` )].join( `
2024-11-27 11:30:55 +08:00
` ))}return()=>ad.value||nd.value||ud.value?h $ 1(qa.default({present:ud})[0],{ref:pd=>{const fd= $ e(pd);return typeof(fd==null?void 0:fd.hasAttribute)>"u"||(fd!=null&&fd.hasAttribute("data-radix-popper-content-wrapper")?sd.value=fd.firstElementChild:sd.value=fd),fd}}):null}}),[et,qi]=Q("DialogRoot"),Yi=defineComponent({__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(Ra,{emit:qa}){const td=Ra,rd=ne(td,"open",qa,{defaultValue:td.defaultOpen,passive:td.open===void 0}),nd=ref $ 1(),ad=ref $ 1(),{modal:sd}=toRefs(td);return qi({open:rd,modal:sd,openModal:()=>{rd.value=!0},onOpenChange:ud=>{rd.value=ud},onOpenToggle:()=>{rd.value=!rd.value},contentId:"",titleId:"",descriptionId:"",triggerElement:nd,contentElement:ad}),(ud,cd)=>renderSlot(ud. $ slots,"default",{open:unref(rd)})}}),ht=defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=ja();return(td,rd)=>unref(qa)||td.forceMount?(openBlock(),createBlock(Teleport $ 1,{key:0,to:td.to,disabled:td.disabled},[renderSlot(td. $ slots,"default")],8,["to","disabled"])):createCommentVNode("",!0)}}),_v=defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=Ra;return(td,rd)=>(openBlock(),createBlock(unref(ht),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(td. $ slots,"default")]),_:3},16))}}),Zi="dismissableLayer.pointerDownOutside",Ji="dismissableLayer.focusOutside";function Ll(Ra,qa){const td=qa.closest("[data-dismissable-layer]"),rd=Ra.dataset.dismissableLayer===""?Ra:Ra.querySelector("[data-dismissable-layer]"),nd=Array.from(Ra.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(td&&rd===td||nd.indexOf(rd)<nd.indexOf(td))}function zl(Ra,qa){var td;const rd=((td=qa==null?void 0:qa.value)==null?void 0:td.ownerDocument)??(globalThis==null?void 0:globalThis.document),nd=ref $ 1(!1),ad=ref $ 1(()=>{});return watchEffect(sd=>{if(!qe)return;const ud=async dd=>{const pd=dd.target;if(qa!=null&&qa.value){if(Ll(qa.value,pd)){nd.value=!1;return}if(dd.target&&!nd.value){let fd=function(){Kt(Zi,Ra,Td)};const Td={originalEvent:dd};dd.pointerType==="touch"?(rd.removeEventListener("click",ad.value),ad.value=fd,rd.addEventListener("click",ad.value,{once:!0})):fd()}else rd.removeEventListener("click",ad.value);nd.value=!1}},cd=window.setTimeout(()=>{rd.addEventListener("pointerdown",ud)},0);sd(()=>{window.clearTimeout(cd),rd.removeEventListener("pointerdown",ud),rd.removeEventListener("click",ad.value)})}),{onPointerDownCapture:()=>nd.value=!0}}function Kl(Ra,qa){var td;const rd=((td=qa==null?void 0:qa.value)==null?void 0:td.ownerDocument)??(globalThis==null?void 0:globalThis.document),nd=ref $ 1(!1);return watchEffect(ad=>{if(!qe)return;const sd=async ud=>{qa!=null&&qa.value&&(await nextTick $ 1(),!(!qa.value||Ll(qa.value,ud.target))&&ud.target&&!nd.value&&Kt(Ji,Ra,{originalEvent:ud}))};rd.addEventListener("focusin",sd),ad(()=>rd.removeEventListener("focusin",sd))}),{onFocusCapture:()=>nd.value=!0,onBlurCapture:()=>nd.value=!1}}const je=reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yt=defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(Ra,{emit:qa}){const td=Ra,rd=qa,{forwardRef:nd,currentElement:ad}=R $ 1(),sd=computed(()=>{var Ad;return((Ad=ad.value)==null?void 0:Ad.ownerDocument)??globalThis.document}),ud=computed(()=>je.layersRoot),cd=computed(()=>ad.value?Array.from(ud.value).indexOf(ad.value):-1),dd=computed(()=>je.layersWithOutsidePointerEventsDisabled.size>0),pd=computed(()=>{const Ad=Array.from(ud.value),[Nd]=[...je.layersWithOutsidePointerEventsDisabled].slice(-1),Ld=Ad.indexOf(Nd);return cd.value>=Ld}),fd=zl(async Ad=>{const Nd=[...je.branches].some(Ld=>Ld==null?void 0:Ld.contains(Ad.target));!pd.va
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const toKebabCase=Ra=>Ra.replace(/ ( [ a - z0 - 9 ] ) ( [ A - Z ] ) / g , "$1-$2" ) . toLowerCase ( ) ; / * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /var defaultAttributes={xmlns:"http:/ / www . w3 . org / 2000 / svg ",width:24,height:24,viewBox:" 0 0 24 24 ",fill:" none ",stroke:" currentColor "," stroke - width ":2," stroke - linecap ":" round "," stroke - linejoin ":" round " } ; / * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
2024-09-25 14:23:53 +08:00
* / c o n s t I c o n = ( { s i z e : R a , s t r o k e W i d t h : q a = 2 , a b s o l u t e S t r o k e W i d t h : t d , c o l o r : r d , i c o n N o d e : n d , n a m e : a d , c l a s s : s d , . . . u d } , { s l o t s : c d } ) = > h $ 1 ( " s v g " , { . . . d e f a u l t A t t r i b u t e s , w i d t h : R a | | d e f a u l t A t t r i b u t e s . w i d t h , h e i g h t : R a | | d e f a u l t A t t r i b u t e s . h e i g h t , s t r o k e : r d | | d e f a u l t A t t r i b u t e s . s t r o k e , " s t r o k e - w i d t h " : t d ? N u m b e r ( q a ) * 2 4 / N u m b e r ( R a ) : q a , c l a s s : [ " l u c i d e " , ` l u c i d e - $ { t o K e b a b C a s e ( a d ? ? " i c o n " ) } ` ] , . . . u d } , [ . . . n d . m a p ( d d = > h $ 1 ( . . . d d ) ) , . . . c d . d e f a u l t ? [ c d . d e f a u l t ( ) ] : [ ] ] ) ; / * *
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
2024-09-25 14:23:53 +08:00
* /const createLucideIcon=(Ra,qa)=>(td,{slots:rd})=>h$1(Icon,{...td,iconNode:qa,name:Ra},rd);/ * *
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Check=createLucideIcon("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const ChevronDown=createLucideIcon("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const ChevronRight=createLucideIcon("ChevronRightIcon",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const ChevronUp=createLucideIcon("ChevronUpIcon",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const CloudUpload=createLucideIcon("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Moon=createLucideIcon("MoonIcon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Paintbrush=createLucideIcon("PaintbrushIcon",[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Sun=createLucideIcon("SunIcon",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Table=createLucideIcon("TableIcon",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/ * *
2024-09-25 14:23:53 +08:00
* @ license lucide - vue - next v0 . 445.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
2024-11-27 11:30:55 +08:00
* / c o n s t X = c r e a t e L u c i d e I c o n ( " X I c o n " , [ [ " p a t h " , { d : " M 1 8 6 6 1 8 " , k e y : " 1 b l 5 f 8 " } ] , [ " p a t h " , { d : " m 6 6 1 2 1 2 " , k e y : " d 8 b k 6 v " } ] ] ) , _ s f c _ m a i n $ K = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r C o n t e n t " , p r o p s : { f o r c e M o u n t : { t y p e : B o o l e a n } , l o o p : { t y p e : B o o l e a n } , s i d e : { } , s i d e O f f s e t : { d e f a u l t : 8 } , a l i g n : { d e f a u l t : " s t a r t " } , a l i g n O f f s e t : { d e f a u l t : - 4 } , a v o i d C o l l i s i o n s : { t y p e : B o o l e a n } , c o l l i s i o n B o u n d a r y : { } , c o l l i s i o n P a d d i n g : { } , a r r o w P a d d i n g : { } , s t i c k y : { } , h i d e W h e n D e t a c h e d : { t y p e : B o o l e a n } , u p d a t e P o s i t i o n S t r a t e g y : { } , p r i o r i t i z e P o s i t i o n : { t y p e : B o o l e a n } , a s C h i l d : { t y p e : B o o l e a n } , a s : { } , c l a s s : { } } , s e t u p ( R a ) { c o n s t q a = R a , t d = c o m p u t e d ( ( ) = > { c o n s t { c l a s s : n d , . . . a d } = q a ; r e t u r n a d } ) , r d = I t ( t d ) ; r e t u r n ( n d , a d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( z h ) , n u l l , { d e f a u l t : w i t h C t x ( ( ) = > [ c r e a t e V N o d e ( u n r e f ( K h ) , m e r g e P r o p s ( u n r e f ( r d ) , { c l a s s : u n r e f ( c n ) ( " z - 5 0 m i n - w - 4 8 o v e r f l o w - h i d d e n r o u n d e d - m d b o r d e r b g - p o p o v e r p - 1 t e x t - p o p o v e r - f o r e g r o u n d s h a d o w - m d d a t a - [ s t a t e = o p e n ] : a n i m a t e - i n d a t a - [ s t a t e = c l o s e d ] : f a d e - o u t - 0 d a t a - [ s t a t e = o p e n ] : f a d e - i n - 0 d a t a - [ s t a t e = c l o s e d ] : z o o m - o u t - 9 5 d a t a - [ s t a t e = o p e n ] : z o o m - i n - 9 5 d a t a - [ s i d e = b o t t o m ] : s l i d e - i n - f r o m - t o p - 2 d a t a - [ s i d e = l e f t ] : s l i d e - i n - f r o m - r i g h t - 2 d a t a - [ s i d e = r i g h t ] : s l i d e - i n - f r o m - l e f t - 2 d a t a - [ s i d e = t o p ] : s l i d e - i n - f r o m - b o t t o m - 2 " , q a . c l a s s ) } ) , { d e f a u l t : w i t h C t x ( ( ) = > [ r e n d e r S l o t ( n d . $ s l o t s , " d e f a u l t " ) ] ) , _ : 3 } , 1 6 , [ " c l a s s " ] ) ] ) , _ : 3 } ) ) } } ) , _ s f c _ m a i n $ J = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r I t e m " , p r o p s : { d i s a b l e d : { t y p e : B o o l e a n } , t e x t V a l u e : { } , a s C h i l d : { t y p e : B o o l e a n } , a s : { } , c l a s s : { } , i n s e t : { t y p e : B o o l e a n } } , e m i t s : [ " s e l e c t " ] , s e t u p ( R a , { e m i t : q a } ) { c o n s t t d = R a , r d = q a , n d = c o m p u t e d ( ( ) = > { c o n s t { c l a s s : s d , . . . u d } = t d ; r e t u r n u d } ) , a d = x e ( n d , r d ) ; r e t u r n ( s d , u d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( W h ) , m e r g e P r o p s ( u n r e f ( a d ) , { c l a s s : u n r e f ( c n ) ( " r e l a t i v e f l e x c u r s o r - d e f a u l t s e l e c t - n o n e i t e m s - c e n t e r r o u n d e d - s m p x - 2 p y - 1 . 5 t e x t - s m o u t l i n e - n o n e f o c u s : b g - a c c e n t f o c u s : t e x t - a c c e n t - f o r e g r o u n d d a t a - [ d i s a b l e d ] : p o i n t e r - e v e n t s - n o n e d a t a - [ d i s a b l e d ] : o p a c i t y - 5 0 " , s d . i n s e t & & " p l - 8 " , t d . c l a s s ) } ) , { d e f a u l t : w i t h C t x ( ( ) = > [ r e n d e r S l o t ( s d . $ s l o t s , " d e f a u l t " ) ] ) , _ : 3 } , 1 6 , [ " c l a s s " ] ) ) } } ) , _ s f c _ m a i n $ I = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r M e n u " , p r o p s : { v a l u e : { } } , s e t u p ( R a ) { c o n s t q a = R a ; r e t u r n ( t d , r d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( N h ) , n o r m a l i z e P r o p s ( g u a r d R e a c t i v e P r o p s ( q a ) ) , { d e f a u l t : w i t h C t x ( ( ) = > [ r e n d e r S l o t ( t d . $ s l o t s , " d e f a u l t " ) ] ) , _ : 3 } , 1 6 ) ) } } ) , _ s f c _ m a i n $ H = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r S e p a r a t o r " , p r o p s : { a s C h i l d : { t y p e : B o o l e a n } , a s : { } , c l a s s : { } } , s e t u p ( R a ) { c o n s t q a = R a , t d = c o m p u t e d ( ( ) = > { c o n s t { c l a s s : n d , . . . a d } = q a ; r e t u r n a d } ) , r d = I t ( t d ) ; r e t u r n ( n d , a d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( U h ) , m e r g e P r o p s ( { c l a s s : u n r e f ( c n ) ( " - m x - 1 m y - 1 h - p x b g - m u t e d " , q a . c l a s s ) } , u n r e f ( r d ) ) , n u l l , 1 6 , [ " c l a s s " ] ) ) } } ) , _ s f c _ m a i n $ G = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r S h o r t c u t " , p r o p s : { c l a s s : { } } , s e t u p ( R a ) { c o n s t q a = R a ; r e t u r n ( t d , r d ) = > ( o p e n B l o c k ( ) , c r e a t e E l e m e n t B l o c k ( " s p a n " , { c l a s s : n o r m a l i z e C l a s s ( u n r e f ( c n ) ( " m l - a u t o t e x t - x s t r a c k i n g - w i d e s t t e x t - m u t e d - f o r e g r o u n d " , q a . c l a s s ) ) } , [ r e n d e r S l o t ( t d . $ s l o t s , " d e f a u l t " ) ] , 2 ) ) } } ) , _ s f c _ m a i n $ F = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r S u b " , p r o p s : { d e f a u l t O p e n : { t y p e : B o o l e a n } , o p e n : { t y p e : B o o l e a n } } , e m i t s : [ " u p d a t e : o p e n " ] , s e t u p ( R a , { e m i t : q a } ) { c o n s t n d = x e ( R a , q a ) ; r e t u r n ( a d , s d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( J h ) , n o r m a l i z e P r o p s ( g u a r d R e a c t i v e P r o p s ( u n r e f ( n d ) ) ) , { d e f a u l t : w i t h C t x ( ( ) = > [ r e n d e r S l o t ( a d . $ s l o t s , " d e f a u l t " ) ] ) , _ : 3 } , 1 6 ) ) } } ) , _ s f c _ m a i n $ E = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r S u b C o n t e n t " , p r o p s : { f o r c e M o u n t : { t y p e : B o o l e a n } , l o o p : { t y p e : B o o l e a n } , s i d e O f f s e t : { } , a l i g n O f f s e t : { } , a v o i d C o l l i s i o n s : { t y p e : B o o l e a n } , c o l l i s i o n B o u n d a r y : { } , c o l l i s i o n P a d d i n g : { } , a r r o w P a d d i n g : { } , s t i c k y : { } , h i d e W h e n D e t a c h e d : { t y p e : B o o l e a n } , u p d a t e P o s i t i o n S t r a t e g y : { } , p r i o r i t i z e P o s i t i o n : { t y p e : B o o l e a n } , a s C h i l d : { t y p e : B o o l e a n } , a s : { } , c l a s s : { } } , e m i t s : [ " e s c a p e K e y D o w n " , " p o i n t e r D o w n O u t s i d e " , " f o c u s O u t s i d e " , " i n t e r a c t O u t s i d e " , " e n t r y F o c u s " , " o p e n A u t o F o c u s " , " c l o s e A u t o F o c u s " ] , s e t u p ( R a , { e m i t : q a } ) { c o n s t t d = R a , r d = q a , n d = c o m p u t e d ( ( ) = > { c o n s t { c l a s s : s d , . . . u d } = t d ; r e t u r n u d } ) , a d = x e ( n d , r d ) ; r e t u r n ( s d , u d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( z h ) , n u l l , { d e f a u l t : w i t h C t x ( ( ) = > [ c r e a t e V N o d e ( u n r e f ( Q h ) , m e r g e P r o p s ( u n r e f ( a d ) , { c l a s s : u n r e f ( c n ) ( " z - 5 0 m i n - w - 3 2 o v e r f l o w - h i d d e n r o u n d e d - m d b o r d e r b g - p o p o v e r p - 1 t e x t - p o p o v e r - f o r e g r o u n d d a t a - [ s t a t e = o p e n ] : a n i m a t e - i n d a t a - [ s t a t e = c l o s e d ] : a n i m a t e - o u t d a t a - [ s t a t e = c l o s e d ] : f a d e - o u t - 0 d a t a - [ s t a t e = o p e n ] : f a d e - i n - 0 d a t a - [ s t a t e = c l
2024-09-25 14:23:53 +08:00
$ { pd }
2024-11-27 11:30:55 +08:00
` ,"end"),ud(),rd()}function dd(pd){pd||rd(!1)}return(pd,fd)=>{const Td=ElInputNumber,Sd=ElCol,Ad=ElRow,Nd=ElInput,Ld=_sfc_main $ M;return openBlock(),createBlock(unref(_sfc_main $ p),{open:unref(td).isShowInsertFormDialog,"onUpdate:open":dd},{default:withCtx(()=>[createVNode(unref(_sfc_main $ o),null,{default:withCtx(()=>[createVNode(unref(_sfc_main $ m),null,{default:withCtx(()=>[createVNode(unref(_sfc_main $ l),null,{default:withCtx(()=>fd[3]||(fd[3]=[createTextVNode("插入表格")])),_:1})]),_:1}),createVNode(Ad,{class:"tb-options",type:"flex",align:"middle",gutter:10},{default:withCtx(()=>[createVNode(Sd,{span:12},{default:withCtx(()=>[fd[4]||(fd[4]=createTextVNode(" 行数: ")),createVNode(Td,{modelValue:nd.value,"onUpdate:modelValue":fd[0]||(fd[0]=Rd=>nd.value=Rd),"controls-position":"right",min:1,max:100,size:"small"},null,8,["modelValue"])]),_:1}),createVNode(Sd,{span:12},{default:withCtx(()=>[fd[5]||(fd[5]=createTextVNode(" 列数: ")),createVNode(Td,{modelValue:ad.value,"onUpdate:modelValue":fd[1]||(fd[1]=Rd=>ad.value=Rd),"controls-position":"right",min:1,max:100,size:"small"},null,8,["modelValue"])]),_:1})]),_:1}),createBaseVNode("table",_hoisted_1 $ 2,[(openBlock(!0),createElementBlock(Fragment,null,renderList(nd.value+1,Rd=>(openBlock(),createElementBlock("tr",{key:Rd,class:normalizeClass({"head-style":Rd===1})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(ad.value,Od=>(openBlock(),createElementBlock("td",{key:Od},[createVNode(Nd,{modelValue:sd.value[ ` k _$ { Rd - 1 } _$ { Od - 1 } ` ],"onUpdate:modelValue":kd=>sd.value[ ` k _$ { Rd - 1 } _$ { Od - 1 } ` ]=kd,align:"center",placeholder:Rd===1?"表头":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])]))),128))],2))),128))]),createVNode(unref(_sfc_main $ n),null,{default:withCtx(()=>[createVNode(Ld,{variant:"outline",onClick:fd[2]||(fd[2]=Rd=>unref(rd)(!1))},{default:withCtx(()=>fd[6]||(fd[6]=[createTextVNode(" 取 消 ")])),_:1}),createVNode(Ld,{onClick:cd},{default:withCtx(()=>fd[7]||(fd[7]=[createTextVNode(" 确 定 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),InsertFormDialog=_export_sfc(_sfc_main $ a,[["__scopeId","data-v-054300b0"]]),_sfc_main $ 9=defineComponent({__name:"UploadImgDialog",emits:["uploadImage"],setup(Ra,{emit:qa}){const td=qa,rd=useDisplayStore(),nd=ref $ 1({repo:"",branch:"",accessToken:""}),ad=ref $ 1({accessKeyId:"",accessKeySecret:"",bucket:"",region:"",path:"",cdnHost:"",useSSL:!0}),sd=ref $ 1({secretId:"",secretKey:"",bucket:"",region:"",path:"",cdnHost:""}),ud=ref $ 1({accessKey:"",secretKey:"",bucket:"",domain:"",region:"",path:""}),cd=ref $ 1({endpoint:"",port:"",useSSL:!0,bucket:"",accessKey:"",secretKey:""}),dd=ref $ 1({code:localStorage.getItem("formCustomConfig")||removeLeft( `
2024-09-18 09:46:23 +08:00
const { file , util , okCb , errCb } = CUSTOM _ARG
const param = new FormData ( )
param . append ( 'file' , file )
util . axios . post ( '${window.location.origin}/upload' , param , {
headers : { 'Content-Type' : 'multipart/form-data' }
} ) . then ( res => {
okCb ( res . url )
} ) . catch ( err => {
errCb ( err )
} )
2024-11-27 11:30:55 +08:00
` ).trim(),editor:null}),pd=[{value:"default",label:"默认"},{value:"github",label:"GitHub"},{value:"aliOSS",label:"阿里云"},{value:"txCOS",label:"腾讯云"},{value:"qiniu",label:"七牛云"},{value:"minio",label:"MinIO"},{value:"formCustom",label:"自定义代码"}],fd=ref $ 1("default"),Td=ref $ 1(null),Sd=ref $ 1("upload");watch(Sd,async Vd=>{Vd==="formCustom"&&nextTick $ 1(()=>{var zd;const Zd=Td.value. $ el.querySelector("textarea");(zd=dd.value).editor||(zd.editor=CodeMirror.fromTextArea(Zd,{mode:"javascript"}))})},{immediate:!0}),onBeforeMount(()=>{localStorage.getItem("githubConfig")&&(nd.value=JSON.parse(localStorage.getItem("githubConfig"))),localStorage.getItem("aliOSSConfig")&&(ad.value=JSON.parse(localStorage.getItem("aliOSSConfig"))),localStorage.getItem("txCOSConfig")&&(sd.value=JSON.parse(localStorage.getItem("txCOSConfig"))),localStorage.getItem("qiniuConfig")&&(ud.value=JSON.parse(localStorage.getItem("qiniuConfig"))),localStorage.getItem("minioConfig")&&(cd.value=JSON.parse(localStorage.getItem("minioConfig"))),localStorage.getItem("imgHost")&&(fd.value=localStorage.getItem("imgHost"))});function Ad(){localStorage.setItem("imgHost",fd.value),ElMessage.success("已成功切换图床")}function Nd(){if(!(nd.value.repo&&nd.value.accessToken)){const Vd=nd.value.repo?"token":"GitHub 仓库";ElMessage.error( ` 参数 「 $ { Vd } 」 不能为空 ` );return}localStorage.setItem("githubConfig",JSON.stringify(nd.value)),ElMessage.success("保存成功")}function Ld(){if(!(ad.value.accessKeyId&&ad.value.accessKeySecret&&ad.value.bucket&&ad.value.region)){ElMessage.error("阿里云 OSS 参数配置不全");return}localStorage.setItem("aliOSSConfig",JSON.stringify(ad.value)),ElMessage.success("保存成功")}function Rd(){if(!(cd.value.endpoint&&cd.value.bucket&&cd.value.accessKey&&cd.value.secretKey)){ElMessage.error("MinIO 参数配置不全");return}localStorage.setItem("minioConfig",JSON.stringify(cd.value)),ElMessage.success("保存成功")}function Od(){if(!(sd.value.secretId&&sd.value.secretKey&&sd.value.bucket&&sd.value.region)){ElMessage.error("腾讯云 COS 参数配置不全");return}localStorage.setItem("txCOSConfig",JSON.stringify(sd.value)),ElMessage.success("保存成功")}function kd(){if(!(ud.value.accessKey&&ud.value.secretKey&&ud.value.bucket&&ud.value.domain)){ElMessage.error("七牛云 Kodo 参数配置不全");return}localStorage.setItem("qiniuConfig",JSON.stringify(ud.value)),ElMessage.success("保存成功")}function Fd(){const Vd=dd.value.editor.getValue();localStorage.setItem("formCustomConfig",Vd),ElMessage.success("保存成功")}function Ud(Vd){const Zd=checkImage(Vd);if(!Zd.ok)return ElMessage.error(Zd.msg),!1;let zd=localStorage.getItem("imgHost");zd=zd||"default",localStorage.setItem("imgHost",zd);const Xd=localStorage.getItem( ` $ { zd } Config ` );return zd==="default"||Xd?!0:(ElMessage.error( ` 请先配置 $ { zd } 图床参数 ` ),!1)}function Hd(Vd){td("uploadImage",Vd.file)}return(Vd,Zd)=>{const zd=ElOption,Xd=ElSelect,Qd=ElIcon,hf=ElUpload,bf=ElTabPane,yf=ElInput,_f=ElFormItem,gf=ElLink,xf=ElButton,Mf=ElForm,Yf=ElSwitch,Qf=ElTabs;return openBlock(),createBlock(unref(_sfc_main $ p),{open:unref(rd).isShowUploadImgDialog,"onUpdate:open":Zd[31]||(Zd[31]=qf=>unref(rd).isShowUploadImgDialog=qf)},{default:withCtx(()=>[createVNode(unref(_sfc_main $ o),{class:"max-w-max"},{default:withCtx(()=>[createVNode(unref(_sfc_main $ m),null,{default:withCtx(()=>[createVNode(unref(_sfc_main $ l),null,{default:withCtx(()=>Zd[32]||(Zd[32]=[createTextVNode("本地上传")])),_:1})]),_:1}),createVNode(Qf,{modelValue:Sd.value,"onUpdate:modelValue":Zd[30]||(Zd[30]=qf=>Sd.value=qf)},{default:withCtx(()=>[createVNode(bf,{class:"upload-panel",label:"选择上传",name:"upload"},{default:withCtx(()=>[createVNode(Xd,{modelValue:fd.value,"onUpdate:modelValue":Zd[0]||(Zd[0]=qf=>fd.value=qf),placeholder:"请选择",size:"small",onChange:Ad},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(pd,qf=>createVNode(zd,{key:qf.value,label:qf.label,value:qf.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),creat
2024-09-29 10:14:52 +08:00
` ).forEach(function(sd){nd=sd.indexOf(":"),td=sd.substring(0,nd).trim().toLowerCase(),rd=sd.substring(nd+1).trim(),!(!td||qa[td]&&ignoreDuplicateOf[td])&&(td==="set-cookie"?qa[td]?qa[td].push(rd):qa[td]=[rd]:qa[td]=qa[td]?qa[td]+", "+rd:rd)}),qa}, $ internals=Symbol("internals");function normalizeHeader(Ra){return Ra&&String(Ra).trim().toLowerCase()}function normalizeValue(Ra){return Ra===!1||Ra==null?Ra:utils $ 2.isArray(Ra)?Ra.map(normalizeValue):String(Ra)}function parseTokens(Ra){const qa=Object.create(null),td=/([^ \s ,;=]+) \s *(?:= \s *([^,;]+))?/g;let rd;for(;rd=td.exec(Ra);)qa[rd[1]]=rd[2];return qa}const isValidHeaderName=Ra=>/^[-_a-zA-Z0-9^ ` | ~ , ! # $ % & ' * + . ] + $ / . test ( Ra . trim ( ) ) ; function matchHeaderValue ( Ra , qa , td , rd , nd ) { if ( utils$2 . isFunction ( rd ) ) return rd . call ( this , qa , td ) ; if ( nd && ( qa = td ) , ! ! utils$2 . isString ( qa ) ) { if ( utils$2 . isString ( rd ) ) return qa . indexOf ( rd ) !== - 1 ; if ( utils$2 . isRegExp ( rd ) ) return rd . test ( qa ) } } function formatHeader ( Ra ) { return Ra . trim ( ) . toLowerCase ( ) . replace ( /([a-z\d])(\w*)/g , ( qa , td , rd ) => td . toUpperCase ( ) + rd ) } function buildAccessors ( Ra , qa ) { const td = utils$2 . toCamelCase ( " " + qa ) ; [ "get" , "set" , "has" ] . forEach ( rd => { Object . defineProperty ( Ra , rd + td , { value : function ( nd , ad , sd ) { return this [ rd ] . call ( this , qa , nd , ad , sd ) } , configurable : ! 0 } ) } ) } class AxiosHeaders { constructor ( qa ) { qa && this . set ( qa ) } set ( qa , td , rd ) { const nd = this ; function ad ( ud , cd , dd ) { const pd = normalizeHeader ( cd ) ; if ( ! pd ) throw new Error ( "header name must be a non-empty string" ) ; const fd = utils$2 . findKey ( nd , pd ) ; ( ! fd || nd [ fd ] === void 0 || dd === ! 0 || dd === void 0 && nd [ fd ] !== ! 1 ) && ( nd [ fd || cd ] = normalizeValue ( ud ) ) } const sd = ( ud , cd ) => utils$2 . forEach ( ud , ( dd , pd ) => ad ( dd , pd , cd ) ) ; if ( utils$2 . isPlainObject ( qa ) || qa instanceof this . constructor ) sd ( qa , td ) ; else if ( utils$2 . isString ( qa ) && ( qa = qa . trim ( ) ) && ! isValidHeaderName ( qa ) ) sd ( parseHeaders ( qa ) , td ) ; else if ( utils$2 . isHeaders ( qa ) ) for ( const [ ud , cd ] of qa . entries ( ) ) ad ( cd , ud , rd ) ; else qa != null && ad ( td , qa , rd ) ; return this } get ( qa , td ) { if ( qa = normalizeHeader ( qa ) , qa ) { const rd = utils$2 . findKey ( this , qa ) ; if ( rd ) { const nd = this [ rd ] ; if ( ! td ) return nd ; if ( td === ! 0 ) return parseTokens ( nd ) ; if ( utils$2 . isFunction ( td ) ) return td . call ( this , nd , rd ) ; if ( utils$2 . isRegExp ( td ) ) return td . exec ( nd ) ; throw new TypeError ( "parser must be boolean|regexp|function" ) } } } has ( qa , td ) { if ( qa = normalizeHeader ( qa ) , qa ) { const rd = utils$2 . findKey ( this , qa ) ; return ! ! ( rd && this [ rd ] !== void 0 && ( ! td || matchHeaderValue ( this , this [ rd ] , rd , td ) ) ) } return ! 1 } delete ( qa , td ) { const rd = this ; let nd = ! 1 ; function ad ( sd ) { if ( sd = normalizeHeader ( sd ) , sd ) { const ud = utils$2 . findKey ( rd , sd ) ; ud && ( ! td || matchHeaderValue ( rd , rd [ ud ] , ud , td ) ) && ( delete rd [ ud ] , nd = ! 0 ) } } return utils$2 . isArray ( qa ) ? qa . forEach ( ad ) : ad ( qa ) , nd } clear ( qa ) { const td = Object . keys ( this ) ; let rd = td . length , nd = ! 1 ; for ( ; rd -- ; ) { const ad = td [ rd ] ; ( ! qa || matchHeaderValue ( this , this [ ad ] , ad , qa , ! 0 ) ) && ( delete this [ ad ] , nd = ! 0 ) } return nd } normalize ( qa ) { const td = this , rd = { } ; return utils$2 . forEach ( this , ( nd , ad ) => { const sd = utils$2 . findKey ( rd , ad ) ; if ( sd ) { td [ sd ] = normalizeValue ( nd ) , delete td [ ad ] ; return } const ud = qa ? formatHeader ( ad ) : String ( ad ) . trim ( ) ; ud !== ad && delete td [ ad ] , td [ ud ] = normalizeValue ( nd ) , rd [ ud ] = ! 0 } ) , this } concat ( ... qa ) { return this . constructor . concat ( this , ... qa ) } toJSON ( qa ) { const td = Object . create ( null ) ; return utils$2 . forEach ( this , ( rd , nd ) => { rd != null && rd !== ! 1 && ( td [ nd ] = qa && utils$2 . isArray ( rd ) ? rd . join ( ", " ) : rd ) } ) , td } [ Symbol . iterator ] ( ) { return Object . entries ( this . toJSON ( ) ) [ Symbol . iterator ] ( ) } toString ( ) { return Object . entries ( this . toJSON ( ) ) . map ( ( [ qa , td ] ) => qa + ": " + td ) . join ( `
2024-11-27 11:30:55 +08:00
` )}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(qa){return qa instanceof this?qa:new this(qa)}static concat(qa,...td){const rd=new this(qa);return td.forEach(nd=>rd.set(nd)),rd}static accessor(qa){const rd=(this[ $ internals]=this[ $ internals]={accessors:{}}).accessors,nd=this.prototype;function ad(sd){const ud=normalizeHeader(sd);rd[ud]||(buildAccessors(nd,sd),rd[ud]=!0)}return utils $ 2.isArray(qa)?qa.forEach(ad):ad(qa),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils $ 2.reduceDescriptors(AxiosHeaders.prototype,({value:Ra},qa)=>{let td=qa[0].toUpperCase()+qa.slice(1);return{get:()=>Ra,set(rd){this[td]=rd}}});utils $ 2.freezeMethods(AxiosHeaders);function transformData(Ra,qa){const td=this||defaults $ 1,rd=qa||td,nd=AxiosHeaders.from(rd.headers);let ad=rd.data;return utils $ 2.forEach(Ra,function(ud){ad=ud.call(td,ad,nd.normalize(),qa?qa.status:void 0)}),nd.normalize(),ad}function isCancel(Ra){return!!(Ra&&Ra.__CANCEL__)}function CanceledError(Ra,qa,td){AxiosError.call(this,Ra??"canceled",AxiosError.ERR_CANCELED,qa,td),this.name="CanceledError"}utils $ 2.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(Ra,qa,td){const rd=td.config.validateStatus;!td.status||!rd||rd(td.status)?Ra(td):qa(new AxiosError("Request failed with status code "+td.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(td.status/100)-4],td.config,td.request,td))}function parseProtocol(Ra){const qa=/^([-+ \w ]{1,25})(:? \/ \/ |:)/.exec(Ra);return qa&&qa[1]||""}function speedometer(Ra,qa){Ra=Ra||10;const td=new Array(Ra),rd=new Array(Ra);let nd=0,ad=0,sd;return qa=qa!==void 0?qa:1e3,function(cd){const dd=Date.now(),pd=rd[ad];sd||(sd=dd),td[nd]=cd,rd[nd]=dd;let fd=ad,Td=0;for(;fd!==nd;)Td+=td[fd++],fd=fd%Ra;if(nd=(nd+1)%Ra,nd===ad&&(ad=(ad+1)%Ra),dd-sd<qa)return;const Sd=pd&&dd-pd;return Sd?Math.round(Td*1e3/Sd):void 0}}function throttle(Ra,qa){let td=0,rd=1e3/qa,nd,ad;const sd=(dd,pd=Date.now())=>{td=pd,nd=null,ad&&(clearTimeout(ad),ad=null),Ra.apply(null,dd)};return[(...dd)=>{const pd=Date.now(),fd=pd-td;fd>=rd?sd(dd,pd):(nd=dd,ad||(ad=setTimeout(()=>{ad=null,sd(nd)},rd-fd)))},()=>nd&&sd(nd)]}const progressEventReducer=(Ra,qa,td=3)=>{let rd=0;const nd=speedometer(50,250);return throttle(ad=>{const sd=ad.loaded,ud=ad.lengthComputable?ad.total:void 0,cd=sd-rd,dd=nd(cd),pd=sd<=ud;rd=sd;const fd={loaded:sd,total:ud,progress:ud?sd/ud:void 0,bytes:cd,rate:dd||void 0,estimated:dd&&ud&&pd?(ud-sd)/dd:void 0,event:ad,lengthComputable:ud!=null,[qa?"download":"upload"]:!0};Ra(fd)},td)},progressEventDecorator=(Ra,qa)=>{const td=Ra!=null;return[rd=>qa[0]({lengthComputable:td,total:Ra,loaded:rd}),qa[1]]},asyncDecorator=Ra=>(...qa)=>utils $ 2.asap(()=>Ra(...qa)),isURLSameOrigin=platform.hasStandardBrowserEnv?function(){const qa=platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent),td=document.createElement("a");let rd;function nd(ad){let sd=ad;return qa&&(td.setAttribute("href",sd),sd=td.href),td.setAttribute("href",sd),{href:td.href,protocol:td.protocol?td.protocol.replace(/: $ /,""):"",host:td.host,search:td.search?td.search.replace(/^ \? /,""):"",hash:td.hash?td.hash.replace(/^#/,""):"",hostname:td.hostname,port:td.port,pathname:td.pathname.charAt(0)==="/"?td.pathname:"/"+td.pathname}}return rd=nd(window.location.href),function(sd){const ud=utils $ 2.isString(sd)?nd(sd):sd;return ud.protocol===rd.protocol&&ud.host===rd.host}}():function(){return function(){return!0}}(),cookies=platform.hasStandardBrowserEnv?{write(Ra,qa,td,rd,nd,ad){const sd=[Ra+"="+encodeURIComponent(qa)];utils $ 2.isNumber(td)&&sd.push("expires="+new Date(td).toGMTString()),utils $ 2.isString(rd)&&sd.push("path="+rd),utils $ 2.isString(nd)&&sd.push("domain="+nd),ad===!0&&sd.push("secure"),document.cookie=sd.join("; ")},read(Ra){const qa=document.cookie.match(new RegExp("(^|; \\ s*)("+Ra+")=([^;]*)"));return qa?decodeURIComponent(qa[3]):null},remove(Ra){this.write(Ra,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(Ra){return/^([a-z][a-z \d + \- .
2024-09-29 10:14:52 +08:00
` +ad.map(renderReason).join( `
` ):" "+renderReason(ad[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+sd,"ERR_NOT_SUPPORT")}return rd},adapters:knownAdapters};function throwIfCancellationRequested(Ra){if(Ra.cancelToken&&Ra.cancelToken.throwIfRequested(),Ra.signal&&Ra.signal.aborted)throw new CanceledError(null,Ra)}function dispatchRequest(Ra){return throwIfCancellationRequested(Ra),Ra.headers=AxiosHeaders.from(Ra.headers),Ra.data=transformData.call(Ra,Ra.transformRequest),["post","put","patch"].indexOf(Ra.method)!==-1&&Ra.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(Ra.adapter||defaults $ 1.adapter)(Ra).then(function(rd){return throwIfCancellationRequested(Ra),rd.data=transformData.call(Ra,Ra.transformResponse,rd),rd.headers=AxiosHeaders.from(rd.headers),rd},function(rd){return isCancel(rd)||(throwIfCancellationRequested(Ra),rd&&rd.response&&(rd.response.data=transformData.call(Ra,Ra.transformResponse,rd.response),rd.response.headers=AxiosHeaders.from(rd.response.headers))),Promise.reject(rd)})}const VERSION="1.7.7",validators $ 1={};["object","boolean","number","function","string","symbol"].forEach((Ra,qa)=>{validators $ 1[Ra]=function(rd){return typeof rd===Ra||"a"+(qa<1?"n ":" ")+Ra}});const deprecatedWarnings={};validators $ 1.transitional=function(qa,td,rd){function nd(ad,sd){return"[Axios v"+VERSION+"] Transitional option '"+ad+"'"+sd+(rd?". "+rd:"")}return(ad,sd,ud)=>{if(qa===!1)throw new AxiosError(nd(sd," has been removed"+(td?" in "+td:"")),AxiosError.ERR_DEPRECATED);return td&&!deprecatedWarnings[sd]&&(deprecatedWarnings[sd]=!0,console.warn(nd(sd," has been deprecated since v"+td+" and will be removed in the near future"))),qa?qa(ad,sd,ud):!0}};function assertOptions(Ra,qa,td){if(typeof Ra!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const rd=Object.keys(Ra);let nd=rd.length;for(;nd-- >0;){const ad=rd[nd],sd=qa[ad];if(sd){const ud=Ra[ad],cd=ud===void 0||sd(ud,ad,Ra);if(cd!==!0)throw new AxiosError("option "+ad+" must be "+cd,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(td!==!0)throw new AxiosError("Unknown option "+ad,AxiosError.ERR_BAD_OPTION)}}const validator $ 3={assertOptions,validators:validators $ 1},validators=validator $ 3.validators;class Axios{constructor(qa){this.defaults=qa,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(qa,td){try{return await this._request(qa,td)}catch(rd){if(rd instanceof Error){let nd;Error.captureStackTrace?Error.captureStackTrace(nd={}):nd=new Error;const ad=nd.stack?nd.stack.replace(/^.+ \n /,""):"";try{rd.stack?ad&&!String(rd.stack).endsWith(ad.replace(/^.+ \n .+ \n /,""))&&(rd.stack+= `
2024-11-27 11:30:55 +08:00
` +ad):rd.stack=ad}catch{}}throw rd}}_request(qa,td){typeof qa=="string"?(td=td||{},td.url=qa):td=qa||{},td=mergeConfig(this.defaults,td);const{transitional:rd,paramsSerializer:nd,headers:ad}=td;rd!==void 0&&validator $ 3.assertOptions(rd,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),nd!=null&&(utils $ 2.isFunction(nd)?td.paramsSerializer={serialize:nd}:validator $ 3.assertOptions(nd,{encode:validators.function,serialize:validators.function},!0)),td.method=(td.method||this.defaults.method||"get").toLowerCase();let sd=ad&&utils $ 2.merge(ad.common,ad[td.method]);ad&&utils $ 2.forEach(["delete","get","head","post","put","patch","common"],Ad=>{delete ad[Ad]}),td.headers=AxiosHeaders.concat(sd,ad);const ud=[];let cd=!0;this.interceptors.request.forEach(function(Nd){typeof Nd.runWhen=="function"&&Nd.runWhen(td)===!1||(cd=cd&&Nd.synchronous,ud.unshift(Nd.fulfilled,Nd.rejected))});const dd=[];this.interceptors.response.forEach(function(Nd){dd.push(Nd.fulfilled,Nd.rejected)});let pd,fd=0,Td;if(!cd){const Ad=[dispatchRequest.bind(this),void 0];for(Ad.unshift.apply(Ad,ud),Ad.push.apply(Ad,dd),Td=Ad.length,pd=Promise.resolve(td);fd<Td;)pd=pd.then(Ad[fd++],Ad[fd++]);return pd}Td=ud.length;let Sd=td;for(fd=0;fd<Td;){const Ad=ud[fd++],Nd=ud[fd++];try{Sd=Ad(Sd)}catch(Ld){Nd.call(this,Ld);break}}try{pd=dispatchRequest.call(this,Sd)}catch(Ad){return Promise.reject(Ad)}for(fd=0,Td=dd.length;fd<Td;)pd=pd.then(dd[fd++],dd[fd++]);return pd}getUri(qa){qa=mergeConfig(this.defaults,qa);const td=buildFullPath(qa.baseURL,qa.url);return buildURL(td,qa.params,qa.paramsSerializer)}}utils $ 2.forEach(["delete","get","head","options"],function(qa){Axios.prototype[qa]=function(td,rd){return this.request(mergeConfig(rd||{},{method:qa,url:td,data:(rd||{}).data}))}});utils $ 2.forEach(["post","put","patch"],function(qa){function td(rd){return function(ad,sd,ud){return this.request(mergeConfig(ud||{},{method:qa,headers:rd?{"Content-Type":"multipart/form-data"}:{},url:ad,data:sd}))}}Axios.prototype[qa]=td(),Axios.prototype[qa+"Form"]=td(!0)});class CancelToken{constructor(qa){if(typeof qa!="function")throw new TypeError("executor must be a function.");let td;this.promise=new Promise(function(ad){td=ad});const rd=this;this.promise.then(nd=>{if(!rd._listeners)return;let ad=rd._listeners.length;for(;ad-- >0;)rd._listeners[ad](nd);rd._listeners=null}),this.promise.then=nd=>{let ad;const sd=new Promise(ud=>{rd.subscribe(ud),ad=ud}).then(nd);return sd.cancel=function(){rd.unsubscribe(ad)},sd},qa(function(ad,sd,ud){rd.reason||(rd.reason=new CanceledError(ad,sd,ud),td(rd.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(qa){if(this.reason){qa(this.reason);return}this._listeners?this._listeners.push(qa):this._listeners=[qa]}unsubscribe(qa){if(!this._listeners)return;const td=this._listeners.indexOf(qa);td!==-1&&this._listeners.splice(td,1)}toAbortSignal(){const qa=new AbortController,td=rd=>{qa.abort(rd)};return this.subscribe(td),qa.signal.unsubscribe=()=>this.unsubscribe(td),qa.signal}static source(){let qa;return{token:new CancelToken(function(nd){qa=nd}),cancel:qa}}}function spread(Ra){return function(td){return Ra.apply(null,td)}}function isAxiosError(Ra){return utils $ 2.isObject(Ra)&&Ra.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,Ex
` ).forEach(function(Rd){if(Rd){var Od=Rd.indexOf(":"),kd=Rd.substr(0,Od).trim().toLowerCase(),Fd=Rd.substr(Od+1).trim();Nd[kd]=Fd}}),{error:Td,statusCode:Sd.status,statusMessage:Sd.statusText,headers:Nd,body:Ad}},dd=function(Td,Sd){return!Sd&&Sd==="text"?Td.responseText:Td.response},pd=function(Td,Sd){var Ad=(Td.method||"GET").toUpperCase(),Nd=Td.url;if(Td.qs){var Ld=ud(Td.qs);Ld&&(Nd+=(Nd.indexOf("?")===-1?"?":"&")+Ld)}var Rd=new XMLHttpRequest;if(Rd.open(Ad,Nd,!0),Rd.responseType=Td.dataType||"text",Td.xhrFields)for(var Od in Td.xhrFields)Rd[Od]=Td.xhrFields[Od];var kd=Td.headers;if(kd)for(var Fd in kd)kd.hasOwnProperty(Fd)&&Fd.toLowerCase()!=="content-length"&&Fd.toLowerCase()!=="user-agent"&&Fd.toLowerCase()!=="origin"&&Fd.toLowerCase()!=="host"&&Rd.setRequestHeader(Fd,kd[Fd]);return Td.onProgress&&Rd.upload&&(Rd.upload.onprogress=Td.onProgress),Td.onDownloadProgress&&(Rd.onprogress=Td.onDownloadProgress),Td.timeout&&(Rd.timeout=Td.timeout),Rd.ontimeout=function(Ud){var Hd=new Error("timeout");Sd(cd(Hd,Rd))},Rd.onload=function(){Sd(cd(null,Rd,dd(Rd,Td.dataType)))},Rd.onerror=function(Ud){var Hd=dd(Rd,Td.dataType);if(Hd)Sd(cd(null,Rd,Hd));else{var Vd=Rd.statusText;!Vd&&Rd.status===0&&(Vd=new Error("CORS blocked or network error")),Sd(cd(Vd,Rd,Hd))}},Rd.send(Td.body||""),Rd};td.exports=pd},"./node_modules/@babel/runtime/helpers/classCallCheck.js":function(td,rd){function nd(ad,sd){if(!(ad instanceof sd))throw new TypeError("Cannot call a class as a function")}td.exports=nd,td.exports.__esModule=!0,td.exports.default=td.exports},"./node_modules/@babel/runtime/helpers/createClass.js":function(td,rd,nd){var ad=nd("./node_modules/@babel/runtime/helpers/toPropertyKey.js");function sd(cd,dd){for(var pd=0;pd<dd.length;pd++){var fd=dd[pd];fd.enumerable=fd.enumerable||!1,fd.configurable=!0,"value"in fd&&(fd.writable=!0),Object.defineProperty(cd,ad(fd.key),fd)}}function ud(cd,dd,pd){return dd&&sd(cd.prototype,dd),pd&&sd(cd,pd),Object.defineProperty(cd,"prototype",{writable:!1}),cd}td.exports=ud,td.exports.__esModule=!0,td.exports.default=td.exports},"./node_modules/@babel/runtime/helpers/toPrimitive.js":function(td,rd,nd){var ad=nd("./node_modules/@babel/runtime/helpers/typeof.js").default;function sd(ud,cd){if(ad(ud)!=="object"||ud===null)return ud;var dd=ud[Symbol.toPrimitive];if(dd!==void 0){var pd=dd.call(ud,cd||"default");if(ad(pd)!=="object")return pd;throw new TypeError("@@toPrimitive must return a primitive value.")}return(cd==="string"?String:Number)(ud)}td.exports=sd,td.exports.__esModule=!0,td.exports.default=td.exports},"./node_modules/@babel/runtime/helpers/toPropertyKey.js":function(td,rd,nd){var ad=nd("./node_modules/@babel/runtime/helpers/typeof.js").default,sd=nd("./node_modules/@babel/runtime/helpers/toPrimitive.js");function ud(cd){var dd=sd(cd,"string");return ad(dd)==="symbol"?dd:String(dd)}td.exports=ud,td.exports.__esModule=!0,td.exports.default=td.exports},"./node_modules/@babel/runtime/helpers/typeof.js":function(td,rd){function nd(ad){"@babel/helpers - typeof";return td.exports=nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(sd){return typeof sd}:function(sd){return sd&&typeof Symbol=="function"&&sd.constructor===Symbol&&sd!==Symbol.prototype?"symbol":typeof sd},td.exports.__esModule=!0,td.exports.default=td.exports,nd(ad)}td.exports=nd,td.exports.__esModule=!0,td.exports.default=td.exports},"./node_modules/fast-xml-parser/src/fxp.js":function(td,rd,nd){const ad=nd("./node_modules/fast-xml-parser/src/validator.js"),sd=nd("./node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"),ud=nd("./node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js");td.exports={XMLParser:sd,XMLValidator:ad,XMLBuilder:ud}},"./node_modules/fast-xml-parser/src/util.js":function(td,rd,nd){const ad=":A-Za-z_ \\ u00C0- \\ u00D6 \\ u00D8- \\ u00F6 \\ u00F8- \\ u02FF \\ u0370- \\ u037D \\ u037F- \\ u1FFF \\ u200C- \\ u200D \\ u2070- \\ u218F \\ u2C00- \\ u2FEF \\ u3001- \\ uD7FF \\ uF900- \\ uFDCF \\ uFDF0- \\ uFFFD",sd=ad+" \\ -. \\ d \\ u00B7 \\ u0300- \\ u036F \\ u203F- \\ u2040",ud="["+ad+"]["+sd+"]*",cd=new RegExp("^"+ud+" $ "),dd=function(fd,Td){const Sd=[];l
` &&Hd[Qd]!==" \r ";Qd++)yf+=Hd[Qd];if(yf=yf.trim(),yf[yf.length-1]==="/"&&(yf=yf.substring(0,yf.length-1),Qd--),!kd(yf)){let xf;return yf.trim().length===0?xf="Invalid space after '<'.":xf="Tag '"+yf+"' is an invalid name.",Rd("InvalidTag",xf,Fd(Hd,Qd))}const _f=Td(Hd,Qd);if(_f===!1)return Rd("InvalidAttr","Attributes for '"+yf+"' have open quote.",Fd(Hd,Qd));let gf=_f.value;if(Qd=_f.index,gf[gf.length-1]==="/"){const xf=Qd-gf.length;gf=gf.substring(0,gf.length-1);const Mf=Ad(gf,Vd);if(Mf===!0)zd=!0;else return Rd(Mf.err.code,Mf.err.msg,Fd(Hd,xf+Mf.err.line))}else if(bf)if(_f.tagClosed){if(gf.trim().length>0)return Rd("InvalidTag","Closing tag '"+yf+"' can't have attributes or invalid starting.",Fd(Hd,hf));if(Zd.length===0)return Rd("InvalidTag","Closing tag '"+yf+"' has not been opened.",Fd(Hd,hf));{const xf=Zd.pop();if(yf!==xf.tagName){let Mf=Fd(Hd,xf.tagStartPos);return Rd("InvalidTag","Expected closing tag '"+xf.tagName+"' (opened in line "+Mf.line+", col "+Mf.col+") instead of closing tag '"+yf+"'.",Fd(Hd,hf))}Zd.length==0&&(Xd=!0)}}else return Rd("InvalidTag","Closing tag '"+yf+"' doesn't have proper closing.",Fd(Hd,Qd));else{const xf=Ad(gf,Vd);if(xf!==!0)return Rd(xf.err.code,xf.err.msg,Fd(Hd,Qd-gf.length+xf.err.line));if(Xd===!0)return Rd("InvalidXml","Multiple possible root nodes found.",Fd(Hd,Qd));Vd.unpairedTags.indexOf(yf)!==-1||Zd.push({tagName:yf,tagStartPos:hf}),zd=!0}for(Qd++;Qd<Hd.length;Qd++)if(Hd[Qd]==="<")if(Hd[Qd+1]==="!"){Qd++,Qd=dd(Hd,Qd);continue}else if(Hd[Qd+1]==="?"){if(Qd=cd(Hd,++Qd),Qd.err)return Qd}else break;else if(Hd[Qd]==="&"){const xf=Ld(Hd,Qd);if(xf==-1)return Rd("InvalidChar","char '&' is not expected.",Fd(Hd,Qd));Qd=xf}else if(Xd===!0&&!ud(Hd[Qd]))return Rd("InvalidXml","Extra text at the end",Fd(Hd,Qd));Hd[Qd]==="<"&&Qd--}}else{if(ud(Hd[Qd]))continue;return Rd("InvalidChar","char '"+Hd[Qd]+"' is not expected.",Fd(Hd,Qd))}if(zd){if(Zd.length==1)return Rd("InvalidTag","Unclosed tag '"+Zd[0].tagName+"'.",Fd(Hd,Zd[0].tagStartPos));if(Zd.length>0)return Rd("InvalidXml","Invalid '"+JSON.stringify(Zd.map(Qd=>Qd.tagName),null,4).replace(/ \r ? \n /g,"")+"' found.",{line:1,col:1})}else return Rd("InvalidXml","Start tag expected.",1);return!0};function ud(Hd){return Hd===" "||Hd===" "||Hd=== `
` ||Hd===" \r "}function cd(Hd,Vd){const Zd=Vd;for(;Vd<Hd.length;Vd++)if(Hd[Vd]=="?"||Hd[Vd]==" "){const zd=Hd.substr(Zd,Vd-Zd);if(Vd>5&&zd==="xml")return Rd("InvalidXml","XML declaration allowed only at the start of the document.",Fd(Hd,Vd));if(Hd[Vd]=="?"&&Hd[Vd+1]==">"){Vd++;break}else continue}return Vd}function dd(Hd,Vd){if(Hd.length>Vd+5&&Hd[Vd+1]==="-"&&Hd[Vd+2]==="-"){for(Vd+=3;Vd<Hd.length;Vd++)if(Hd[Vd]==="-"&&Hd[Vd+1]==="-"&&Hd[Vd+2]===">"){Vd+=2;break}}else if(Hd.length>Vd+8&&Hd[Vd+1]==="D"&&Hd[Vd+2]==="O"&&Hd[Vd+3]==="C"&&Hd[Vd+4]==="T"&&Hd[Vd+5]==="Y"&&Hd[Vd+6]==="P"&&Hd[Vd+7]==="E"){let Zd=1;for(Vd+=8;Vd<Hd.length;Vd++)if(Hd[Vd]==="<")Zd++;else if(Hd[Vd]===">"&&(Zd--,Zd===0))break}else if(Hd.length>Vd+9&&Hd[Vd+1]==="["&&Hd[Vd+2]==="C"&&Hd[Vd+3]==="D"&&Hd[Vd+4]==="A"&&Hd[Vd+5]==="T"&&Hd[Vd+6]==="A"&&Hd[Vd+7]==="["){for(Vd+=8;Vd<Hd.length;Vd++)if(Hd[Vd]==="]"&&Hd[Vd+1]==="]"&&Hd[Vd+2]===">"){Vd+=2;break}}return Vd}const pd='"',fd="'";function Td(Hd,Vd){let Zd="",zd="",Xd=!1;for(;Vd<Hd.length;Vd++){if(Hd[Vd]===pd||Hd[Vd]===fd)zd===""?zd=Hd[Vd]:zd!==Hd[Vd]||(zd="");else if(Hd[Vd]===">"&&zd===""){Xd=!0;break}Zd+=Hd[Vd]}return zd!==""?!1:{value:Zd,index:Vd,tagClosed:Xd}}const Sd=new RegExp( ` ( \ \ s * ) ( [ ^ \ \ s = ] + ) ( \ \ s *= ) ? ( \ \ s * ( [ '"])(([\\s\\S])*?)\\5)?`,"g");function Ad(Hd,Vd){const Zd=ad.getAllMatches(Hd,Sd),zd={};for(let Xd=0;Xd<Zd.length;Xd++){if(Zd[Xd][1].length===0)return Rd("InvalidAttr","Attribute ' "+Zd[Xd][2]+" ' has no space in starting.",Ud(Zd[Xd]));if(Zd[Xd][3]!==void 0&&Zd[Xd][4]===void 0)return Rd("InvalidAttr","Attribute ' "+Zd[Xd][2]+" ' is without value.",Ud(Zd[Xd]));if(Zd[Xd][3]===void 0&&!Vd.allowBooleanAttributes)return Rd("InvalidAttr","boolean attribute ' "+Zd[Xd][2]+" ' is not allowed.",Ud(Zd[Xd]));const Qd=Zd[Xd][2];if(!Od(Qd))return Rd("InvalidAttr","Attribute ' "+Qd+" ' is an invalid name.",Ud(Zd[Xd]));if(!zd.hasOwnProperty(Qd))zd[Qd]=1;else return Rd("InvalidAttr","Attribute ' "+Qd+" ' is repeated.",Ud(Zd[Xd]))}return!0}function Nd(Hd,Vd){let Zd=/\d/;for(Hd[Vd]==="x"&&(Vd++,Zd=/[\da-fA-F]/);Vd<Hd.length;Vd++){if(Hd[Vd]===";")return Vd;if(!Hd[Vd].match(Zd))break}return-1}function Ld(Hd,Vd){if(Vd++,Hd[Vd]===";")return-1;if(Hd[Vd]==="#")return Vd++,Nd(Hd,Vd);let Zd=0;for(;Vd<Hd.length;Vd++,Zd++)if(!(Hd[Vd].match(/\w/)&&Zd<20)){if(Hd[Vd]===";")break;return-1}return Vd}function Rd(Hd,Vd,Zd){return{err:{code:Hd,msg:Vd,line:Zd.line||Zd,col:Zd.col}}}function Od(Hd){return ad.isName(Hd)}function kd(Hd){return ad.isName(Hd)}function Fd(Hd,Vd){const Zd=Hd.substring(0,Vd).split(/\r?\n/);return{line:Zd.length,col:Zd[Zd.length-1].length+1}}function Ud(Hd){return Hd.startIndex+Hd[1].length}},"./node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js":function(td,rd,nd){const ad=nd("./node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"),sd={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(fd,Td){return Td},attributeValueProcessor:function(fd,Td){return Td},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("' "," g "),val:" & apos ; "},{regex:new RegExp('" ' , "g" ) , val : """ } ] , processEntities : ! 0 , stopNodes : [ ] , oneListGroup : ! 1 } ; function ud ( fd ) { this . options = Object . assign ( { } , sd , fd ) , this . options . ignoreAttributes || this . options . attributesGroupName ? this . isAttribute = function ( ) { return ! 1 } : ( this . attrPrefixLen = this . options . attributeNamePrefix . length , this . isAttribute = pd ) , this . processTextOrObjNode = cd , this . options . format ? ( this . indentate = dd , this . tagEndChar = ` >
2024-09-18 09:46:23 +08:00
` ,this.newLine= `
2024-11-27 11:30:55 +08:00
` ):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}ud.prototype.build=function(fd){return this.options.preserveOrder?ad(fd,this.options):(Array.isArray(fd)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(fd={[this.options.arrayNodeName]:fd}),this.j2x(fd,0).val)},ud.prototype.j2x=function(fd,Td){let Sd="",Ad="";for(let Nd in fd)if(Object.prototype.hasOwnProperty.call(fd,Nd))if(typeof fd[Nd]>"u")this.isAttribute(Nd)&&(Ad+="");else if(fd[Nd]===null)this.isAttribute(Nd)?Ad+="":Nd[0]==="?"?Ad+=this.indentate(Td)+"<"+Nd+"?"+this.tagEndChar:Ad+=this.indentate(Td)+"<"+Nd+"/"+this.tagEndChar;else if(fd[Nd]instanceof Date)Ad+=this.buildTextValNode(fd[Nd],Nd,"",Td);else if(typeof fd[Nd]!="object"){const Ld=this.isAttribute(Nd);if(Ld)Sd+=this.buildAttrPairStr(Ld,""+fd[Nd]);else if(Nd===this.options.textNodeName){let Rd=this.options.tagValueProcessor(Nd,""+fd[Nd]);Ad+=this.replaceEntitiesValue(Rd)}else Ad+=this.buildTextValNode(fd[Nd],Nd,"",Td)}else if(Array.isArray(fd[Nd])){const Ld=fd[Nd].length;let Rd="";for(let Od=0;Od<Ld;Od++){const kd=fd[Nd][Od];typeof kd>"u"||(kd===null?Nd[0]==="?"?Ad+=this.indentate(Td)+"<"+Nd+"?"+this.tagEndChar:Ad+=this.indentate(Td)+"<"+Nd+"/"+this.tagEndChar:typeof kd=="object"?this.options.oneListGroup?Rd+=this.j2x(kd,Td+1).val:Rd+=this.processTextOrObjNode(kd,Nd,Td):Rd+=this.buildTextValNode(kd,Nd,"",Td))}this.options.oneListGroup&&(Rd=this.buildObjectNode(Rd,Nd,"",Td)),Ad+=Rd}else if(this.options.attributesGroupName&&Nd===this.options.attributesGroupName){const Ld=Object.keys(fd[Nd]),Rd=Ld.length;for(let Od=0;Od<Rd;Od++)Sd+=this.buildAttrPairStr(Ld[Od],""+fd[Nd][Ld[Od]])}else Ad+=this.processTextOrObjNode(fd[Nd],Nd,Td);return{attrStr:Sd,val:Ad}},ud.prototype.buildAttrPairStr=function(fd,Td){return Td=this.options.attributeValueProcessor(fd,""+Td),Td=this.replaceEntitiesValue(Td),this.options.suppressBooleanAttributes&&Td==="true"?" "+fd:" "+fd+'="'+Td+'"'};function cd(fd,Td,Sd){const Ad=this.j2x(fd,Sd+1);return fd[this.options.textNodeName]!==void 0&&Object.keys(fd).length===1?this.buildTextValNode(fd[this.options.textNodeName],Td,Ad.attrStr,Sd):this.buildObjectNode(Ad.val,Td,Ad.attrStr,Sd)}ud.prototype.buildObjectNode=function(fd,Td,Sd,Ad){if(fd==="")return Td[0]==="?"?this.indentate(Ad)+"<"+Td+Sd+"?"+this.tagEndChar:this.indentate(Ad)+"<"+Td+Sd+this.closeTag(Td)+this.tagEndChar;{let Nd="</"+Td+this.tagEndChar,Ld="";return Td[0]==="?"&&(Ld="?",Nd=""),(Sd||Sd==="")&&fd.indexOf("<")===-1?this.indentate(Ad)+"<"+Td+Sd+Ld+">"+fd+Nd:this.options.commentPropName!==!1&&Td===this.options.commentPropName&&Ld.length===0?this.indentate(Ad)+ ` <!-- $ { fd } -- > ` +this.newLine:this.indentate(Ad)+"<"+Td+Sd+Ld+this.tagEndChar+fd+this.indentate(Ad)+Nd}},ud.prototype.closeTag=function(fd){let Td="";return this.options.unpairedTags.indexOf(fd)!==-1?this.options.suppressUnpairedNode||(Td="/"):this.options.suppressEmptyNode?Td="/":Td= ` > < /${fd}`,Td},ud.prototype.buildTextValNode=function(fd,Td,Sd,Ad){if(this.options.cdataPropName!==!1&&Td===this.options.cdataPropName)return this.indentate(Ad)+`<![CDATA[${fd}]]>`+this.newLine;if(this.options.commentPropName!==!1&&Td===this.options.commentPropName)return this.indentate(Ad)+`<!--${fd}-->`+this.newLine;if(Td[0]==="?")return this.indentate(Ad)+"<"+Td+Sd+"?"+this.tagEndChar;{let Nd=this.options.tagValueProcessor(Td,fd);return Nd=this.replaceEntitiesValue(Nd),Nd===""?this.indentate(Ad)+"<"+Td+Sd+this.closeTag(Td)+this.tagEndChar:this.indentate(Ad)+"<"+Td+Sd+">"+Nd+"</ "+Td+this.tagEndChar}},ud.prototype.replaceEntitiesValue=function(fd){if(fd&&fd.length>0&&this.options.processEntities)for(let Td=0;Td<this.options.entities.length;Td++){const Sd=this.options.entities[Td];fd=fd.replace(Sd.regex,Sd.val)}return fd};function dd(fd){return this.options.indentBy.repeat(fd)}function pd(fd){return fd.startsWith(this.options.attributeNamePrefix)&&fd!==this.options.textNodeName?fd.substr(this.attrPrefixLen):!1}td.exports=ud}," . / node _modules / fast - xml - parser / src / xmlbuilder / orderedJs2Xml . js " : function ( td , rd ) { const nd = `
` ;function ad(fd,Td){let Sd="";return Td.format&&Td.indentBy.length>0&&(Sd=nd),sd(fd,Td,"",Sd)}function sd(fd,Td,Sd,Ad){let Nd="",Ld=!1;for(let Rd=0;Rd<fd.length;Rd++){const Od=fd[Rd],kd=ud(Od);if(kd===void 0)continue;let Fd="";if(Sd.length===0?Fd=kd:Fd= ` $ { Sd } . $ { kd } ` ,kd===Td.textNodeName){let zd=Od[kd];dd(Fd,Td)||(zd=Td.tagValueProcessor(kd,zd),zd=pd(zd,Td)),Ld&&(Nd+=Ad),Nd+=zd,Ld=!1;continue}else if(kd===Td.cdataPropName){Ld&&(Nd+=Ad),Nd+= ` < ! [ CDATA [ $ { Od [ kd ] [ 0 ] [ Td . textNodeName ] } ] ] > ` ,Ld=!1;continue}else if(kd===Td.commentPropName){Nd+=Ad+ ` <!-- $ { Od [ kd ] [ 0 ] [ Td . textNodeName ] } -- > ` ,Ld=!0;continue}else if(kd[0]==="?"){const zd=cd(Od[":@"],Td),Xd=kd==="?xml"?"":Ad;let Qd=Od[kd][0][Td.textNodeName];Qd=Qd.length!==0?" "+Qd:"",Nd+=Xd+ ` < $ { kd } $ { Qd } $ { zd } ? > ` ,Ld=!0;continue}let Ud=Ad;Ud!==""&&(Ud+=Td.indentBy);const Hd=cd(Od[":@"],Td),Vd=Ad+ ` < $ { kd } $ { Hd } ` ,Zd=sd(Od[kd],Td,Fd,Ud);Td.unpairedTags.indexOf(kd)!==-1?Td.suppressUnpairedNode?Nd+=Vd+">":Nd+=Vd+"/>":(!Zd||Zd.length===0)&&Td.suppressEmptyNode?Nd+=Vd+"/>":Zd&&Zd.endsWith(">")?Nd+=Vd+ ` > $ { Zd } $ { Ad } < /${kd}>`:(Nd+=Vd+">",Zd&&Ad!==""&&(Zd.includes("/ > ")||Zd.includes(" < /"))?Nd+=Ad+Td.indentBy+Zd+Ad:Nd+=Zd,Nd+=`</ $ { kd } > ` ),Ld=!0}return Nd}function ud(fd){const Td=Object.keys(fd);for(let Sd=0;Sd<Td.length;Sd++){const Ad=Td[Sd];if(fd.hasOwnProperty(Ad)&&Ad!==":@")return Ad}}function cd(fd,Td){let Sd="";if(fd&&!Td.ignoreAttributes)for(let Ad in fd){if(!fd.hasOwnProperty(Ad))continue;let Nd=Td.attributeValueProcessor(Ad,fd[Ad]);Nd=pd(Nd,Td),Nd===!0&&Td.suppressBooleanAttributes?Sd+= ` $ { Ad . substr ( Td . attributeNamePrefix . length ) } ` :Sd+= ` $ { Ad . substr ( Td . attributeNamePrefix . length ) } = "${Nd}" ` }return Sd}function dd(fd,Td){fd=fd.substr(0,fd.length-Td.textNodeName.length-1);let Sd=fd.substr(fd.lastIndexOf(".")+1);for(let Ad in Td.stopNodes)if(Td.stopNodes[Ad]===fd||Td.stopNodes[Ad]==="*."+Sd)return!0;return!1}function pd(fd,Td){if(fd&&fd.length>0&&Td.processEntities)for(let Sd=0;Sd<Td.entities.length;Sd++){const Ad=Td.entities[Sd];fd=fd.replace(Ad.regex,Ad.val)}return fd}td.exports=ad},"./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js":function(td,rd,nd){const ad=nd("./node_modules/fast-xml-parser/src/util.js");function sd(Ad,Nd){const Ld={};if(Ad[Nd+3]==="O"&&Ad[Nd+4]==="C"&&Ad[Nd+5]==="T"&&Ad[Nd+6]==="Y"&&Ad[Nd+7]==="P"&&Ad[Nd+8]==="E"){Nd=Nd+9;let Rd=1,Od=!1,kd=!1,Fd="";for(;Nd<Ad.length;Nd++)if(Ad[Nd]==="<"&&!kd){if(Od&&dd(Ad,Nd))Nd+=7,[entityName,val,Nd]=ud(Ad,Nd+1),val.indexOf("&")===-1&&(Ld[Sd(entityName)]={regx:RegExp( ` & $ { entityName } ; ` ,"g"),val});else if(Od&&pd(Ad,Nd))Nd+=8;else if(Od&&fd(Ad,Nd))Nd+=8;else if(Od&&Td(Ad,Nd))Nd+=9;else if(cd)kd=!0;else throw new Error("Invalid DOCTYPE");Rd++,Fd=""}else if(Ad[Nd]===">"){if(kd?Ad[Nd-1]==="-"&&Ad[Nd-2]==="-"&&(kd=!1,Rd--):Rd--,Rd===0)break}else Ad[Nd]==="["?Od=!0:Fd+=Ad[Nd];if(Rd!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:Ld,i:Nd}}function ud(Ad,Nd){let Ld="";for(;Nd<Ad.length&&Ad[Nd]!=="'"&&Ad[Nd]!=='"';Nd++)Ld+=Ad[Nd];if(Ld=Ld.trim(),Ld.indexOf(" ")!==-1)throw new Error("External entites are not supported");const Rd=Ad[Nd++];let Od="";for(;Nd<Ad.length&&Ad[Nd]!==Rd;Nd++)Od+=Ad[Nd];return[Ld,Od,Nd]}function cd(Ad,Nd){return Ad[Nd+1]==="!"&&Ad[Nd+2]==="-"&&Ad[Nd+3]==="-"}function dd(Ad,Nd){return Ad[Nd+1]==="!"&&Ad[Nd+2]==="E"&&Ad[Nd+3]==="N"&&Ad[Nd+4]==="T"&&Ad[Nd+5]==="I"&&Ad[Nd+6]==="T"&&Ad[Nd+7]==="Y"}function pd(Ad,Nd){return Ad[Nd+1]==="!"&&Ad[Nd+2]==="E"&&Ad[Nd+3]==="L"&&Ad[Nd+4]==="E"&&Ad[Nd+5]==="M"&&Ad[Nd+6]==="E"&&Ad[Nd+7]==="N"&&Ad[Nd+8]==="T"}function fd(Ad,Nd){return Ad[Nd+1]==="!"&&Ad[Nd+2]==="A"&&Ad[Nd+3]==="T"&&Ad[Nd+4]==="T"&&Ad[Nd+5]==="L"&&Ad[Nd+6]==="I"&&Ad[Nd+7]==="S"&&Ad[Nd+8]==="T"}function Td(Ad,Nd){return Ad[Nd+1]==="!"&&Ad[Nd+2]==="N"&&Ad[Nd+3]==="O"&&Ad[Nd+4]==="T"&&Ad[Nd+5]==="A"&&Ad[Nd+6]==="T"&&Ad[Nd+7]==="I"&&Ad[Nd+8]==="O"&&Ad[Nd+9]==="N"}function Sd(Ad){if(ad.isName(Ad))return Ad;throw new Error( ` Invalid entity name $ { Ad } ` )}td.exports=sd},"./node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js":function(td,rd){const nd={preserveOrd
` );const Xd=new sd("!xml");let Qd=Xd,hf="",bf="";for(let yf=0;yf<zd.length;yf++)if(zd[yf]==="<")if(zd[yf+1]==="/"){const gf=Ud(zd,">",yf,"Closing Tag is not closed.");let xf=zd.substring(yf+2,gf).trim();if(this.options.removeNSPrefix){const Qf=xf.indexOf(":");Qf!==-1&&(xf=xf.substr(Qf+1))}this.options.transformTagName&&(xf=this.options.transformTagName(xf)),Qd&&(hf=this.saveTextToParentTag(hf,Qd,bf));const Mf=bf.substring(bf.lastIndexOf(".")+1);if(xf&&this.options.unpairedTags.indexOf(xf)!==-1)throw new Error( ` Unpaired tag can not be used as closing tag : < /${xf}>`);let Yf=0;Mf&&this.options.unpairedTags.indexOf(Mf)!==-1?(Yf=bf.lastIndexOf(".",bf.lastIndexOf(".")-1),this.tagsNodeStack.pop()):Yf=bf.lastIndexOf("."),bf=bf.substring(0,Yf),Qd=this.tagsNodeStack.pop(),hf="",yf=gf}else if(zd[yf+1]==="?"){let gf=Hd(zd,yf,!1,"?>");if(!gf)throw new Error("Pi Tag is not closed.");if(hf=this.saveTextToParentTag(hf,Qd,bf),!(this.options.ignoreDeclaration&&gf.tagName==="?xml"||this.options.ignorePiTags)){const xf=new sd(gf.tagName);xf.add(this.options.textNodeName,""),gf.tagName!==gf.tagExp&&gf.attrExpPresent&&(xf[":@"]=this.buildAttributesMap(gf.tagExp,bf,gf.tagName)),this.addChild(Qd,xf,bf)}yf=gf.closeIndex+1}else if(zd.substr(yf+1,3)==="!--"){const gf=Ud(zd,"-->",yf+4,"Comment is not closed.");if(this.options.commentPropName){const xf=zd.substring(yf+4,gf-2);hf=this.saveTextToParentTag(hf,Qd,bf),Qd.add(this.options.commentPropName,[{[this.options.textNodeName]:xf}])}yf=gf}else if(zd.substr(yf+1,2)==="!D"){const gf=ud(zd,yf);this.docTypeEntities=gf.entities,yf=gf.i}else if(zd.substr(yf+1,2)==="!["){const gf=Ud(zd,"]]>",yf,"CDATA is not closed.")-2,xf=zd.substring(yf+9,gf);hf=this.saveTextToParentTag(hf,Qd,bf);let Mf=this.parseTextData(xf,Qd.tagname,bf,!0,!1,!0,!0);Mf==null&&(Mf=""),this.options.cdataPropName?Qd.add(this.options.cdataPropName,[{[this.options.textNodeName]:xf}]):Qd.add(this.options.textNodeName,Mf),yf=gf+2}else{let gf=Hd(zd,yf,this.options.removeNSPrefix),xf=gf.tagName;const Mf=gf.rawTagName;let Yf=gf.tagExp,Qf=gf.attrExpPresent,qf=gf.closeIndex;this.options.transformTagName&&(xf=this.options.transformTagName(xf)),Qd&&hf&&Qd.tagname!=="!xml"&&(hf=this.saveTextToParentTag(hf,Qd,bf,!1));const Bf=Qd;if(Bf&&this.options.unpairedTags.indexOf(Bf.tagname)!==-1&&(Qd=this.tagsNodeStack.pop(),bf=bf.substring(0,bf.lastIndexOf("."))),xf!==Xd.tagname&&(bf+=bf?"."+xf:xf),this.isItStopNode(this.options.stopNodes,bf,xf)){let Df="";if(Yf.length>0&&Yf.lastIndexOf("/ ")===Yf.length-1)xf[xf.length-1]===" / "?(xf=xf.substr(0,xf.length-1),bf=bf.substr(0,bf.length-1),Yf=xf):Yf=Yf.substr(0,Yf.length-1),yf=gf.closeIndex;else if(this.options.unpairedTags.indexOf(xf)!==-1)yf=gf.closeIndex;else{const Zf=this.readStopNodeData(zd,Mf,qf+1);if(!Zf)throw new Error(`Unexpected end of ${Mf}`);yf=Zf.i,Df=Zf.tagContent}const $f=new sd(xf);xf!==Yf&&Qf&&($f[" : @ "]=this.buildAttributesMap(Yf,bf,xf)),Df&&(Df=this.parseTextData(Df,xf,bf,!0,Qf,!0,!0)),bf=bf.substr(0,bf.lastIndexOf(" . ")),$f.add(this.options.textNodeName,Df),this.addChild(Qd,$f,bf)}else{if(Yf.length>0&&Yf.lastIndexOf(" / ")===Yf.length-1){xf[xf.length-1]===" / "?(xf=xf.substr(0,xf.length-1),bf=bf.substr(0,bf.length-1),Yf=xf):Yf=Yf.substr(0,Yf.length-1),this.options.transformTagName&&(xf=this.options.transformTagName(xf));const Df=new sd(xf);xf!==Yf&&Qf&&(Df[" : @ "]=this.buildAttributesMap(Yf,bf,xf)),this.addChild(Qd,Df,bf),bf=bf.substr(0,bf.lastIndexOf(" . "))}else{const Df=new sd(xf);this.tagsNodeStack.push(Qd),xf!==Yf&&Qf&&(Df[" : @ "]=this.buildAttributesMap(Yf,bf,xf)),this.addChild(Qd,Df,bf),Qd=Df}hf=" ",yf=qf}}else hf+=zd[yf];return Xd.child};function Ld(zd,Xd,Qd){const hf=this.options.updateTag(Xd.tagname,Qd,Xd[" : @ "]);hf===!1||(typeof hf==" string " && ( Xd . tagname = hf ) , zd . addChild ( Xd ) ) } const Rd = function ( zd ) { if ( this . options . processEntities ) { for ( let Xd in this . docTypeEntities ) { const Qd = this . docTypeEntities [ Xd ] ; zd = zd . replace ( Qd . regx , Qd . val ) } for ( let Xd in this . lastEntities ) { const Qd = this . lastEntities [ Xd ] ; zd = zd . replace ( Qd . regex , Qd . val ) } if ( this . options . htmlEntities ) for ( let Xd in this . htmlEntities ) { const Qd = this . htm
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}var Oh=!0,Xh=!1,gm;return{s:function(){Jf=Jf.call(If)},n:function(){var Hm=Jf.next();return Oh=Hm.done,Hm},e:function(Hm){Xh=!0,gm=Hm},f:function(){try{!Oh&&Jf.return!=null&&Jf.return()}finally{if(Xh)throw gm}}}}function cd(If,Nf){if(If){if(typeof If=="string")return dd(If,Nf);var Jf=Object.prototype.toString.call(If).slice(8,-1);if(Jf==="Object"&&If.constructor&&(Jf=If.constructor.name),Jf==="Map"||Jf==="Set")return Array.from(If);if(Jf==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array $ /.test(Jf))return dd(If,Nf)}}function dd(If,Nf){(Nf==null||Nf>If.length)&&(Nf=If.length);for(var Jf=0,oh=new Array(Nf);Jf<Nf;Jf++)oh[Jf]=If[Jf];return oh}var pd=nd("./lib/md5.js"),fd=nd("./lib/crypto.js"),Td=nd("./node_modules/fast-xml-parser/src/fxp.js"),Sd=Td.XMLParser,Ad=Td.XMLBuilder,Nd=new Sd({ignoreDeclaration:!0,ignoreAttributes:!0,parseTagValue:!1}),Ld=new Ad,Rd=nd("./lib/base64.js"),Od=nd("./src/tracker.js"),kd=function(Nf){var Jf=Nd.parse(Nf);return Jf},Fd=function(Nf){var Jf=Ld.build(Nf);return Jf};function Ud(If){return encodeURIComponent(If).replace(/!/g,"%21").replace(/'/g,"%27").replace(/ \( /g,"%28").replace(/ \) /g,"%29").replace(/ \* /g,"%2A")}function Hd(If,Nf){var Jf=[];for(var oh in If)If.hasOwnProperty(oh)&&Jf.push(Nf?Ud(oh).toLowerCase():oh);return Jf.sort(function(xh,Oh){return xh=xh.toLowerCase(),Oh=Oh.toLowerCase(),xh===Oh?0:xh>Oh?1:-1})}var Vd=function(Nf,Jf){var oh,xh,Oh,Xh=[],gm=Hd(Nf);for(oh=0;oh<gm.length;oh++)xh=gm[oh],Oh=Nf[xh]===void 0||Nf[xh]===null?"":""+Nf[xh],xh=Jf?Ud(xh).toLowerCase():Ud(xh),Oh=Ud(Oh)||"",Xh.push(xh+"="+Oh);return Xh.join("&")},Zd=["cache-control","content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding","pic-operations"],zd=function(Nf){var Jf={};for(var oh in Nf){var xh=oh.toLowerCase();(xh.indexOf("x-cos-")>-1||Zd.indexOf(xh)>-1)&&(Jf[oh]=Nf[oh])}return Jf},Xd=function(Nf){Nf=Nf||{};var Jf=Nf.SecretId,oh=Nf.SecretKey,xh=Nf.KeyTime,Oh=(Nf.method||Nf.Method||"get").toLowerCase(),Xh=Df(Nf.Query||Nf.params||{}),gm=zd(Df(Nf.Headers||Nf.headers||{})),lm=Nf.Key||"",Hm;Nf.UseRawKey?Hm=Nf.Pathname||Nf.pathname||"/"+lm:(Hm=Nf.Pathname||Nf.pathname||lm,Hm.indexOf("/")!==0&&(Hm="/"+Hm));var Rm=Nf.ForceSignHost!==!1;if(!gm.Host&&!gm.host&&Nf.Bucket&&Nf.Region&&Rm&&(gm.Host=Nf.Bucket+".cos."+Nf.Region+".myqcloud.com"),!Jf)throw new Error("missing param SecretId");if(!oh)throw new Error("missing param SecretKey");var Pm=Math.round(jf(Nf.SystemClockOffset)/1e3)-1,e_=Pm,U_=Nf.Expires||Nf.expires;U_===void 0?e_+=900:e_+=U_*1||0;var C_="sha1",A_=Jf,Zm=xh||Pm+";"+e_,L_=xh||Pm+";"+e_,V_=Hd(gm,!0).join(";").toLowerCase(),Q_=Hd(Xh,!0).join(";").toLowerCase(),Z_=fd.HmacSHA1(L_,oh).toString(),H_=[Oh,Hm,rh.obj2str(Xh,!0),rh.obj2str(gm,!0),""].join( `
2024-09-25 14:23:53 +08:00
` ),O_=["sha1",Zm,fd.SHA1(H_).toString(),""].join( `
2024-11-27 11:30:55 +08:00
` ), $ m=fd.HmacSHA1(O_,Z_).toString(),Rg=["q-sign-algorithm="+C_,"q-ak="+A_,"q-sign-time="+Zm,"q-key-time="+L_,"q-header-list="+V_,"q-url-param-list="+Q_,"q-signature="+ $ m].join("&");return Rg},Qd=function(Nf,Jf,oh){var xh=Jf/8,Oh=Nf.slice(oh,oh+xh);return new Uint8Array(Oh).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[Jf](Oh)[0]},hf=function(Nf,Jf,oh,xh){var Oh=Nf.slice(Jf,oh),Xh="";return new Uint8Array(Oh).forEach(function(gm){Xh+=String.fromCharCode(gm)}),xh&&(Xh=decodeURIComponent(escape(Xh))),Xh},bf=function(Nf){for(var Jf={},oh=hf(Nf),xh={records:[]};Nf.byteLength;){var Oh=Qd(Nf,32,0),Xh=Qd(Nf,32,4),gm=Oh-Xh-16,lm=0,Hm;for(Nf=Nf.slice(12);lm<Xh;){var Rm=Qd(Nf,8,lm),Pm=hf(Nf,lm+1,lm+1+Rm),e_=Qd(Nf,16,lm+Rm+2),U_=hf(Nf,lm+Rm+4,lm+Rm+4+e_);Jf[Pm]=U_,lm+=Rm+4+e_}if(Jf[":event-type"]==="Records")Hm=hf(Nf,lm,lm+gm,!0),xh.records.push(Hm);else if(Jf[":event-type"]==="Stats")Hm=hf(Nf,lm,lm+gm,!0),xh.stats=rh.xml2json(Hm).Stats;else if(Jf[":event-type"]==="error"){var C_=Jf[":error-code"],A_=Jf[":error-message"],Zm=new Error(A_);Zm.message=A_,Zm.name=Zm.code=C_,xh.error=Zm}Nf=Nf.slice(lm+gm+4)}return{payload:xh.records.join(""),body:oh}},yf=function(Nf){var Jf=this.options.CopySourceParser;if(Jf)return Jf(Nf);var oh=Nf.match(/^([^.]+- \d +) \. cos(v6|-cdc|-cdz|-internal)? \. ([^.]+) \. ((myqcloud \. com)|(tencentcos \. cn)) \/ (.+) $ /);return oh?{Bucket:oh[1],Region:oh[3],Key:oh[7]}:null},_f=function(){},gf=function(Nf){var Jf={};for(var oh in Nf)Nf.hasOwnProperty(oh)&&Nf[oh]!==void 0&&Nf[oh]!==null&&(Jf[oh]=Nf[oh]);return Jf},xf=function(Nf,Jf){var oh,xh=new FileReader;FileReader.prototype.readAsBinaryString?(oh=FileReader.prototype.readAsBinaryString,xh.onload=function(){Jf(this.result)}):FileReader.prototype.readAsArrayBuffer?oh=function(Xh){var gm="",lm=new FileReader;lm.onload=function(Hm){for(var Rm=new Uint8Array(lm.result),Pm=Rm.byteLength,e_=0;e_<Pm;e_++)gm+=String.fromCharCode(Rm[e_]);Jf(gm)},lm.readAsArrayBuffer(Xh)}:console.error("FileReader not support readAsBinaryString"),oh.call(xh,Nf)},Mf=function(){var If=function(oh,xh){oh=oh.split("."),xh=xh.split(".");for(var Oh=0;Oh<xh.length;Oh++)if(oh[Oh]!==xh[Oh])return parseInt(oh[Oh])>parseInt(xh[Oh])?1:-1;return 0},Nf=function(oh){if(!oh)return!1;var xh=(oh.match(/Chrome \/ ([. \d ]+)/)||[])[1],Oh=(oh.match(/QBCore \/ ([. \d ]+)/)||[])[1],Xh=(oh.match(/QQBrowser \/ ([. \d ]+)/)||[])[1],gm=xh&&If(xh,"53.0.2785.116")<0&&Oh&&If(Oh,"3.53.991.400")<0&&Xh&&If(Xh,"9.0.2524.400")<=0||!1;return gm};return Nf(typeof navigator<"u"&&navigator.userAgent)}(),Yf=function(Nf,Jf,oh,xh,Oh){var Xh;if(Nf.slice?Xh=Nf.slice(Jf,oh):Nf.mozSlice?Xh=Nf.mozSlice(Jf,oh):Nf.webkitSlice&&(Xh=Nf.webkitSlice(Jf,oh)),xh&&Mf){var gm=new FileReader;gm.onload=function(lm){Xh=null,Oh(new Blob([gm.result]))},gm.readAsArrayBuffer(Xh)}else Oh(Xh)},Qf=function(Nf,Jf,oh,xh){oh=oh||_f,Nf?typeof Jf=="string"?oh(rh.md5(Jf,!0)):Blob&&Jf instanceof Blob?rh.getFileMd5(Jf,function(Oh,Xh){oh(Xh)},xh):oh():oh()},qf=1024*1024,Bf=function(Nf,Jf,oh){var xh=Nf.size,Oh=0,Xh=pd.getCtx(),gm=function lm(Hm){if(Hm>=xh){var Rm=Xh.digest("hex");Jf(null,Rm);return}var Pm=Math.min(xh,Hm+qf);rh.fileSlice(Nf,Hm,Pm,!1,function(e_){xf(e_,function(U_){e_=null,Xh=Xh.update(U_,!0),Oh+=U_.length,U_=null,oh&&oh({loaded:Oh,total:xh,percent:Math.round(Oh/xh*1e4)/1e4}),lm(Hm+qf)})})};gm(0)};function Df(If){return Gf(If,function(Nf){return sd(Nf)==="object"&&Nf!==null?Df(Nf):Nf})}function $ f(If,Nf,Jf){return If&&Nf in If?If[Nf]:Jf}function Zf(If,Nf){return Pf(Nf,function(Jf,oh){If[oh]=Nf[oh]}),If}function Xf(If){return If instanceof Array}function Tf(If,Nf){for(var Jf=!1,oh=0;oh<If.length;oh++)if(Nf===If[oh]){Jf=!0;break}return Jf}function vf(If){return Xf(If)?If:[If]}function Pf(If,Nf){for(var Jf in If)If.hasOwnProperty(Jf)&&Nf(If[Jf],Jf)}function Gf(If,Nf){var Jf=Xf(If)?[]:{};for(var oh in If)If.hasOwnProperty(oh)&&(Jf[oh]=Nf(If[oh],oh));return Jf}function ah(If,Nf){var Jf=Xf(If),oh=Jf?[]:{};for(var xh in If)If.hasOwnProperty(xh)&&Nf(If[xh],xh)&&(Jf?oh.push(If[xh]):oh[xh]=If[xh]);return oh}var Wf=function(Nf){var Jf,oh,xh,Oh="";for(Jf=0,oh=Nf.length/2
2024-09-18 09:46:23 +08:00
( c ) 2012 by Cédric Mesnil . All rights reserved .
Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met :
- Redistributions of source code must retain the above copyright notice , this list of conditions and the following disclaimer .
- Redistributions in binary form must reproduce the above copyright notice , this list of conditions and the following disclaimer in the documentation and / or other materials provided with the distribution .
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
2024-11-27 11:30:55 +08:00
* / r e t u r n f u n c t i o n ( r d ) { v a r n d = t d , a d = n d . l i b , s d = a d . W o r d A r r a y , u d = a d . H a s h e r , c d = n d . a l g o , d d = s d . c r e a t e ( [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 1 0 , 1 1 , 1 2 , 1 3 , 1 4 , 1 5 , 7 , 4 , 1 3 , 1 , 1 0 , 6 , 1 5 , 3 , 1 2 , 0 , 9 , 5 , 2 , 1 4 , 1 1 , 8 , 3 , 1 0 , 1 4 , 4 , 9 , 1 5 , 8 , 1 , 2 , 7 , 0 , 6 , 1 3 , 1 1 , 5 , 1 2 , 1 , 9 , 1 1 , 1 0 , 0 , 8 , 1 2 , 4 , 1 3 , 3 , 7 , 1 5 , 1 4 , 5 , 6 , 2 , 4 , 0 , 5 , 9 , 7 , 1 2 , 2 , 1 0 , 1 4 , 1 , 3 , 8 , 1 1 , 6 , 1 5 , 1 3 ] ) , p d = s d . c r e a t e ( [ 5 , 1 4 , 7 , 0 , 9 , 2 , 1 1 , 4 , 1 3 , 6 , 1 5 , 8 , 1 , 1 0 , 3 , 1 2 , 6 , 1 1 , 3 , 7 , 0 , 1 3 , 5 , 1 0 , 1 4 , 1 5 , 8 , 1 2 , 4 , 9 , 1 , 2 , 1 5 , 5 , 1 , 3 , 7 , 1 4 , 6 , 9 , 1 1 , 8 , 1 2 , 2 , 1 0 , 0 , 4 , 1 3 , 8 , 6 , 4 , 1 , 3 , 1 1 , 1 5 , 0 , 5 , 1 2 , 2 , 1 3 , 9 , 7 , 1 0 , 1 4 , 1 2 , 1 5 , 1 0 , 4 , 1 , 5 , 8 , 7 , 6 , 2 , 1 3 , 1 4 , 0 , 3 , 9 , 1 1 ] ) , f d = s d . c r e a t e ( [ 1 1 , 1 4 , 1 5 , 1 2 , 5 , 8 , 7 , 9 , 1 1 , 1 3 , 1 4 , 1 5 , 6 , 7 , 9 , 8 , 7 , 6 , 8 , 1 3 , 1 1 , 9 , 7 , 1 5 , 7 , 1 2 , 1 5 , 9 , 1 1 , 7 , 1 3 , 1 2 , 1 1 , 1 3 , 6 , 7 , 1 4 , 9 , 1 3 , 1 5 , 1 4 , 8 , 1 3 , 6 , 5 , 1 2 , 7 , 5 , 1 1 , 1 2 , 1 4 , 1 5 , 1 4 , 1 5 , 9 , 8 , 9 , 1 4 , 5 , 6 , 8 , 6 , 5 , 1 2 , 9 , 1 5 , 5 , 1 1 , 6 , 8 , 1 3 , 1 2 , 5 , 1 2 , 1 3 , 1 4 , 1 1 , 8 , 5 , 6 ] ) , T d = s d . c r e a t e ( [ 8 , 9 , 9 , 1 1 , 1 3 , 1 5 , 1 5 , 5 , 7 , 7 , 8 , 1 1 , 1 4 , 1 4 , 1 2 , 6 , 9 , 1 3 , 1 5 , 7 , 1 2 , 8 , 9 , 1 1 , 7 , 7 , 1 2 , 7 , 6 , 1 5 , 1 3 , 1 1 , 9 , 7 , 1 5 , 1 1 , 8 , 6 , 6 , 1 4 , 1 2 , 1 3 , 5 , 1 4 , 1 3 , 1 3 , 7 , 5 , 1 5 , 5 , 8 , 1 1 , 1 4 , 1 4 , 6 , 1 4 , 6 , 9 , 1 2 , 9 , 1 2 , 5 , 1 5 , 8 , 8 , 5 , 1 2 , 9 , 1 2 , 5 , 1 4 , 6 , 8 , 1 3 , 6 , 5 , 1 5 , 1 3 , 1 1 , 1 1 ] ) , S d = s d . c r e a t e ( [ 0 , 1 5 1 8 5 0 0 2 4 9 , 1 8 5 9 7 7 5 3 9 3 , 2 4 0 0 9 5 9 7 0 8 , 2 8 4 0 8 5 3 8 3 8 ] ) , A d = s d . c r e a t e ( [ 1 3 5 2 8 2 9 9 2 6 , 1 5 4 8 6 0 3 6 8 4 , 1 8 3 6 0 7 2 6 9 1 , 2 0 5 3 9 9 4 2 1 7 , 0 ] ) , N d = c d . R I P E M D 1 6 0 = u d . e x t e n d ( { _ d o R e s e t : f u n c t i o n ( ) { t h i s . _ h a s h = s d . c r e a t e ( [ 1 7 3 2 5 8 4 1 9 3 , 4 0 2 3 2 3 3 4 1 7 , 2 5 6 2 3 8 3 1 0 2 , 2 7 1 7 3 3 8 7 8 , 3 2 8 5 3 7 7 5 2 0 ] ) } , _ d o P r o c e s s B l o c k : f u n c t i o n ( H d , V d ) { f o r ( v a r Z d = 0 ; Z d < 1 6 ; Z d + + ) { v a r z d = V d + Z d , X d = H d [ z d ] ; H d [ z d ] = ( X d < < 8 | X d > > > 2 4 ) & 1 6 7 1 1 9 3 5 | ( X d < < 2 4 | X d > > > 8 ) & 4 2 7 8 2 5 5 3 6 0 } v a r Q d = t h i s . _ h a s h . w o r d s , h f = S d . w o r d s , b f = A d . w o r d s , y f = d d . w o r d s , _ f = p d . w o r d s , g f = f d . w o r d s , x f = T d . w o r d s , M f , Y f , Q f , q f , B f , D f , $ f , Z f , X f , T f ; D f = M f = Q d [ 0 ] , $ f = Y f = Q d [ 1 ] , Z f = Q f = Q d [ 2 ] , X f = q f = Q d [ 3 ] , T f = B f = Q d [ 4 ] ; f o r ( v a r v f , Z d = 0 ; Z d < 8 0 ; Z d + = 1 ) v f = M f + H d [ V d + y f [ Z d ] ] | 0 , Z d < 1 6 ? v f + = L d ( Y f , Q f , q f ) + h f [ 0 ] : Z d < 3 2 ? v f + = R d ( Y f , Q f , q f ) + h f [ 1 ] : Z d < 4 8 ? v f + = O d ( Y f , Q f , q f ) + h f [ 2 ] : Z d < 6 4 ? v f + = k d ( Y f , Q f , q f ) + h f [ 3 ] : v f + = F d ( Y f , Q f , q f ) + h f [ 4 ] , v f = v f | 0 , v f = U d ( v f , g f [ Z d ] ) , v f = v f + B f | 0 , M f = B f , B f = q f , q f = U d ( Q f , 1 0 ) , Q f = Y f , Y f = v f , v f = D f + H d [ V d + _ f [ Z d ] ] | 0 , Z d < 1 6 ? v f + = F d ( $ f , Z f , X f ) + b f [ 0 ] : Z d < 3 2 ? v f + = k d ( $ f , Z f , X f ) + b f [ 1 ] : Z d < 4 8 ? v f + = O d ( $ f , Z f , X f ) + b f [ 2 ] : Z d < 6 4 ? v f + = R d ( $ f , Z f , X f ) + b f [ 3 ] : v f + = L d ( $ f , Z f , X f ) + b f [ 4 ] , v f = v f | 0 , v f = U d ( v f , x f [ Z d ] ) , v f = v f + T f | 0 , D f = T f , T f = X f , X f = U d ( Z f , 1 0 ) , Z f = $ f , $ f = v f ; v f = Q d [ 1 ] + Q f + X f | 0 , Q d [ 1 ] = Q d [ 2 ] + q f + T f | 0 , Q d [ 2 ] = Q d [ 3 ] + B f + D f | 0 , Q d [ 3 ] = Q d [ 4 ] + M f + $ f | 0 , Q d [ 4 ] = Q d [ 0 ] + Y f + Z f | 0 , Q d [ 0 ] = v f } , _ d o F i n a l i z e : f u n c t i o n ( ) { v a r H d = t h i s . _ d a t a , V d = H d . w o r d s , Z d = t h i s . _ n D a t a B y t e s * 8 , z d = H d . s i g B y t e s * 8 ; V d [ z d > > > 5 ] | = 1 2 8 < < 2 4 - z d % 3 2 , V d [ ( z d + 6 4 > > > 9 < < 4 ) + 1 4 ] = ( Z d < < 8 | Z d > > > 2 4 ) & 1 6 7 1 1 9 3 5 | ( Z d < < 2 4 | Z d > > > 8 ) & 4 2 7 8 2 5 5 3 6 0 , H d . s i g B y t e s = ( V d . l e n g t h + 1 ) * 4 , t h i s . _ p r o c e s s ( ) ; f o r ( v a r X d = t h i s . _ h a s h , Q d = X d . w o r d s , h f = 0 ; h f < 5 ; h f + + ) { v a r b f = Q d [ h f ] ; Q d [ h f ] = ( b f < < 8 | b f > > > 2 4 ) & 1 6 7 1 1 9 3 5 | ( b f < < 2 4 | b f > > > 8 ) & 4 2 7 8 2 5 5 3 6 0 } r e t u r n X d } , c l o n e : f u n c t i o n ( ) { v a r H d = u d . c l o n e . c a l l ( t h i s ) ; r e t u r n H d . _ h a s h = t h i s . _ h a s h . c l o n e ( ) , H d } } ) ; f u n c t i o n L d ( H d , V d , Z d ) { r e t u r n H d ^ V d ^ Z d } f u n c t i o n R d ( H d , V d , Z d ) { r e t u r n H d & V d | ~ H d & Z d } f u n c t i o n O d ( H d , V d , Z d ) { r e t u r n ( H d | ~ V d ) ^ Z d } f u n c t i o n k d ( H d , V d , Z d ) { r e t u r n H d & Z d | V d & ~ Z d } f u n c t i o n F d ( H d , V d , Z d ) { r e t u r n H d ^ ( V d | ~ Z d ) } f u n c t i o n U d ( H d , V d ) { r e t u r n H d < < V d | H d > > > 3 2 - V d } n d . R I P E M D 1 6 0 = u d . _ c r e a t e H e l p e r ( N d ) , n d . H m a c R I P E M D 1 6 0 = u d . _ c r e a t e H m a c H e l p e r ( N d ) } ( ) , t d . R I P E M D 1 6 0 } ) } ( r i p e m d 1 6 0 ) ) , r i p e m d 1 6 0 . e x p o r t s } v a r h m a c = { e x p o r t s : { } } , h a s R e q u i r e d H m a c ; f u n c t i o n r e q u i r e H m a c ( ) { r e t u r n h a s R e q u i r e d H m a c | | ( h a s R e q u i r e d H m a c = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { ( f u n c t i o n ( ) { v a r r d = t d , n d = r d . l i b , a d = n d . B a s e , s d = r d . e n c , u d = s d . U t f 8 , c d = r d . a l g o ; c d . H M A C = a d . e x t e n d ( { i n i t : f u n c t i o n ( d d , p d ) { d d = t h i s . _ h a s h e r = n e w d d . i n i t , t y p e o f p d = = " s t r i n g " & & ( p d = u d . p a r s e ( p d ) ) ; v a r f d = d d . b l o c k S i z e , T d = f d * 4 ; p d . s i g B y t e s > T d & & ( p d = d d . f i n a l i z e ( p d ) ) , p d . c l a m p ( ) ; f o r ( v a r S d = t h i s . _ o K e y = p d . c l o n e ( ) , A d = t h i s . _ i K e y = p d . c l o n e ( ) , N d = S d . w o r d s , L d = A d . w o r d s , R d = 0 ; R d < f d ; R d + + ) N d [ R d ] ^ = 1 5 4 9 5 5 6 8 2 8 , L d [ R d ] ^ = 9 0 9 5 2 2 4 8 6 ; S d . s i g B y t e s = A d . s i g B y t e s = T d , t h i s . r e s e t ( ) } , r e s e t : f u n c t i o n ( ) { v a r d d = t h i s . _ h a s h e r ; d d . r e s e t ( ) , d d . u p d a t e ( t h i s . _ i K e y ) } , u p d a t e : f u n c t i o n ( d d ) { r e t u r n t h i s . _ h a s h e r . u p d a t e ( d d ) , t h i s } , f i n a l i z e : f u n c t i o n ( d d ) { v a r p d = t h i s . _ h a s h e r , f d = p d . f i n a l i z e ( d d ) ; p d . r e s e t ( ) ; v a r T d = p d . f i n a l i z e ( t h i s . _ o K e y . c l o n e ( ) . c o n c a t ( f d ) ) ; r e t u r n T d } } ) } ) ( ) } ) } ( h m a c ) ) , h m a c . e x p o r t s } v a r p b k d f 2 = { e x p o r t s : { } } , h a s R e q u i r e d P b k d f 2 ; f u n c t i o n r e q u i r e P b k d f 2 ( ) { r e t u r n h a s R e q u i r e d P b k d f 2 | | ( h a s R e q u i r e d P b k d f 2 = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e S h a 2 5 6 ( ) , r e q u i r e H m a c ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u
2024-09-18 09:46:23 +08:00
* Counter block mode compatible with Dr Brian Gladman fileenc . c
* derived from CryptoJS . mode . CTR
* Jan Hruby jhruby . web @ gmail . com
2024-11-27 11:30:55 +08:00
* / r e t u r n t d . m o d e . C T R G l a d m a n = f u n c t i o n ( ) { v a r r d = t d . l i b . B l o c k C i p h e r M o d e . e x t e n d ( ) ; f u n c t i o n n d ( u d ) { i f ( ( u d > > 2 4 & 2 5 5 ) = = = 2 5 5 ) { v a r c d = u d > > 1 6 & 2 5 5 , d d = u d > > 8 & 2 5 5 , p d = u d & 2 5 5 ; c d = = = 2 5 5 ? ( c d = 0 , d d = = = 2 5 5 ? ( d d = 0 , p d = = = 2 5 5 ? p d = 0 : + + p d ) : + + d d ) : + + c d , u d = 0 , u d + = c d < < 1 6 , u d + = d d < < 8 , u d + = p d } e l s e u d + = 1 < < 2 4 ; r e t u r n u d } f u n c t i o n a d ( u d ) { r e t u r n ( u d [ 0 ] = n d ( u d [ 0 ] ) ) = = = 0 & & ( u d [ 1 ] = n d ( u d [ 1 ] ) ) , u d } v a r s d = r d . E n c r y p t o r = r d . e x t e n d ( { p r o c e s s B l o c k : f u n c t i o n ( u d , c d ) { v a r d d = t h i s . _ c i p h e r , p d = d d . b l o c k S i z e , f d = t h i s . _ i v , T d = t h i s . _ c o u n t e r ; f d & & ( T d = t h i s . _ c o u n t e r = f d . s l i c e ( 0 ) , t h i s . _ i v = v o i d 0 ) , a d ( T d ) ; v a r S d = T d . s l i c e ( 0 ) ; d d . e n c r y p t B l o c k ( S d , 0 ) ; f o r ( v a r A d = 0 ; A d < p d ; A d + + ) u d [ c d + A d ] ^ = S d [ A d ] } } ) ; r e t u r n r d . D e c r y p t o r = s d , r d } ( ) , t d . m o d e . C T R G l a d m a n } ) } ( m o d e C t r G l a d m a n ) ) , m o d e C t r G l a d m a n . e x p o r t s } v a r m o d e O f b = { e x p o r t s : { } } , h a s R e q u i r e d M o d e O f b ; f u n c t i o n r e q u i r e M o d e O f b ( ) { r e t u r n h a s R e q u i r e d M o d e O f b | | ( h a s R e q u i r e d M o d e O f b = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u r n t d . m o d e . O F B = f u n c t i o n ( ) { v a r r d = t d . l i b . B l o c k C i p h e r M o d e . e x t e n d ( ) , n d = r d . E n c r y p t o r = r d . e x t e n d ( { p r o c e s s B l o c k : f u n c t i o n ( a d , s d ) { v a r u d = t h i s . _ c i p h e r , c d = u d . b l o c k S i z e , d d = t h i s . _ i v , p d = t h i s . _ k e y s t r e a m ; d d & & ( p d = t h i s . _ k e y s t r e a m = d d . s l i c e ( 0 ) , t h i s . _ i v = v o i d 0 ) , u d . e n c r y p t B l o c k ( p d , 0 ) ; f o r ( v a r f d = 0 ; f d < c d ; f d + + ) a d [ s d + f d ] ^ = p d [ f d ] } } ) ; r e t u r n r d . D e c r y p t o r = n d , r d } ( ) , t d . m o d e . O F B } ) } ( m o d e O f b ) ) , m o d e O f b . e x p o r t s } v a r m o d e E c b = { e x p o r t s : { } } , h a s R e q u i r e d M o d e E c b ; f u n c t i o n r e q u i r e M o d e E c b ( ) { r e t u r n h a s R e q u i r e d M o d e E c b | | ( h a s R e q u i r e d M o d e E c b = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u r n t d . m o d e . E C B = f u n c t i o n ( ) { v a r r d = t d . l i b . B l o c k C i p h e r M o d e . e x t e n d ( ) ; r e t u r n r d . E n c r y p t o r = r d . e x t e n d ( { p r o c e s s B l o c k : f u n c t i o n ( n d , a d ) { t h i s . _ c i p h e r . e n c r y p t B l o c k ( n d , a d ) } } ) , r d . D e c r y p t o r = r d . e x t e n d ( { p r o c e s s B l o c k : f u n c t i o n ( n d , a d ) { t h i s . _ c i p h e r . d e c r y p t B l o c k ( n d , a d ) } } ) , r d } ( ) , t d . m o d e . E C B } ) } ( m o d e E c b ) ) , m o d e E c b . e x p o r t s } v a r p a d A n s i x 9 2 3 = { e x p o r t s : { } } , h a s R e q u i r e d P a d A n s i x 9 2 3 ; f u n c t i o n r e q u i r e P a d A n s i x 9 2 3 ( ) { r e t u r n h a s R e q u i r e d P a d A n s i x 9 2 3 | | ( h a s R e q u i r e d P a d A n s i x 9 2 3 = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u r n t d . p a d . A n s i X 9 2 3 = { p a d : f u n c t i o n ( r d , n d ) { v a r a d = r d . s i g B y t e s , s d = n d * 4 , u d = s d - a d % s d , c d = a d + u d - 1 ; r d . c l a m p ( ) , r d . w o r d s [ c d > > > 2 ] | = u d < < 2 4 - c d % 4 * 8 , r d . s i g B y t e s + = u d } , u n p a d : f u n c t i o n ( r d ) { v a r n d = r d . w o r d s [ r d . s i g B y t e s - 1 > > > 2 ] & 2 5 5 ; r d . s i g B y t e s - = n d } } , t d . p a d . A n s i x 9 2 3 } ) } ( p a d A n s i x 9 2 3 ) ) , p a d A n s i x 9 2 3 . e x p o r t s } v a r p a d I s o 1 0 1 2 6 = { e x p o r t s : { } } , h a s R e q u i r e d P a d I s o 1 0 1 2 6 ; f u n c t i o n r e q u i r e P a d I s o 1 0 1 2 6 ( ) { r e t u r n h a s R e q u i r e d P a d I s o 1 0 1 2 6 | | ( h a s R e q u i r e d P a d I s o 1 0 1 2 6 = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u r n t d . p a d . I s o 1 0 1 2 6 = { p a d : f u n c t i o n ( r d , n d ) { v a r a d = n d * 4 , s d = a d - r d . s i g B y t e s % a d ; r d . c o n c a t ( t d . l i b . W o r d A r r a y . r a n d o m ( s d - 1 ) ) . c o n c a t ( t d . l i b . W o r d A r r a y . c r e a t e ( [ s d < < 2 4 ] , 1 ) ) } , u n p a d : f u n c t i o n ( r d ) { v a r n d = r d . w o r d s [ r d . s i g B y t e s - 1 > > > 2 ] & 2 5 5 ; r d . s i g B y t e s - = n d } } , t d . p a d . I s o 1 0 1 2 6 } ) } ( p a d I s o 1 0 1 2 6 ) ) , p a d I s o 1 0 1 2 6 . e x p o r t s } v a r p a d I s o 9 7 9 7 1 = { e x p o r t s : { } } , h a s R e q u i r e d P a d I s o 9 7 9 7 1 ; f u n c t i o n r e q u i r e P a d I s o 9 7 9 7 1 ( ) { r e t u r n h a s R e q u i r e d P a d I s o 9 7 9 7 1 | | ( h a s R e q u i r e d P a d I s o 9 7 9 7 1 = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u r n t d . p a d . I s o 9 7 9 7 1 = { p a d : f u n c t i o n ( r d , n d ) { r d . c o n c a t ( t d . l i b . W o r d A r r a y . c r e a t e ( [ 2 1 4 7 4 8 3 6 4 8 ] , 1 ) ) , t d . p a d . Z e r o P a d d i n g . p a d ( r d , n d ) } , u n p a d : f u n c t i o n ( r d ) { t d . p a d . Z e r o P a d d i n g . u n p a d ( r d ) , r d . s i g B y t e s - - } } , t d . p a d . I s o 9 7 9 7 1 } ) } ( p a d I s o 9 7 9 7 1 ) ) , p a d I s o 9 7 9 7 1 . e x p o r t s } v a r p a d Z e r o p a d d i n g = { e x p o r t s : { } } , h a s R e q u i r e d P a d Z e r o p a d d i n g ; f u n c t i o n r e q u i r e P a d Z e r o p a d d i n g ( ) { r e t u r n h a s R e q u i r e d P a d Z e r o p a d d i n g | | ( h a s R e q u i r e d P a d Z e r o p a d d i n g = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( t d , r d , n d ) { R a . e x p o r t s = r d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( t d ) { r e t u r n t d . p a d . Z e r o P a d d i n g = { p a d : f u n c t i o n ( r d , n d ) { v a r a d = n d * 4 ; r d . c l a m p ( ) , r d . s i g B y t e s + = a d - ( r d . s i g B y t e s % a d | | a d ) } , u n p a d : f u n c t i o n ( r d ) { f o r ( v a r n d = r d . w o r d s , a d = r d . s i g B y t e s - 1 , a d = r d . s i g B y t e s - 1 ; a d > = 0 ; a d - - ) i f ( n d [ a d > > > 2 ] > > > 2 4 - a d % 4 * 8 & 2 5 5 ) { r d . s i g B y t e s = a d + 1 ; b r e a k } } } , t d . p a d . Z e r o P a d d i n g } ) } ( p a d Z e r o p a d d i n g ) ) , p a d Z e r o p a d d i n g . e x p o r t s } v a r p a d N o p a d d i n g = { e x p o r t s : { } } , h a s R e q u i r e d P a d N o p a d d i n g ; f u n c t i o n r e q u i r e P a d N o p a d d i
2024-09-18 09:46:23 +08:00
* The buffer module from node . js , for the browser .
*
* @ author Feross Aboukhadijeh < https : //feross.org>
* @ license MIT
2024-11-27 11:30:55 +08:00
* / ( f u n c t i o n ( R a ) { v a r q a = r e q u i r e B a s e 6 4 J s ( ) , t d = i e e e 7 5 4 , r d = t y p e o f S y m b o l = = " f u n c t i o n " & & t y p e o f S y m b o l . f o r = = " f u n c t i o n " ? S y m b o l . f o r ( " n o d e j s . u t i l . i n s p e c t . c u s t o m " ) : n u l l ; R a . B u f f e r = u d , R a . S l o w B u f f e r = O d , R a . I N S P E C T _ M A X _ B Y T E S = 5 0 ; v a r n d = 2 1 4 7 4 8 3 6 4 7 ; R a . k M a x L e n g t h = n d , u d . T Y P E D _ A R R A Y _ S U P P O R T = a d ( ) , ! u d . T Y P E D _ A R R A Y _ S U P P O R T & & t y p e o f c o n s o l e < " u " & & t y p e o f c o n s o l e . e r r o r = = " f u n c t i o n " & & c o n s o l e . e r r o r ( " T h i s b r o w s e r l a c k s t y p e d a r r a y ( U i n t 8 A r r a y ) s u p p o r t w h i c h i s r e q u i r e d b y ` b u f f e r ` v 5 . x . U s e ` b u f f e r ` v 4 . x i f y o u r e q u i r e o l d b r o w s e r s u p p o r t . " ) ; f u n c t i o n a d ( ) { t r y { v a r U f = n e w U i n t 8 A r r a y ( 1 ) , w f = { f o o : f u n c t i o n ( ) { r e t u r n 4 2 } } ; r e t u r n O b j e c t . s e t P r o t o t y p e O f ( w f , U i n t 8 A r r a y . p r o t o t y p e ) , O b j e c t . s e t P r o t o t y p e O f ( U f , w f ) , U f . f o o ( ) = = = 4 2 } c a t c h { r e t u r n ! 1 } } O b j e c t . d e f i n e P r o p e r t y ( u d . p r o t o t y p e , " p a r e n t " , { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { i f ( u d . i s B u f f e r ( t h i s ) ) r e t u r n t h i s . b u f f e r } } ) , O b j e c t . d e f i n e P r o p e r t y ( u d . p r o t o t y p e , " o f f s e t " , { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { i f ( u d . i s B u f f e r ( t h i s ) ) r e t u r n t h i s . b y t e O f f s e t } } ) ; f u n c t i o n s d ( U f ) { i f ( U f > n d ) t h r o w n e w R a n g e E r r o r ( ' T h e v a l u e " ' + U f + ' " i s i n v a l i d f o r o p t i o n " s i z e " ' ) ; v a r w f = n e w U i n t 8 A r r a y ( U f ) ; r e t u r n O b j e c t . s e t P r o t o t y p e O f ( w f , u d . p r o t o t y p e ) , w f } f u n c t i o n u d ( U f , w f , O f ) { i f ( t y p e o f U f = = " n u m b e r " ) { i f ( t y p e o f w f = = " s t r i n g " ) t h r o w n e w T y p e E r r o r ( ' T h e " s t r i n g " a r g u m e n t m u s t b e o f t y p e s t r i n g . R e c e i v e d t y p e n u m b e r ' ) ; r e t u r n f d ( U f ) } r e t u r n c d ( U f , w f , O f ) } u d . p o o l S i z e = 8 1 9 2 ; f u n c t i o n c d ( U f , w f , O f ) { i f ( t y p e o f U f = = " s t r i n g " ) r e t u r n T d ( U f , w f ) ; i f ( A r r a y B u f f e r . i s V i e w ( U f ) ) r e t u r n A d ( U f ) ; i f ( U f = = n u l l ) t h r o w n e w T y p e E r r o r ( " T h e f i r s t a r g u m e n t m u s t b e o n e o f t y p e s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r A r r a y - l i k e O b j e c t . R e c e i v e d t y p e " + t y p e o f U f ) ; i f ( R f ( U f , A r r a y B u f f e r ) | | U f & & R f ( U f . b u f f e r , A r r a y B u f f e r ) | | t y p e o f S h a r e d A r r a y B u f f e r < " u " & & ( R f ( U f , S h a r e d A r r a y B u f f e r ) | | U f & & R f ( U f . b u f f e r , S h a r e d A r r a y B u f f e r ) ) ) r e t u r n N d ( U f , w f , O f ) ; i f ( t y p e o f U f = = " n u m b e r " ) t h r o w n e w T y p e E r r o r ( ' T h e " v a l u e " a r g u m e n t m u s t n o t b e o f t y p e n u m b e r . R e c e i v e d t y p e n u m b e r ' ) ; v a r j f = U f . v a l u e O f & & U f . v a l u e O f ( ) ; i f ( j f ! = n u l l & & j f ! = = U f ) r e t u r n u d . f r o m ( j f , w f , O f ) ; v a r u h = L d ( U f ) ; i f ( u h ) r e t u r n u h ; i f ( t y p e o f S y m b o l < " u " & & S y m b o l . t o P r i m i t i v e ! = n u l l & & t y p e o f U f [ S y m b o l . t o P r i m i t i v e ] = = " f u n c t i o n " ) r e t u r n u d . f r o m ( U f [ S y m b o l . t o P r i m i t i v e ] ( " s t r i n g " ) , w f , O f ) ; t h r o w n e w T y p e E r r o r ( " T h e f i r s t a r g u m e n t m u s t b e o n e o f t y p e s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r A r r a y - l i k e O b j e c t . R e c e i v e d t y p e " + t y p e o f U f ) } u d . f r o m = f u n c t i o n ( U f , w f , O f ) { r e t u r n c d ( U f , w f , O f ) } , O b j e c t . s e t P r o t o t y p e O f ( u d . p r o t o t y p e , U i n t 8 A r r a y . p r o t o t y p e ) , O b j e c t . s e t P r o t o t y p e O f ( u d , U i n t 8 A r r a y ) ; f u n c t i o n d d ( U f ) { i f ( t y p e o f U f ! = " n u m b e r " ) t h r o w n e w T y p e E r r o r ( ' " s i z e " a r g u m e n t m u s t b e o f t y p e n u m b e r ' ) ; i f ( U f < 0 ) t h r o w n e w R a n g e E r r o r ( ' T h e v a l u e " ' + U f + ' " i s i n v a l i d f o r o p t i o n " s i z e " ' ) } f u n c t i o n p d ( U f , w f , O f ) { r e t u r n d d ( U f ) , U f < = 0 ? s d ( U f ) : w f ! = = v o i d 0 ? t y p e o f O f = = " s t r i n g " ? s d ( U f ) . f i l l ( w f , O f ) : s d ( U f ) . f i l l ( w f ) : s d ( U f ) } u d . a l l o c = f u n c t i o n ( U f , w f , O f ) { r e t u r n p d ( U f , w f , O f ) } ; f u n c t i o n f d ( U f ) { r e t u r n d d ( U f ) , s d ( U f < 0 ? 0 : R d ( U f ) | 0 ) } u d . a l l o c U n s a f e = f u n c t i o n ( U f ) { r e t u r n f d ( U f ) } , u d . a l l o c U n s a f e S l o w = f u n c t i o n ( U f ) { r e t u r n f d ( U f ) } ; f u n c t i o n T d ( U f , w f ) { i f ( ( t y p e o f w f ! = " s t r i n g " | | w f = = = " " ) & & ( w f = " u t f 8 " ) , ! u d . i s E n c o d i n g ( w f ) ) t h r o w n e w T y p e E r r o r ( " U n k n o w n e n c o d i n g : " + w f ) ; v a r O f = k d ( U f , w f ) | 0 , j f = s d ( O f ) , u h = j f . w r i t e ( U f , w f ) ; r e t u r n u h ! = = O f & & ( j f = j f . s l i c e ( 0 , u h ) ) , j f } f u n c t i o n S d ( U f ) { f o r ( v a r w f = U f . l e n g t h < 0 ? 0 : R d ( U f . l e n g t h ) | 0 , O f = s d ( w f ) , j f = 0 ; j f < w f ; j f + = 1 ) O f [ j f ] = U f [ j f ] & 2 5 5 ; r e t u r n O f } f u n c t i o n A d ( U f ) { i f ( R f ( U f , U i n t 8 A r r a y ) ) { v a r w f = n e w U i n t 8 A r r a y ( U f ) ; r e t u r n N d ( w f . b u f f e r , w f . b y t e O f f s e t , w f . b y t e L e n g t h ) } r e t u r n S d ( U f ) } f u n c t i o n N d ( U f , w f , O f ) { i f ( w f < 0 | | U f . b y t e L e n g t h < w f ) t h r o w n e w R a n g e E r r o r ( ' " o f f s e t " i s o u t s i d e o f b u f f e r b o u n d s ' ) ; i f ( U f . b y t e L e n g t h < w f + ( O f | | 0 ) ) t h r o w n e w R a n g e E r r o r ( ' " l e n g t h " i s o u t s i d e o f b u f f e r b o u n d s ' ) ; v a r j f ; r e t u r n w f = = = v o i d 0 & & O f = = = v o i d 0 ? j f = n e w U i n t 8 A r r a y ( U f ) : O f = = = v o i d 0 ? j f = n e w U i n t 8 A r r a y ( U f , w f ) : j f = n e w U i n t 8 A r r a y ( U f , w f , O f ) , O b j e c t . s e t P r o t o t y p e O f ( j f , u d . p r o t o t y p e ) , j f } f u n c t i o n L d ( U f ) { i f ( u d . i s B u f f e r ( U f ) ) { v a r w f = R d ( U f . l e n g t h ) | 0 , O f = s d ( w f ) ; r e t u r n O f . l e n g t h = = = 0 | | U f . c o p y ( O f , 0 , 0 , w f ) , O f } i f ( U f . l e n g t h ! = = v o i d 0 ) r e t u r n t y p e o f U f . l e n g t h ! = " n u m b e r " | | V f ( U f . l e n g t h ) ? s d ( 0 ) : S d ( U f ) ; i f ( U f . t y p e = = = " B u f f e r " & & A r r a y . i s A r r a y ( U f . d a t a ) ) r e t u r n S d ( U f . d a t a ) } f u n c t i o n R d ( U f ) { i f ( U f > = n d ) t h r o w n e w R a n g e E r r o r ( " A t t e m p t t o a l l o c a t e B u f f e r l a r g e r t h a n m a x i m u m s i z e : 0 x " + n d . t o S t r i
` )>-1&&(Pf?ah=ah.split( `
2024-09-28 20:51:35 +08:00
` ).map(function(Rf){return" "+Rf}).join( `
` ).slice(2):ah= `
` +ah.split( `
` ).map(function(Rf){return" "+Rf}).join( `
2024-11-27 11:30:55 +08:00
` ))):ah= $ f.stylize("[Circular]","special")),zd(Gf)){if(Pf&&vf.match(/^ \d + $ /))return ah;Gf=JSON.stringify(""+vf),Gf.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)" $ /)?(Gf=Gf.slice(1,-1),Gf= $ f.stylize(Gf,"name")):(Gf=Gf.replace(/'/g," \\ '").replace(/ \\ "/g,'"').replace(/(^"|" $ )/g,"'"),Gf= $ f.stylize(Gf,"string"))}return Gf+": "+ah}function Rd( $ f,Zf,Xf){var Tf= $ f.reduce(function(vf,Pf){return Pf.indexOf( `
` )>=0,vf+Pf.replace(/ \u 001b \[ \d \d ?m/g,"").length+1},0);return Tf>60?Xf[0]+(Zf===""?"":Zf+ `
2024-11-22 15:41:57 +08:00
` )+" "+ $ f.join( ` ,
2024-11-27 11:30:55 +08:00
` )+" "+Xf[1]:Xf[0]+Zf+" "+ $ f.join(", ")+" "+Xf[1]}Ra.types=types;function Od( $ f){return Array.isArray( $ f)}Ra.isArray=Od;function kd( $ f){return typeof $ f=="boolean"}Ra.isBoolean=kd;function Fd( $ f){return $ f===null}Ra.isNull=Fd;function Ud( $ f){return $ f==null}Ra.isNullOrUndefined=Ud;function Hd( $ f){return typeof $ f=="number"}Ra.isNumber=Hd;function Vd( $ f){return typeof $ f=="string"}Ra.isString=Vd;function Zd( $ f){return typeof $ f=="symbol"}Ra.isSymbol=Zd;function zd( $ f){return $ f===void 0}Ra.isUndefined=zd;function Xd( $ f){return Qd( $ f)&&gf( $ f)==="[object RegExp]"}Ra.isRegExp=Xd,Ra.types.isRegExp=Xd;function Qd( $ f){return typeof $ f=="object"&& $ f!==null}Ra.isObject=Qd;function hf( $ f){return Qd( $ f)&&gf( $ f)==="[object Date]"}Ra.isDate=hf,Ra.types.isDate=hf;function bf( $ f){return Qd( $ f)&&(gf( $ f)==="[object Error]"|| $ f instanceof Error)}Ra.isError=bf,Ra.types.isNativeError=bf;function yf( $ f){return typeof $ f=="function"}Ra.isFunction=yf;function _f( $ f){return $ f===null||typeof $ f=="boolean"||typeof $ f=="number"||typeof $ f=="string"||typeof $ f=="symbol"||typeof $ f>"u"}Ra.isPrimitive=_f,Ra.isBuffer=isBufferBrowser;function gf( $ f){return Object.prototype.toString.call( $ f)}function xf( $ f){return $ f<10?"0"+ $ f.toString(10): $ f.toString(10)}var Mf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Yf(){var $ f=new Date,Zf=[xf( $ f.getHours()),xf( $ f.getMinutes()),xf( $ f.getSeconds())].join(":");return[ $ f.getDate(),Mf[ $ f.getMonth()],Zf].join(" ")}Ra.log=function(){console.log("%s - %s",Yf(),Ra.format.apply(Ra,arguments))},Ra.inherits=inherits_browserExports,Ra._extend=function( $ f,Zf){if(!Zf||!Qd(Zf))return $ f;for(var Xf=Object.keys(Zf),Tf=Xf.length;Tf--;) $ f[Xf[Tf]]=Zf[Xf[Tf]];return $ f};function Qf( $ f,Zf){return Object.prototype.hasOwnProperty.call( $ f,Zf)}var qf=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Ra.promisify=function(Zf){if(typeof Zf!="function")throw new TypeError('The "original" argument must be of type Function');if(qf&&Zf[qf]){var Xf=Zf[qf];if(typeof Xf!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Xf,qf,{value:Xf,enumerable:!1,writable:!1,configurable:!0}),Xf}function Xf(){for(var Tf,vf,Pf=new Promise(function(Wf,Rf){Tf=Wf,vf=Rf}),Gf=[],ah=0;ah<arguments.length;ah++)Gf.push(arguments[ah]);Gf.push(function(Wf,Rf){Wf?vf(Wf):Tf(Rf)});try{Zf.apply(this,Gf)}catch(Wf){vf(Wf)}return Pf}return Object.setPrototypeOf(Xf,Object.getPrototypeOf(Zf)),qf&&Object.defineProperty(Xf,qf,{value:Xf,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Xf,rd(Zf))},Ra.promisify.custom=qf;function Bf( $ f,Zf){if(! $ f){var Xf=new Error("Promise was rejected with a falsy value");Xf.reason= $ f, $ f=Xf}return Zf( $ f)}function Df( $ f){if(typeof $ f!="function")throw new TypeError('The "original" argument must be of type Function');function Zf(){for(var Xf=[],Tf=0;Tf<arguments.length;Tf++)Xf.push(arguments[Tf]);var vf=Xf.pop();if(typeof vf!="function")throw new TypeError("The last argument must be of type Function");var Pf=this,Gf=function(){return vf.apply(Pf,arguments)}; $ f.apply(this,Xf).then(function(ah){qa.nextTick(Gf.bind(null,null,ah))},function(ah){qa.nextTick(Bf.bind(null,ah,Gf))})}return Object.setPrototypeOf(Zf,Object.getPrototypeOf( $ f)),Object.defineProperties(Zf,rd( $ f)),Zf}Ra.callbackify=Df})(util $ 5);var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function Ra(Ad,Nd){var Ld=Object.keys(Ad);if(Object.getOwnPropertySymbols){var Rd=Object.getOwnPropertySymbols(Ad);Nd&&(Rd=Rd.filter(function(Od){return Object.getOwnPropertyDescriptor(Ad,Od).enumerable})),Ld.push.apply(Ld,Rd)}return Ld}function qa(Ad){for(var Nd=1;Nd<arguments.length;Nd++){var Ld=arguments[Nd]!=null?arguments[Nd]:{};Nd%2?Ra(Object(Ld),!0).forEach(function(Rd){td(Ad,Rd,Ld[Rd])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ad,Object.getOwnPropertyDescriptors(Ld)):Ra(Object(Ld)).forEach(function(Rd){Object.defineProperty(Ad,Rd,Object.getOwnPropertyDescript
2024-09-25 14:23:53 +08:00
` ,td);td=nd===-1?Ra.length:nd}else if(rd!==-1&&Ra[td]==="/"&&Ra[td+1]==="*"){let nd=Ra.indexOf("*/",td);nd!==-1?(td=nd+2,rd=Ra.indexOf("*/",td)):(qa+=Ra[td],td++)}else qa+=Ra[td],td++;return qa}function parseParams(Ra){const qa=stripComments(Ra.toString());let td=qa.match(FN_ARGS);if(td||(td=qa.match(ARROW_FN_ARGS)),!td)throw new Error( ` could not parse args in autoInject
2024-09-18 09:46:23 +08:00
Source :
2024-11-27 11:30:55 +08:00
` +qa);let[,rd]=td;return rd.replace(/ \s /g,"").split(FN_ARG_SPLIT).map(nd=>nd.replace(FN_ARG,"").trim())}function autoInject(Ra,qa){var td={};return Object.keys(Ra).forEach(rd=>{var nd=Ra[rd],ad,sd=isAsync(nd),ud=!sd&&nd.length===1||sd&&nd.length===0;if(Array.isArray(nd))ad=[...nd],nd=ad.pop(),td[rd]=ad.concat(ad.length>0?cd:nd);else if(ud)td[rd]=nd;else{if(ad=parseParams(nd),nd.length===0&&!sd&&ad.length===0)throw new Error("autoInject task functions require explicit parameters.");sd||ad.pop(),td[rd]=ad.concat(cd)}function cd(dd,pd){var fd=ad.map(Td=>dd[Td]);fd.push(pd),wrapAsync(nd)(...fd)}}),auto(td,qa)}class DLL{constructor(){this.head=this.tail=null,this.length=0}removeLink(qa){return qa.prev?qa.prev.next=qa.next:this.head=qa.next,qa.next?qa.next.prev=qa.prev:this.tail=qa.prev,qa.prev=qa.next=null,this.length-=1,qa}empty(){for(;this.head;)this.shift();return this}insertAfter(qa,td){td.prev=qa,td.next=qa.next,qa.next?qa.next.prev=td:this.tail=td,qa.next=td,this.length+=1}insertBefore(qa,td){td.prev=qa.prev,td.next=qa,qa.prev?qa.prev.next=td:this.head=td,qa.prev=td,this.length+=1}unshift(qa){this.head?this.insertBefore(this.head,qa):setInitial(this,qa)}push(qa){this.tail?this.insertAfter(this.tail,qa):setInitial(this,qa)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var qa=this.head;qa;)yield qa.data,qa=qa.next}remove(qa){for(var td=this.head;td;){var{next:rd}=td;qa(td)&&this.removeLink(td),td=rd}return this}}function setInitial(Ra,qa){Ra.length=1,Ra.head=Ra.tail=qa}function queue $ 1(Ra,qa,td){if(qa==null)qa=1;else if(qa===0)throw new RangeError("Concurrency must not be zero");var rd=wrapAsync(Ra),nd=0,ad=[];const sd={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function ud(Od,kd){sd[Od].push(kd)}function cd(Od,kd){const Fd=(...Ud)=>{dd(Od,Fd),kd(...Ud)};sd[Od].push(Fd)}function dd(Od,kd){if(!Od)return Object.keys(sd).forEach(Fd=>sd[Fd]=[]);if(!kd)return sd[Od]=[];sd[Od]=sd[Od].filter(Fd=>Fd!==kd)}function pd(Od,...kd){sd[Od].forEach(Fd=>Fd(...kd))}var fd=!1;function Td(Od,kd,Fd,Ud){if(Ud!=null&&typeof Ud!="function")throw new Error("task callback must be a function");Rd.started=!0;var Hd,Vd;function Zd(Xd,...Qd){if(Xd)return Fd?Vd(Xd):Hd();if(Qd.length<=1)return Hd(Qd[0]);Hd(Qd)}var zd=Rd._createTaskItem(Od,Fd?Zd:Ud||Zd);if(kd?Rd._tasks.unshift(zd):Rd._tasks.push(zd),fd||(fd=!0,setImmediate $ 1 $ 1(()=>{fd=!1,Rd.process()})),Fd||!Ud)return new Promise((Xd,Qd)=>{Hd=Xd,Vd=Qd})}function Sd(Od){return function(kd,...Fd){nd-=1;for(var Ud=0,Hd=Od.length;Ud<Hd;Ud++){var Vd=Od[Ud],Zd=ad.indexOf(Vd);Zd===0?ad.shift():Zd>0&&ad.splice(Zd,1),Vd.callback(kd,...Fd),kd!=null&&pd("error",kd,Vd.data)}nd<=Rd.concurrency-Rd.buffer&&pd("unsaturated"),Rd.idle()&&pd("drain"),Rd.process()}}function Ad(Od){return Od.length===0&&Rd.idle()?(setImmediate $ 1 $ 1(()=>pd("drain")),!0):!1}const Nd=Od=>kd=>{if(!kd)return new Promise((Fd,Ud)=>{cd(Od,(Hd,Vd)=>{if(Hd)return Ud(Hd);Fd(Vd)})});dd(Od),ud(Od,kd)};var Ld=!1,Rd={_tasks:new DLL,_createTaskItem(Od,kd){return{data:Od,callback:kd}},*[Symbol.iterator](){yield*Rd._tasks[Symbol.iterator]()},concurrency:qa,payload:td,buffer:qa/4,started:!1,paused:!1,push(Od,kd){return Array.isArray(Od)?Ad(Od)?void 0:Od.map(Fd=>Td(Fd,!1,!1,kd)):Td(Od,!1,!1,kd)},pushAsync(Od,kd){return Array.isArray(Od)?Ad(Od)?void 0:Od.map(Fd=>Td(Fd,!1,!0,kd)):Td(Od,!1,!0,kd)},kill(){dd(),Rd._tasks.empty()},unshift(Od,kd){return Array.isArray(Od)?Ad(Od)?void 0:Od.map(Fd=>Td(Fd,!0,!1,kd)):Td(Od,!0,!1,kd)},unshiftAsync(Od,kd){return Array.isArray(Od)?Ad(Od)?void 0:Od.map(Fd=>Td(Fd,!0,!0,kd)):Td(Od,!0,!0,kd)},remove(Od){Rd._tasks.remove(Od)},process(){if(!Ld){for(Ld=!0;!Rd.paused&&nd<Rd.concurrency&&Rd._tasks.length;){var Od=[],kd=[],Fd=Rd._tasks.length;Rd.payload&&(Fd=Math.min(Fd,Rd.payload));for(var Ud=0;Ud<Fd;Ud++){var Hd=Rd._tasks.shift();Od.push(Hd),ad.push(Hd),kd.push(Hd.data)}nd+=1,Rd._tasks.length===0&&pd("empty"),nd===Rd.concurrency&&pd("saturated");var Vd=onlyOnce(Sd(Od));rd(kd,Vd)}Ld=!1}},length(){return Rd._tasks.
2024-09-18 09:46:23 +08:00
* @ license
* Lodash < https : //lodash.com/>
* Copyright OpenJS Foundation and other contributors < https : //openjsf.org/>
* Released under MIT license < https : //lodash.com/license>
* Based on Underscore . js 1.8 . 3 < http : //underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas , DocumentCloud and Investigative Reporters & Editors
2024-11-27 11:30:55 +08:00
* /lodash.exports;(function(Ra,qa){(function(){var td,rd="4.17.21",nd=200,ad="Unsupported core-js use. Try https:/ / npms . io / search ? q = ponyfill . ",sd=" Expected a function ",ud=" Invalid ` variable ` option passed into ` _.template ` ",cd=" _ _lodash _hash _undefined _ _ ",dd=500,pd=" _ _lodash _placeholder _ _ ",fd=1,Td=2,Sd=4,Ad=1,Nd=2,Ld=1,Rd=2,Od=4,kd=8,Fd=16,Ud=32,Hd=64,Vd=128,Zd=256,zd=512,Xd=30,Qd=" ... ",hf=800,bf=16,yf=1,_f=2,gf=3,xf=1/0,Mf=9007199254740991,Yf=17976931348623157e292,Qf=NaN,qf=4294967295,Bf=qf-1,Df=qf>>>1,$f=[[" ary ",Vd],[" bind ",Ld],[" bindKey ",Rd],[" curry ",kd],[" curryRight ",Fd],[" flip ",zd],[" partial ",Ud],[" partialRight ",Hd],[" rearg ",Zd]],Zf=" [ object Arguments ] ",Xf=" [ object Array ] ",Tf=" [ object AsyncFunction ] ",vf=" [ object Boolean ] ",Pf=" [ object Date ] ",Gf=" [ object DOMException ] ",ah=" [ object Error ] ",Wf=" [ object Function ] ",Rf=" [ object GeneratorFunction ] ",Vf=" [ object Map ] ",lh=" [ object Number ] ",Uf=" [ object Null ] ",wf=" [ object Object ] ",Of=" [ object Promise ] ",jf=" [ object Proxy ] ",uh=" [ object RegExp ] ",_h=" [ object Set ] ",nh=" [ object String ] ",wh=" [ object Symbol ] ",hh=" [ object Undefined ] ",Th=" [ object WeakMap ] ",Vh=" [ object WeakSet ] ",Bh=" [ object ArrayBuffer ] ",Yh=" [ object DataView ] ",dm=" [ object Float32Array ] ",rh=" [ object Float64Array ] ",If=" [ object Int8Array ] ",Nf=" [ object Int16Array ] ",Jf=" [ object Int32Array ] ",oh=" [ object Uint8Array ] ",xh=" [ object Uint8ClampedArray ] ",Oh=" [ object Uint16Array ] ",Xh=" [ object Uint32Array ] ",gm=/\b__p \+= '';/g,lm=/\b(__p \+=) '' \+/g,Hm=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Rm=/&(?:amp|lt|gt|quot|#39);/g,Pm=/[&<>" ']/g,e_=RegExp(Rm.source),U_=RegExp(Pm.source),C_=/<%-([\s\S]+?)%>/g,A_=/<%([\s\S]+?)%>/g,Zm=/<%=([\s\S]+?)%>/g,L_=/\.|\[(?:[^[\]]*|(["' ] ) ( ? : ( ? ! \ 1 ) [ ^ \ \ ] | \ \ . ) * ? \ 1 ) \ ] / , V _ = /^\w*$/ , Q _ = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g , Z _ = /[\\^$.*+?()[\]{}|]/g , H _ = RegExp ( Z _ . source ) , O _ = /^\s+/ , $m = /\s/ , Rg = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/ , Hg = /\{\n\/\* \[wrapped with (.+)\] \*/ , um = /,? & / , Cf = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g , ch = /[()=,{}\[\]\/\s]/ , eh = /\\(\\)?/g , dh = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g , yh = /\w*$/ , vh = /^[-+]0x[0-9a-f]+$/i , kh = /^0b[01]+$/i , Rh = /^\[object .+?Constructor\]$/ , mh = /^0o[0-7]+$/i , im = /^(?:0|[1-9]\d*)$/ , fm = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g , Gm = /($^)/ , Nm = /['\n\r\u2028\u2029\\]/g , Ym = "\\ud800-\\udfff" , S _ = "\\u0300-\\u036f" , w _ = "\\ufe20-\\ufe2f" , p _ = "\\u20d0-\\u20ff" , Om = S _ + w _ + p _ , z _ = "\\u2700-\\u27bf" , m _ = "a-z\\xdf-\\xf6\\xf8-\\xff" , a _ = "\\xac\\xb1\\xd7\\xf7" , Um = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf" , y _ = "\\u2000-\\u206f" , Zg = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000" , e0 = "A-Z\\xc0-\\xd6\\xd8-\\xde" , _m = "\\ufe0e\\ufe0f" , s _ = a _ + Um + y _ + Zg , kg = "['’ ]" , h0 = "[" + Ym + "]" , m0 = "[" + s _ + "]" , Gg = "[" + Om + "]" , t0 = "\\d+" , o _ = "[" + z _ + "]" , Mg = "[" + m _ + "]" , W _ = "[^" + Ym + s _ + t0 + z _ + m _ + e0 + "]" , gg = "\\ud83c[\\udffb-\\udfff]" , og = "(?:" + Gg + "|" + gg + ")" , r0 = "[^" + Ym + "]" , k0 = "(?:\\ud83c[\\udde6-\\uddff]){2}" , bg = "[\\ud800-\\udbff][\\udc00-\\udfff]" , n0 = "[" + e0 + "]" , Ab = "\\u200d" , ab = "(?:" + Mg + "|" + W _ + ")" , r _ = "(?:" + n0 + "|" + W _ + ")" , sb = "(?:" + kg + "(?:d|ll|m|re|s|t|ve))?" , z0 = "(?:" + kg + "(?:D|LL|M|RE|S|T|VE))?" , wb = og + "?" , rv = "[" + _m + "]?" , nv = "(?:" + Ab + "(?:" + [ r0 , k0 , bg ] . join ( "|" ) + ")" + rv + wb + ")*" , W0 = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])" , lg = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])" , qg = rv + wb + nv , _0 = "(?:" + [ o _ , k0 , bg ] . join ( "|" ) + ")" + qg , Y0 = "(?:" + [ r0 + Gg + "?" , Gg , k0 , bg , h0 ] . join ( "|" ) + ")" , ob = RegExp ( kg , "g" ) , b1 = RegExp ( Gg , "g" ) , $v = RegExp ( gg + "(?=" + gg + ")|" + Y0 + qg , "g" ) , v1 = RegExp ( [ n0 + "?" + Mg + "+" + sb + "(?=" + [ m0 , n0 , "$" ] . join ( "|" ) + ")" , r _ + "+" + z0 + "(?=" + [ m0 , n0 + ab , "$" ] . join ( "|" ) + ")" , n0 + "?" + ab + "+" + sb , n0 + "+" + z0 , lg , W0 , t0 , _0 ] . join ( "|" ) , "g" ) , Dy = RegExp ( "[" + Ab + Ym + Om + _m + "]" ) , Lv = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/ , y1 = [ "Array" , "Buffer" , "DataView" , "Date" , "Error" , "Float32Array" , "Float64Array" , "Function" , "Int8Array" , "Int16Array" , "Int32Array" , "Map" , "Math" , "Object" , "Promise" , "RegExp" , "Set" , "String" , "Symbol" , "TypeError" , "Uint8Array" , "Uint8ClampedArray" , "Uint16Array" , "Uint32Array" , "WeakMap" , "_" , " clearTim
/* [wrapped with `+Jd+`] */
` )}function jd(Gd){return g_(Gd)||_1(Gd)||!!(PE&&Gd&&Gd[PE])}function Kd(Gd,Jd){var Ef=typeof Gd;return Jd=Jd??Mf,!!Jd&&(Ef=="number"||Ef!="symbol"&&im.test(Gd))&&Gd>-1&&Gd%1==0&&Gd<Jd}function Yd(Gd,Jd,Ef){if(!pg(Ef))return!1;var Lf=typeof Jd;return(Lf=="number"?d0(Ef)&&Kd(Jd,Ef.length):Lf=="string"&&Jd in Ef)?nb(Ef[Jd],Gd):!1}function df(Gd,Jd){if(g_(Gd))return!1;var Ef=typeof Gd;return Ef=="number"||Ef=="symbol"||Ef=="boolean"||Gd==null||I0(Gd)?!0:V_.test(Gd)||!L_.test(Gd)||Jd!=null&&Gd in G_(Jd)}function Sf(Gd){var Jd=typeof Gd;return Jd=="string"||Jd=="number"||Jd=="symbol"||Jd=="boolean"?Gd!=="__proto__":Gd===null}function kf(Gd){var Jd=h1(Gd),Ef=ph[Jd];if(typeof Ef!="function"||!(Jd in u_.prototype))return!1;if(Gd===Ef)return!0;var Lf=f1(Ef);return!!Lf&&Gd===Lf[0]}function Ff(Gd){return!!R1&&R1 in Gd}var Kf=Q0?Jb:yT;function th(Gd){var Jd=Gd&&Gd.constructor,Ef=typeof Jd=="function"&&Jd.prototype||y0;return Gd===Ef}function bh(Gd){return Gd===Gd&&!pg(Gd)}function Ah(Gd,Jd){return function(Ef){return Ef==null?!1:Ef[Gd]===Jd&&(Jd!==td||Gd in G_(Ef))}}function Hh(Gd){var Jd=C2(Gd,function(Lf){return Ef.size===dd&&Ef.clear(),Lf}),Ef=Jd.cache;return Jd}function jh(Gd,Jd){var Ef=Gd[1],Lf=Jd[1],ih=Ef|Lf,fh=ih<(Ld|Rd|Vd),Mh=Lf==Vd&&Ef==kd||Lf==Vd&&Ef==Zd&&Gd[7].length<=Jd[8]||Lf==(Vd|Zd)&&Jd[7].length<=Jd[8]&&Ef==kd;if(!(fh||Mh))return Gd;Lf&Ld&&(Gd[2]=Jd[2],ih|=Ef&Ld?0:Od);var $ h=Jd[3];if( $ h){var qh=Gd[3];Gd[3]=qh?Y1(qh, $ h,Jd[4]): $ h,Gd[4]=qh?Wg(Gd[3],pd):Jd[4]}return $ h=Jd[5], $ h&&(qh=Gd[5],Gd[5]=qh?bE(qh, $ h,Jd[6]): $ h,Gd[6]=qh?Wg(Gd[5],pd):Jd[6]), $ h=Jd[7], $ h&&(Gd[7]= $ h),Lf&Vd&&(Gd[8]=Gd[8]==null?Jd[8]:hg(Gd[8],Jd[8])),Gd[9]==null&&(Gd[9]=Jd[9]),Gd[0]=Jd[0],Gd[1]=ih,Gd}function cm(Gd){var Jd=[];if(Gd!=null)for(var Ef in G_(Gd))Jd.push(Ef);return Jd}function mm(Gd){return B0.call(Gd)}function Im(Gd,Jd,Ef){return Jd=J_(Jd===td?Gd.length-1:Jd,0),function(){for(var Lf=arguments,ih=-1,fh=J_(Lf.length-Jd,0),Mh=Zh(fh);++ih<fh;)Mh[ih]=Lf[Jd+ih];ih=-1;for(var $ h=Zh(Jd+1);++ih<Jd;) $ h[ih]=Lf[ih];return $ h[Jd]=Ef(Mh),Fg(Gd,this, $ h)}}function jm(Gd,Jd){return Jd.length<2?Gd:gb(Gd,Tg(Jd,0,-1))}function Vm(Gd,Jd){for(var Ef=Gd.length,Lf=hg(Jd.length,Ef),ih=zg(Gd);Lf--;){var fh=Jd[Lf];Gd[Lf]=Kd(fh,Ef)?ih[fh]:td}return Gd}function Fm(Gd,Jd){if(!(Jd==="constructor"&&typeof Gd[Jd]=="function")&&Jd!="__proto__")return Gd[Jd]}var Wm=j_(l2),n_=P1||function(Gd,Jd){return B_.setTimeout(Gd,Jd)},t_=j_(K2);function __(Gd,Jd,Ef){var Lf=Jd+"";return t_(Gd,Dd(Lf,cg(ag(Lf),Ef)))}function j_(Gd){var Jd=0,Ef=0;return function(){var Lf=M2(),ih=bf-(Lf-Ef);if(Ef=Lf,ih>0){if(++Jd>=hf)return arguments[0]}else Jd=0;return Gd.apply(td,arguments)}}function sg(Gd,Jd){var Ef=-1,Lf=Gd.length,ih=Lf-1;for(Jd=Jd===td?Lf:Jd;++Ef<Jd;){var fh=V1(Ef,ih),Mh=Gd[fh];Gd[fh]=Gd[Ef],Gd[Ef]=Mh}return Gd.length=Jd,Gd}var X_=Hh(function(Gd){var Jd=[];return Gd.charCodeAt(0)===46&&Jd.push(""),Gd.replace(Q_,function(Ef,Lf,ih,fh){Jd.push(ih?fh.replace(eh," $ 1"):Lf||Ef)}),Jd});function rg(Gd){if(typeof Gd=="string"||I0(Gd))return Gd;var Jd=Gd+"";return Jd=="0"&&1/Gd==-xf?"-0":Jd}function ug(Gd){if(Gd!=null){try{return dv.call(Gd)}catch{}try{return Gd+""}catch{}}return""}function cg(Gd,Jd){return Vg( $ f,function(Ef){var Lf="_."+Ef[0];Jd&Ef[1]&&!sv(Gd,Lf)&&Gd.push(Lf)}),Gd.sort()}function Bg(Gd){if(Gd instanceof u_)return Gd.clone();var Jd=new $ _(Gd.__wrapped__,Gd.__chain__);return Jd.__actions__=zg(Gd.__actions__),Jd.__index__=Gd.__index__,Jd.__values__=Gd.__values__,Jd}function Dg(Gd,Jd,Ef){(Ef?Yd(Gd,Jd,Ef):Jd===td)?Jd=1:Jd=J_(v_(Jd),0);var Lf=Gd==null?0:Gd.length;if(!Lf||Jd<1)return[];for(var ih=0,fh=0,Mh=Zh(zv(Lf/Jd));ih<Lf;)Mh[fh++]=Tg(Gd,ih,ih+=Jd);return Mh}function mg(Gd){for(var Jd=-1,Ef=Gd==null?0:Gd.length,Lf=0,ih=[];++Jd<Ef;){var fh=Gd[Jd];fh&&(ih[Lf++]=fh)}return ih}function dg(){var Gd=arguments.length;if(!Gd)return[];for(var Jd=Zh(Gd-1),Ef=arguments[0],Lf=Gd;Lf--;)Jd[Lf-1]=arguments[Lf];return b0(g_(Ef)?zg(Ef):[Ef],Eg(Jd,1))}var ng=b_(function(Gd,Jd){return Cg(Gd)?Zv(Gd,Eg(Jd,1,Cg,!0)):[]}),Ug=b_(function(Gd,Jd){var Ef=q0(Jd);return Cg(Ef)&&(Ef=td),Cg(Gd)?Zv(Gd,Eg(Jd,1,Cg,!0
2024-09-25 14:23:53 +08:00
` ;Gd.replace(Km,function(d_,x_,I_,O0,Jg,R0){return I_||(I_=O0),Dm+=Gd.slice(Tm,R0).replace(Nm,Mb),x_&&( $ h=!0,Dm+= ` ' +
_ _e ( ` +x_+ ` ) +
'`),Jg&&(qh=!0,Dm+=`' ;
` +Jg+ ` ;
_ _p += '`),I_&&(Dm+=`' +
( ( _ _t = ( ` +I_+ ` ) ) == null ? '' : _ _t ) +
'`),Tm=R0+d_.length,d_}),Dm+=`' ;
2024-11-27 11:30:55 +08:00
` ;var c_=P_.call(Jd,"variable")&&Jd.variable;if(!c_)Dm= ` with ( obj ) {
2024-09-25 14:23:53 +08:00
` +Dm+ `
2024-09-18 09:46:23 +08:00
}
2024-09-28 20:51:35 +08:00
` ;else if(ch.test(c_))throw new h_(ud);Dm=(qh?Dm.replace(gm,""):Dm).replace(lm," $ 1").replace(Hm," $ 1;"),Dm="function("+(c_||"obj")+ ` ) {
2024-09-25 14:23:53 +08:00
` +(c_?"": ` obj || ( obj = { } ) ;
` )+"var __t, __p = ''"+( $ h?", __e = _.escape":"")+(qh? ` , _ _j = Array . prototype . join ;
2024-09-18 09:46:23 +08:00
function print ( ) { _ _p += _ _j . call ( arguments , '' ) }
` : ` ;
2024-09-25 14:23:53 +08:00
` )+Dm+ ` return _ _p
2024-11-27 11:30:55 +08:00
} ` ;var E_=ZT(function(){return N_(fh,i_+"return "+Dm).apply(td,Mh)});if(E_.source=Dm,cT(E_))throw E_;return E_}function bA(Gd){return q_(Gd).toLowerCase()}function vA(Gd){return q_(Gd).toUpperCase()}function yA(Gd,Jd,Ef){if(Gd=q_(Gd),Gd&&(Ef||Jd===td))return Xm(Gd);if(!Gd||!(Jd=Xg(Jd)))return Gd;var Lf=v0(Gd),ih=v0(Jd),fh=R_(Lf,ih),Mh=vg(Lf,ih)+1;return rb(Lf,fh,Mh).join("")}function EA(Gd,Jd,Ef){if(Gd=q_(Gd),Gd&&(Ef||Jd===td))return Gd.slice(0,Py(Gd)+1);if(!Gd||!(Jd=Xg(Jd)))return Gd;var Lf=v0(Gd),ih=vg(Lf,v0(Jd))+1;return rb(Lf,0,ih).join("")}function TA(Gd,Jd,Ef){if(Gd=q_(Gd),Gd&&(Ef||Jd===td))return Gd.replace(O_,"");if(!Gd||!(Jd=Xg(Jd)))return Gd;var Lf=v0(Gd),ih=R_(Lf,v0(Jd));return rb(Lf,ih).join("")}function SA(Gd,Jd){var Ef=Xd,Lf=Qd;if(pg(Jd)){var ih="separator"in Jd?Jd.separator:ih;Ef="length"in Jd?v_(Jd.length):Ef,Lf="omission"in Jd?Xg(Jd.omission):Lf}Gd=q_(Gd);var fh=Gd.length;if(uv(Gd)){var Mh=v0(Gd);fh=Mh.length}if(Ef>=fh)return Gd;var $ h=Ef-cv(Lf);if( $ h<1)return Lf;var qh=Mh?rb(Mh,0, $ h).join(""):Gd.slice(0, $ h);if(ih===td)return qh+Lf;if(Mh&&( $ h+=qh.length- $ h),dT(ih)){if(Gd.slice( $ h).search(ih)){var Tm,Sm=qh;for(ih.global||(ih=Vv(ih.source,q_(yh.exec(ih))+"g")),ih.lastIndex=0;Tm=ih.exec(Sm);)var Dm=Tm.index;qh=qh.slice(0,Dm===td? $ h:Dm)}}else if(Gd.indexOf(Xg(ih), $ h)!= $ h){var Km=qh.lastIndexOf(ih);Km>-1&&(qh=qh.slice(0,Km))}return qh+Lf}function xA(Gd){return Gd=q_(Gd),Gd&&e_.test(Gd)?Gd.replace(Rm,OE):Gd}var CA=Ov(function(Gd,Jd,Ef){return Gd+(Ef?" ":"")+Jd.toUpperCase()}),hT=h2("toUpperCase");function JT(Gd,Jd,Ef){return Gd=q_(Gd),Jd=Ef?td:Jd,Jd===td?NE(Gd)?kE(Gd):Iy(Gd):Gd.match(Jd)||[]}var ZT=b_(function(Gd,Jd){try{return Fg(Gd,td,Jd)}catch(Ef){return cT(Ef)?Ef:new h_(Ef)}}),AA=U0(function(Gd,Jd){return Vg(Jd,function(Ef){Ef=rg(Ef),eb(Gd,Ef,lT(Gd[Ef],Gd))}),Gd});function wA(Gd){var Jd=Gd==null?0:Gd.length,Ef=l_();return Gd=Jd?Y_(Gd,function(Lf){if(typeof Lf[1]!="function")throw new o0(sd);return[Ef(Lf[0]),Lf[1]]}):[],b_(function(Lf){for(var ih=-1;++ih<Jd;){var fh=Gd[ih];if(Fg(fh[0],this,Lf))return Fg(fh[1],this,Lf)}})}function NA(Gd){return V2(Kg(Gd,fd))}function mT(Gd){return function(){return Gd}}function DA(Gd,Jd){return Gd==null||Gd!==Gd?Jd:Gd}var IA=m2(),OA=m2(!0);function f0(Gd){return Gd}function _T(Gd){return xv(typeof Gd=="function"?Gd:Kg(Gd,fd))}function RA(Gd){return r2(Kg(Gd,fd))}function kA(Gd,Jd){return dE(Gd,Kg(Jd,fd))}var MA=b_(function(Gd,Jd){return function(Ef){return Tv(Ef,Gd,Jd)}}),PA=b_(function(Gd,Jd){return function(Ef){return Tv(Gd,Ef,Jd)}});function gT(Gd,Jd,Ef){var Lf=Lg(Jd),ih=G1(Jd,Lf);Ef==null&&!(pg(Jd)&&(ih.length||!Lf.length))&&(Ef=Jd,Jd=Gd,Gd=this,ih=G1(Jd,Lg(Jd)));var fh=!(pg(Ef)&&"chain"in Ef)||!!Ef.chain,Mh=Jb(Gd);return Vg(ih,function( $ h){var qh=Jd[ $ h];Gd[ $ h]=qh,Mh&&(Gd.prototype[ $ h]=function(){var Tm=this.__chain__;if(fh||Tm){var Sm=Gd(this.__wrapped__),Dm=Sm.__actions__=zg(this.__actions__);return Dm.push({func:qh,args:arguments,thisArg:Gd}),Sm.__chain__=Tm,Sm}return qh.apply(Gd,b0([this.value()],arguments))})}),Gd}function BA(){return B_._===this&&(B_._=jg),this}function bT(){}function $ A(Gd){return Gd=v_(Gd),b_(function(Jd){return Av(Jd,Gd)})}var LA=X1(Y_),FA=X1(Rb),jA=X1(ub);function eS(Gd){return df(Gd)?sh(rg(Gd)):W2(Gd)}function UA(Gd){return function(Jd){return Gd==null?td:gb(Gd,Jd)}}var HA=Qb(),GA=Qb(!0);function vT(){return[]}function yT(){return!1}function qA(){return{}}function VA(){return""}function zA(){return!0}function WA(Gd,Jd){if(Gd=v_(Gd),Gd<1||Gd>Mf)return[];var Ef=qf,Lf=hg(Gd,qf);Jd=l_(Jd),Gd-=qf;for(var ih=Lm(Lf,Jd);++Ef<Gd;)Jd(Ef);return ih}function YA(Gd){return g_(Gd)?Y_(Gd,rg):I0(Gd)?[Gd]:zg(X_(q_(Gd)))}function KA(Gd){var Jd=++ME;return q_(Gd)+Jd}var XA=Rv(function(Gd,Jd){return Gd+Jd},0),QA=TE("ceil"),JA=Rv(function(Gd,Jd){return Gd/Jd},1),ZA=TE("floor");function ew(Gd){return Gd&&Gd.length?U1(Gd,f0,q1):td}function tw(Gd,Jd){return Gd&&Gd.length?U1(Gd,l_(Jd,2),q1):td}function rw(Gd){return zf(Gd,f0)}function nw(Gd,Jd){return zf(Gd,l_(Jd,2))}function iw(Gd){return Gd&&Gd.length?U1(Gd,f0,Yb):td}function aw(Gd,Jd){return Gd&&Gd.length?U1(Gd,l_
2024-09-25 14:23:53 +08:00
` :"")),td&&td()}function ad(sd){return sd.interrupt?(sd.interrupt.append=Ra,sd.interrupt.end=nd,sd.interrupt=!1,Ra(!0),!0):!1}if(Ra(!1,qa.indents+(qa.name?"<"+qa.name:"")+(qa.attributes.length?" "+qa.attributes.join(" "):"")+(rd?qa.name?">":"":qa.name?"/>":"")+(qa.indent&&rd>1? `
` :"")),!rd)return Ra(!1,qa.indent? `
2024-09-29 10:14:52 +08:00
` :"");ad(qa)||nd()}function attribute(Ra,qa){return Ra+'="'+escapeForXML(qa)+'"'}xml $ 2.exports=xml $ 1;xml $ 2.exports.element=xml $ 2.exports.Element=element;var xmlExports=xml $ 2.exports;const Xml=getDefaultExportFromCjs(xmlExports);var xml2js={},defaults={},hasRequiredDefaults;function requireDefaults(){return hasRequiredDefaults||(hasRequiredDefaults=1,(function(){defaults.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:" $ ",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:" $ $ ",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline: `
2024-11-27 11:30:55 +08:00
` },headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(commonjsGlobal)),defaults}var builder={},lib $ 2={},Utility={},hasRequiredUtility;function requireUtility(){return hasRequiredUtility||(hasRequiredUtility=1,(function(){var Ra,qa,td,rd,nd,ad,sd,ud=[].slice,cd={}.hasOwnProperty;Ra=function(){var dd,pd,fd,Td,Sd,Ad;if(Ad=arguments[0],Sd=2<=arguments.length?ud.call(arguments,1):[],nd(Object.assign))Object.assign.apply(null,arguments);else for(dd=0,fd=Sd.length;dd<fd;dd++)if(Td=Sd[dd],Td!=null)for(pd in Td)cd.call(Td,pd)&&(Ad[pd]=Td[pd]);return Ad},nd=function(dd){return!!dd&&Object.prototype.toString.call(dd)==="[object Function]"},ad=function(dd){var pd;return!!dd&&((pd=typeof dd)=="function"||pd==="object")},td=function(dd){return nd(Array.isArray)?Array.isArray(dd):Object.prototype.toString.call(dd)==="[object Array]"},rd=function(dd){var pd;if(td(dd))return!dd.length;for(pd in dd)if(cd.call(dd,pd))return!1;return!0},sd=function(dd){var pd,fd;return ad(dd)&&(fd=Object.getPrototypeOf(dd))&&(pd=fd.constructor)&&typeof pd=="function"&&pd instanceof pd&&Function.prototype.toString.call(pd)===Function.prototype.toString.call(Object)},qa=function(dd){return nd(dd.valueOf)?dd.valueOf():dd},Utility.assign=Ra,Utility.isFunction=nd,Utility.isObject=ad,Utility.isArray=td,Utility.isEmpty=rd,Utility.isPlainObject=sd,Utility.getValue=qa}).call(commonjsGlobal)),Utility}var XMLDOMImplementation={exports:{}},hasRequiredXMLDOMImplementation;function requireXMLDOMImplementation(){return hasRequiredXMLDOMImplementation||(hasRequiredXMLDOMImplementation=1,(function(){XMLDOMImplementation.exports=function(){function Ra(){}return Ra.prototype.hasFeature=function(qa,td){return!0},Ra.prototype.createDocumentType=function(qa,td,rd){throw new Error("This DOM method is not implemented.")},Ra.prototype.createDocument=function(qa,td,rd){throw new Error("This DOM method is not implemented.")},Ra.prototype.createHTMLDocument=function(qa){throw new Error("This DOM method is not implemented.")},Ra.prototype.getFeature=function(qa,td){throw new Error("This DOM method is not implemented.")},Ra}()}).call(commonjsGlobal)),XMLDOMImplementation.exports}var XMLDocument={exports:{}},XMLDOMConfiguration={exports:{}},XMLDOMErrorHandler={exports:{}},hasRequiredXMLDOMErrorHandler;function requireXMLDOMErrorHandler(){return hasRequiredXMLDOMErrorHandler||(hasRequiredXMLDOMErrorHandler=1,(function(){XMLDOMErrorHandler.exports=function(){function Ra(){}return Ra.prototype.handleError=function(qa){throw new Error(qa)},Ra}()}).call(commonjsGlobal)),XMLDOMErrorHandler.exports}var XMLDOMStringList={exports:{}},hasRequiredXMLDOMStringList;function requireXMLDOMStringList(){return hasRequiredXMLDOMStringList||(hasRequiredXMLDOMStringList=1,(function(){XMLDOMStringList.exports=function(){function Ra(qa){this.arr=qa||[]}return Object.defineProperty(Ra.prototype,"length",{get:function(){return this.arr.length}}),Ra.prototype.item=function(qa){return this.arr[qa]||null},Ra.prototype.contains=function(qa){return this.arr.indexOf(qa)!==-1},Ra}()}).call(commonjsGlobal)),XMLDOMStringList.exports}var hasRequiredXMLDOMConfiguration;function requireXMLDOMConfiguration(){return hasRequiredXMLDOMConfiguration||(hasRequiredXMLDOMConfiguration=1,(function(){var Ra,qa;Ra=requireXMLDOMErrorHandler(),qa=requireXMLDOMStringList(),XMLDOMConfiguration.exports=function(){function td(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new Ra,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}return Object.defineProperty(td.prototype,"parameterNames",{get:function(){return new qa(Object.keys(this.defaultParams))}}),td.prototype.getParameter=function(rd){return this.params.hasOwnProperty(rd)?this.params[rd]:null},td.prototype.canSetParameter=function(rd,nd){return!0},td.prototype.setParameter=func
` ,sd.offset=(dd=ad.offset)!=null?dd:0,sd.dontPrettyTextNodes=(pd=(fd=ad.dontPrettyTextNodes)!=null?fd:ad.dontprettytextnodes)!=null?pd:0,sd.spaceBeforeSlash=(Td=(Sd=ad.spaceBeforeSlash)!=null?Sd:ad.spacebeforeslash)!=null?Td:"",sd.spaceBeforeSlash===!0&&(sd.spaceBeforeSlash=" "),sd.suppressPrettyCount=0,sd.user={},sd.state=qa.None,sd},nd.prototype.indent=function(ad,sd,ud){var cd;return!sd.pretty||sd.suppressPrettyCount?"":sd.pretty&&(cd=(ud||0)+sd.offset+1,cd>0)?new Array(cd).join(sd.indent):""},nd.prototype.endline=function(ad,sd,ud){return!sd.pretty||sd.suppressPrettyCount?"":sd.newline},nd.prototype.attribute=function(ad,sd,ud){var cd;return this.openAttribute(ad,sd,ud),cd=" "+ad.name+'="'+ad.value+'"',this.closeAttribute(ad,sd,ud),cd},nd.prototype.cdata=function(ad,sd,ud){var cd;return this.openNode(ad,sd,ud),sd.state=qa.OpenTag,cd=this.indent(ad,sd,ud)+"<![CDATA[",sd.state=qa.InsideTag,cd+=ad.value,sd.state=qa.CloseTag,cd+="]]>"+this.endline(ad,sd,ud),sd.state=qa.None,this.closeNode(ad,sd,ud),cd},nd.prototype.comment=function(ad,sd,ud){var cd;return this.openNode(ad,sd,ud),sd.state=qa.OpenTag,cd=this.indent(ad,sd,ud)+"<!-- ",sd.state=qa.InsideTag,cd+=ad.value,sd.state=qa.CloseTag,cd+=" -->"+this.endline(ad,sd,ud),sd.state=qa.None,this.closeNode(ad,sd,ud),cd},nd.prototype.declaration=function(ad,sd,ud){var cd;return this.openNode(ad,sd,ud),sd.state=qa.OpenTag,cd=this.indent(ad,sd,ud)+"<?xml",sd.state=qa.InsideTag,cd+=' version="'+ad.version+'"',ad.encoding!=null&&(cd+=' encoding="'+ad.encoding+'"'),ad.standalone!=null&&(cd+=' standalone="'+ad.standalone+'"'),sd.state=qa.CloseTag,cd+=sd.spaceBeforeSlash+"?>",cd+=this.endline(ad,sd,ud),sd.state=qa.None,this.closeNode(ad,sd,ud),cd},nd.prototype.docType=function(ad,sd,ud){var cd,dd,pd,fd,Td;if(ud||(ud=0),this.openNode(ad,sd,ud),sd.state=qa.OpenTag,fd=this.indent(ad,sd,ud),fd+="<!DOCTYPE "+ad.root().name,ad.pubID&&ad.sysID?fd+=' PUBLIC "'+ad.pubID+'" "'+ad.sysID+'"':ad.sysID&&(fd+=' SYSTEM "'+ad.sysID+'"'),ad.children.length>0){for(fd+=" [",fd+=this.endline(ad,sd,ud),sd.state=qa.InsideTag,Td=ad.children,dd=0,pd=Td.length;dd<pd;dd++)cd=Td[dd],fd+=this.writeChildNode(cd,sd,ud+1);sd.state=qa.CloseTag,fd+="]"}return sd.state=qa.CloseTag,fd+=sd.spaceBeforeSlash+">",fd+=this.endline(ad,sd,ud),sd.state=qa.None,this.closeNode(ad,sd,ud),fd},nd.prototype.element=function(ad,sd,ud){var cd,dd,pd,fd,Td,Sd,Ad,Nd,Ld,Rd,Od,kd,Fd,Ud;ud||(ud=0),Rd=!1,Od="",this.openNode(ad,sd,ud),sd.state=qa.OpenTag,Od+=this.indent(ad,sd,ud)+"<"+ad.name,kd=ad.attribs;for(Ld in kd)rd.call(kd,Ld)&&(cd=kd[Ld],Od+=this.attribute(cd,sd,ud));if(pd=ad.children.length,fd=pd===0?null:ad.children[0],pd===0||ad.children.every(function(Hd){return(Hd.type===Ra.Text||Hd.type===Ra.Raw)&&Hd.value===""}))sd.allowEmpty?(Od+=">",sd.state=qa.CloseTag,Od+="</"+ad.name+">"+this.endline(ad,sd,ud)):(sd.state=qa.CloseTag,Od+=sd.spaceBeforeSlash+"/>"+this.endline(ad,sd,ud));else if(sd.pretty&&pd===1&&(fd.type===Ra.Text||fd.type===Ra.Raw)&&fd.value!=null)Od+=">",sd.state=qa.InsideTag,sd.suppressPrettyCount++,Rd=!0,Od+=this.writeChildNode(fd,sd,ud+1),sd.suppressPrettyCount--,Rd=!1,sd.state=qa.CloseTag,Od+="</"+ad.name+">"+this.endline(ad,sd,ud);else{if(sd.dontPrettyTextNodes){for(Fd=ad.children,Td=0,Ad=Fd.length;Td<Ad;Td++)if(dd=Fd[Td],(dd.type===Ra.Text||dd.type===Ra.Raw)&&dd.value!=null){sd.suppressPrettyCount++,Rd=!0;break}}for(Od+=">"+this.endline(ad,sd,ud),sd.state=qa.InsideTag,Ud=ad.children,Sd=0,Nd=Ud.length;Sd<Nd;Sd++)dd=Ud[Sd],Od+=this.writeChildNode(dd,sd,ud+1);sd.state=qa.CloseTag,Od+=this.indent(ad,sd,ud)+"</"+ad.name+">",Rd&&sd.suppressPrettyCount--,Od+=this.endline(ad,sd,ud),sd.state=qa.None}return this.closeNode(ad,sd,ud),Od},nd.prototype.writeChildNode=function(ad,sd,ud){switch(ad.type){case Ra.CData:return this.cdata(ad,sd,ud);case Ra.Comment:return this.comment(ad,sd,ud);case Ra.Element:return this.element(ad,sd,ud);case Ra.Raw:return this.raw(ad,sd,ud);case Ra.Text:return this.text(ad,sd,ud);case Ra.ProcessingInstruction:return this.processingInstruction(ad,sd,ud);case Ra.Dummy:return"";case Ra.Declaration:return
` ||Tf===" \r "||Tf===" "}function Ud(Tf){return Tf==='"'||Tf==="'"}function Hd(Tf){return Tf===">"||Fd(Tf)}function Vd(Tf,vf){return Tf.test(vf)}function Zd(Tf,vf){return!Vd(Tf,vf)}var zd=0;qa.STATE={BEGIN:zd++,BEGIN_WHITESPACE:zd++,TEXT:zd++,TEXT_ENTITY:zd++,OPEN_WAKA:zd++,SGML_DECL:zd++,SGML_DECL_QUOTED:zd++,DOCTYPE:zd++,DOCTYPE_QUOTED:zd++,DOCTYPE_DTD:zd++,DOCTYPE_DTD_QUOTED:zd++,COMMENT_STARTING:zd++,COMMENT:zd++,COMMENT_ENDING:zd++,COMMENT_ENDED:zd++,CDATA:zd++,CDATA_ENDING:zd++,CDATA_ENDING_2:zd++,PROC_INST:zd++,PROC_INST_BODY:zd++,PROC_INST_ENDING:zd++,OPEN_TAG:zd++,OPEN_TAG_SLASH:zd++,ATTRIB:zd++,ATTRIB_NAME:zd++,ATTRIB_NAME_SAW_WHITE:zd++,ATTRIB_VALUE:zd++,ATTRIB_VALUE_QUOTED:zd++,ATTRIB_VALUE_CLOSED:zd++,ATTRIB_VALUE_UNQUOTED:zd++,ATTRIB_VALUE_ENTITY_Q:zd++,ATTRIB_VALUE_ENTITY_U:zd++,CLOSE_TAG:zd++,CLOSE_TAG_SAW_WHITE:zd++,SCRIPT:zd++,SCRIPT_ENDING:zd++},qa.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},qa.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(qa.ENTITIES).forEach(function(Tf){var vf=qa.ENTITIES[Tf],Pf=typeof vf=="number"?String.fromCharCode(vf):vf;qa.ENTITIES[Tf]=Pf});for(var Xd in qa.STATE)qa.STATE[qa.STATE[Xd]]=Xd;zd=qa.STATE;function Qd(Tf,vf,Pf){Tf[vf]&&Tf[vf](Pf)}function hf(Tf,vf,Pf){Tf.textNode&&bf(Tf),Qd(Tf,vf,Pf)}function bf(Tf){Tf.textNode=yf(Tf.opt,Tf.textNode),Tf.textNode&&Qd(Tf,"ontext",Tf.textNode),Tf.textNode=""}function yf(Tf,vf){return Tf.trim&&(vf=vf.trim()),Tf.normalize&&(vf=vf.replace(/ \s +/g," ")),vf}function _f(Tf,vf){return bf(Tf),Tf.trackPosition&&(vf+= `
Line : ` +Tf.line+ `
Column : ` +Tf.column+ `
Char : ` +Tf.c),vf=new Error(vf),Tf.error=vf,Qd(Tf,"onerror",vf),Tf}function gf(Tf){return Tf.sawRoot&&!Tf.closedRoot&&xf(Tf,"Unclosed root tag"),Tf.state!==zd.BEGIN&&Tf.state!==zd.BEGIN_WHITESPACE&&Tf.state!==zd.TEXT&&_f(Tf,"Unexpected end"),bf(Tf),Tf.c="",Tf.closed=!0,Qd(Tf,"onend"),rd.call(Tf,Tf.strict,Tf.opt),Tf}function xf(Tf,vf){if(typeof Tf!="object"||!(Tf instanceof rd))throw new Error("bad call to strictFail");Tf.strict&&_f(Tf,vf)}function Mf(Tf){Tf.strict||(Tf.tagName=Tf.tagName[Tf.looseCase]());var vf=Tf.tags[Tf.tags.length-1]||Tf,Pf=Tf.tag={name:Tf.tagName,attributes:{}};Tf.opt.xmlns&&(Pf.ns=vf.ns),Tf.attribList.length=0,hf(Tf,"onopentagstart",Pf)}function Yf(Tf,vf){var Pf=Tf.indexOf(":"),Gf=Pf<0?["",Tf]:Tf.split(":"),ah=Gf[0],Wf=Gf[1];return vf&&Tf==="xmlns"&&(ah="xmlns",Wf=""),{prefix:ah,local:Wf}}function Qf(Tf){if(Tf.strict||(Tf.attribName=Tf.attribName[Tf.looseCase]()),Tf.attribList.indexOf(Tf.attribName)!==-1||Tf.tag.attributes.hasOwnProperty(Tf.attribName)){Tf.attribName=Tf.attribValue="";return}if(Tf.opt.xmlns){var vf=Yf(Tf.attribName,!0),Pf=vf.prefix,Gf=vf.local;if(Pf==="xmlns")if(Gf==="xml"&&Tf.attribValue!==Sd)xf(Tf,"xml: prefix must be bound to "+Sd+ `
Actual : ` +Tf.attribValue);else if(Gf==="xmlns"&&Tf.attribValue!==Ad)xf(Tf,"xmlns: prefix must be bound to "+Ad+ `
Actual : ` +Tf.attribValue);else{var ah=Tf.tag,Wf=Tf.tags[Tf.tags.length-1]||Tf;ah.ns===Wf.ns&&(ah.ns=Object.create(Wf.ns)),ah.ns[Gf]=Tf.attribValue}Tf.attribList.push([Tf.attribName,Tf.attribValue])}else Tf.tag.attributes[Tf.attribName]=Tf.attribValue,hf(Tf,"onattribute",{name:Tf.attribName,value:Tf.attribValue});Tf.attribName=Tf.attribValue=""}function qf(Tf,vf){if(Tf.opt.xmlns){var Pf=Tf.tag,Gf=Yf(Tf.tagName);Pf.prefix=Gf.prefix,Pf.local=Gf.local,Pf.uri=Pf.ns[Gf.prefix]||"",Pf.prefix&&!Pf.uri&&(xf(Tf,"Unbound namespace prefix: "+JSON.stringify(Tf.tagName)),Pf.uri=Gf.prefix);var ah=Tf.tags[Tf.tags.length-1]||Tf;Pf.ns&&ah.ns!==Pf.ns&&Object.keys(Pf.ns).forEach(function(nh){hf(Tf,"onopennamespace",{prefix:nh,uri:Pf.ns[nh]})});for(var Wf=0,Rf=Tf.attribList.length;Wf<Rf;Wf++){var Vf=Tf.attribList[Wf],lh=Vf[0],Uf=Vf[1],wf=Yf(lh,!0),Of=wf.prefix,jf=wf.local,uh=Of===""?"":Pf.ns[Of]||"",_h={name:lh,value:Uf,prefix:Of,local:jf,uri:uh};Of&&Of!=="xmlns"&&!uh&&(xf(Tf,"Unbound namespace prefix: "+JSON.stringify(Of)),_h.uri=Of),Tf.tag.attributes[lh]=_h,hf(Tf,"onattribute",_h)}Tf.attribList.length=0}Tf.tag.isSelfClosing=!!vf,Tf.sawRoot=!0,Tf.tags.push(Tf.tag),hf(Tf,"onopentag",Tf.tag),vf||(!Tf.noscript&&Tf.tagName.toLowerCase()==="script"?Tf.state=zd.SCRIPT:Tf.state=zd.TEXT,Tf.tag=null,Tf.tagName=""),Tf.attribName=Tf.attribValue="",Tf.attribList.length=0}function Bf(Tf){if(!Tf.tagName){xf(Tf,"Weird empty close tag."),Tf.textNode+="</>",Tf.state=zd.TEXT;return}if(Tf.script){if(Tf.tagName!=="script"){Tf.script+="</"+Tf.tagName+">",Tf.tagName="",Tf.state=zd.SCRIPT;return}hf(Tf,"onscript",Tf.script),Tf.script=""}var vf=Tf.tags.length,Pf=Tf.tagName;Tf.strict||(Pf=Pf[Tf.looseCase]());for(var Gf=Pf;vf--;){var ah=Tf.tags[vf];if(ah.name!==Gf)xf(Tf,"Unexpected close tag");else break}if(vf<0){xf(Tf,"Unmatched closing tag: "+Tf.tagName),Tf.textNode+="</"+Tf.tagName+">",Tf.state=zd.TEXT;return}Tf.tagName=Pf;for(var Wf=Tf.tags.length;Wf-- >vf;){var Rf=Tf.tag=Tf.tags.pop();Tf.tagName=Tf.tag.name,hf(Tf,"onclosetag",Tf.tagName);var Vf={};for(var lh in Rf.ns)Vf[lh]=Rf.ns[lh];var Uf=Tf.tags[Tf.tags.length-1]||Tf;Tf.opt.xmlns&&Rf.ns!==Uf.ns&&Object.keys(Rf.ns).forEach(function(wf){var Of=Rf.ns[wf];hf(Tf,"onclosenamespace",{prefix:wf,uri:Of})})}vf===0&&(Tf.closedRoot=!0),Tf.tagName=Tf.attribValue=Tf.attribName="",Tf.attribList.length=0,Tf.state=zd.TEXT}function Df(Tf){var vf=Tf.entity,Pf=vf.toLowerCase(),Gf,ah="";return Tf.ENTITIES[vf]?Tf.ENTITIES[vf]:Tf.ENTITIES[Pf]?Tf.ENTITIES[Pf]:(vf=Pf,vf.charAt(0)==="#"&&(vf.charAt(1)==="x"?(vf=vf.slice(2),Gf=parseInt(vf,16),ah=Gf.toString(16)):(vf=vf.slice(1),Gf=parseInt(vf,10),ah=Gf.toString(10))),vf=vf.replace(/^0+/,""),isNaN(Gf)||ah.toLowerCase()!==vf?(xf(Tf,"Invalid character entity"),"&"+Tf.entity+";"):String.fromCodePoint(Gf))}function $ f(Tf,vf){vf==="<"?(Tf.state=zd.OPEN_WAKA,Tf.startTagPosition=Tf.position):Fd(vf)||(xf(Tf,"Non-whitespace before first tag."),Tf.textNode=vf,Tf.state=zd.TEXT)}function Zf(Tf,vf){var Pf="";return vf<Tf.length&&(Pf=Tf.charAt(vf)),Pf}function Xf(Tf){var vf=this;if(this.error)throw this.error;if(vf.closed)return _f(vf,"Cannot write after close. Assign an onready handler.");if(Tf===null)return gf(vf);typeof Tf=="object"&&(Tf=Tf.toString());for(var Pf=0,Gf="";Gf=Zf(Tf,Pf++),vf.c=Gf,!!Gf;)switch(vf.trackPosition&&(vf.position++,Gf=== `
` ?(vf.line++,vf.column=0):vf.column++),vf.state){case zd.BEGIN:if(vf.state=zd.BEGIN_WHITESPACE,Gf===" \u FEFF")continue; $ f(vf,Gf);continue;case zd.BEGIN_WHITESPACE: $ f(vf,Gf);continue;case zd.TEXT:if(vf.sawRoot&&!vf.closedRoot){for(var ah=Pf-1;Gf&&Gf!=="<"&&Gf!=="&";)Gf=Zf(Tf,Pf++),Gf&&vf.trackPosition&&(vf.position++,Gf=== `
` ?(vf.line++,vf.column=0):vf.column++);vf.textNode+=Tf.substring(ah,Pf-1)}Gf==="<"&&!(vf.sawRoot&&vf.closedRoot&&!vf.strict)?(vf.state=zd.OPEN_WAKA,vf.startTagPosition=vf.position):(!Fd(Gf)&&(!vf.sawRoot||vf.closedRoot)&&xf(vf,"Text data outside of root node."),Gf==="&"?vf.state=zd.TEXT_ENTITY:vf.textNode+=Gf);continue;case zd.SCRIPT:Gf==="<"?vf.state=zd.SCRIPT_ENDING:vf.script+=Gf;continue;case zd.SCRIPT_ENDING:Gf==="/"?vf.state=zd.CLOSE_TAG:(vf.script+="<"+Gf,vf.state=zd.SCRIPT);continue;case zd.OPEN_WAKA:if(Gf==="!")vf.state=zd.SGML_DECL,vf.sgmlDecl="";else if(!Fd(Gf))if(Vd(Ld,Gf))vf.state=zd.OPEN_TAG,vf.tagName=Gf;else if(Gf==="/")vf.state=zd.CLOSE_TAG,vf.tagName="";else if(Gf==="?")vf.state=zd.PROC_INST,vf.procInstName=vf.procInstBody="";else{if(xf(vf,"Unencoded <"),vf.startTagPosition+1<vf.position){var Wf=vf.position-vf.startTagPosition;Gf=new Array(Wf).join(" ")+Gf}vf.textNode+="<"+Gf,vf.state=zd.TEXT}continue;case zd.SGML_DECL:if(vf.sgmlDecl+Gf==="--"){vf.state=zd.COMMENT,vf.comment="",vf.sgmlDecl="";continue}vf.doctype&&vf.doctype!==!0&&vf.sgmlDecl?(vf.state=zd.DOCTYPE_DTD,vf.doctype+="<!"+vf.sgmlDecl+Gf,vf.sgmlDecl=""):(vf.sgmlDecl+Gf).toUpperCase()===fd?(hf(vf,"onopencdata"),vf.state=zd.CDATA,vf.sgmlDecl="",vf.cdata=""):(vf.sgmlDecl+Gf).toUpperCase()===Td?(vf.state=zd.DOCTYPE,(vf.doctype||vf.sawRoot)&&xf(vf,"Inappropriately located doctype declaration"),vf.doctype="",vf.sgmlDecl=""):Gf===">"?(hf(vf,"onsgmldeclaration",vf.sgmlDecl),vf.sgmlDecl="",vf.state=zd.TEXT):(Ud(Gf)&&(vf.state=zd.SGML_DECL_QUOTED),vf.sgmlDecl+=Gf);continue;case zd.SGML_DECL_QUOTED:Gf===vf.q&&(vf.state=zd.SGML_DECL,vf.q=""),vf.sgmlDecl+=Gf;continue;case zd.DOCTYPE:Gf===">"?(vf.state=zd.TEXT,hf(vf,"ondoctype",vf.doctype),vf.doctype=!0):(vf.doctype+=Gf,Gf==="["?vf.state=zd.DOCTYPE_DTD:Ud(Gf)&&(vf.state=zd.DOCTYPE_QUOTED,vf.q=Gf));continue;case zd.DOCTYPE_QUOTED:vf.doctype+=Gf,Gf===vf.q&&(vf.q="",vf.state=zd.DOCTYPE);continue;case zd.DOCTYPE_DTD:Gf==="]"?(vf.doctype+=Gf,vf.state=zd.DOCTYPE):Gf==="<"?(vf.state=zd.OPEN_WAKA,vf.startTagPosition=vf.position):Ud(Gf)?(vf.doctype+=Gf,vf.state=zd.DOCTYPE_DTD_QUOTED,vf.q=Gf):vf.doctype+=Gf;continue;case zd.DOCTYPE_DTD_QUOTED:vf.doctype+=Gf,Gf===vf.q&&(vf.state=zd.DOCTYPE_DTD,vf.q="");continue;case zd.COMMENT:Gf==="-"?vf.state=zd.COMMENT_ENDING:vf.comment+=Gf;continue;case zd.COMMENT_ENDING:Gf==="-"?(vf.state=zd.COMMENT_ENDED,vf.comment=yf(vf.opt,vf.comment),vf.comment&&hf(vf,"oncomment",vf.comment),vf.comment=""):(vf.comment+="-"+Gf,vf.state=zd.COMMENT);continue;case zd.COMMENT_ENDED:Gf!==">"?(xf(vf,"Malformed comment"),vf.comment+="--"+Gf,vf.state=zd.COMMENT):vf.doctype&&vf.doctype!==!0?vf.state=zd.DOCTYPE_DTD:vf.state=zd.TEXT;continue;case zd.CDATA:Gf==="]"?vf.state=zd.CDATA_ENDING:vf.cdata+=Gf;continue;case zd.CDATA_ENDING:Gf==="]"?vf.state=zd.CDATA_ENDING_2:(vf.cdata+="]"+Gf,vf.state=zd.CDATA);continue;case zd.CDATA_ENDING_2:Gf===">"?(vf.cdata&&hf(vf,"oncdata",vf.cdata),hf(vf,"onclosecdata"),vf.cdata="",vf.state=zd.TEXT):Gf==="]"?vf.cdata+="]":(vf.cdata+="]]"+Gf,vf.state=zd.CDATA);continue;case zd.PROC_INST:Gf==="?"?vf.state=zd.PROC_INST_ENDING:Fd(Gf)?vf.state=zd.PROC_INST_BODY:vf.procInstName+=Gf;continue;case zd.PROC_INST_BODY:if(!vf.procInstBody&&Fd(Gf))continue;Gf==="?"?vf.state=zd.PROC_INST_ENDING:vf.procInstBody+=Gf;continue;case zd.PROC_INST_ENDING:Gf===">"?(hf(vf,"onprocessinginstruction",{name:vf.procInstName,body:vf.procInstBody}),vf.procInstName=vf.procInstBody="",vf.state=zd.TEXT):(vf.procInstBody+="?"+Gf,vf.state=zd.PROC_INST_BODY);continue;case zd.OPEN_TAG:Vd(Rd,Gf)?vf.tagName+=Gf:(Mf(vf),Gf===">"?qf(vf):Gf==="/"?vf.state=zd.OPEN_TAG_SLASH:(Fd(Gf)||xf(vf,"Invalid character in tag name"),vf.state=zd.ATTRIB));continue;case zd.OPEN_TAG_SLASH:Gf===">"?(qf(vf,!0),Bf(vf)):(xf(vf,"Forward-slash in opening tag not followed by >"),vf.state=zd.ATTRIB);continue;case zd.ATTRIB:if(Fd(Gf))continue;Gf===">"?qf(vf):Gf==="/"?vf.state=zd.OPEN_TAG_SLASH:Vd(Ld,Gf)?(vf.attribName=Gf,vf.attribValue="",vf.state=zd.ATTRIB_NAME):xf(vf,"Invalid attribute name");continue;case zd.ATTRIB_NAME:Gf==="="?vf.state
2024-09-25 14:23:53 +08:00
` &&Ra[ad]!==" \r ";ad++)cd+=Ra[ad];if(cd=cd.trim(),cd[cd.length-1]==="/"&&(cd=cd.substring(0,cd.length-1),ad--),!validateTagName(cd)){let fd;return cd.trim().length===0?fd="Invalid space after '<'.":fd="Tag '"+cd+"' is an invalid name.",getErrorObject("InvalidTag",fd,getLineNumberForPosition(Ra,ad))}const dd=readAttributeStr(Ra,ad);if(dd===!1)return getErrorObject("InvalidAttr","Attributes for '"+cd+"' have open quote.",getLineNumberForPosition(Ra,ad));let pd=dd.value;if(ad=dd.index,pd[pd.length-1]==="/"){const fd=ad-pd.length;pd=pd.substring(0,pd.length-1);const Td=validateAttributeString(pd,qa);if(Td===!0)rd=!0;else return getErrorObject(Td.err.code,Td.err.msg,getLineNumberForPosition(Ra,fd+Td.err.line))}else if(ud)if(dd.tagClosed){if(pd.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+cd+"' can't have attributes or invalid starting.",getLineNumberForPosition(Ra,sd));if(td.length===0)return getErrorObject("InvalidTag","Closing tag '"+cd+"' has not been opened.",getLineNumberForPosition(Ra,sd));{const fd=td.pop();if(cd!==fd.tagName){let Td=getLineNumberForPosition(Ra,fd.tagStartPos);return getErrorObject("InvalidTag","Expected closing tag '"+fd.tagName+"' (opened in line "+Td.line+", col "+Td.col+") instead of closing tag '"+cd+"'.",getLineNumberForPosition(Ra,sd))}td.length==0&&(nd=!0)}}else return getErrorObject("InvalidTag","Closing tag '"+cd+"' doesn't have proper closing.",getLineNumberForPosition(Ra,ad));else{const fd=validateAttributeString(pd,qa);if(fd!==!0)return getErrorObject(fd.err.code,fd.err.msg,getLineNumberForPosition(Ra,ad-pd.length+fd.err.line));if(nd===!0)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(Ra,ad));qa.unpairedTags.indexOf(cd)!==-1||td.push({tagName:cd,tagStartPos:sd}),rd=!0}for(ad++;ad<Ra.length;ad++)if(Ra[ad]==="<")if(Ra[ad+1]==="!"){ad++,ad=readCommentAndCDATA(Ra,ad);continue}else if(Ra[ad+1]==="?"){if(ad=readPI(Ra,++ad),ad.err)return ad}else break;else if(Ra[ad]==="&"){const fd=validateAmpersand(Ra,ad);if(fd==-1)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(Ra,ad));ad=fd}else if(nd===!0&&!isWhiteSpace(Ra[ad]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(Ra,ad));Ra[ad]==="<"&&ad--}}else{if(isWhiteSpace(Ra[ad]))continue;return getErrorObject("InvalidChar","char '"+Ra[ad]+"' is not expected.",getLineNumberForPosition(Ra,ad))}if(rd){if(td.length==1)return getErrorObject("InvalidTag","Unclosed tag '"+td[0].tagName+"'.",getLineNumberForPosition(Ra,td[0].tagStartPos));if(td.length>0)return getErrorObject("InvalidXml","Invalid '"+JSON.stringify(td.map(ad=>ad.tagName),null,4).replace(/ \r ? \n /g,"")+"' found.",{line:1,col:1})}else return getErrorObject("InvalidXml","Start tag expected.",1);return!0};function isWhiteSpace(Ra){return Ra===" "||Ra===" "||Ra=== `
` ||Ra===" \r "}function readPI(Ra,qa){const td=qa;for(;qa<Ra.length;qa++)if(Ra[qa]=="?"||Ra[qa]==" "){const rd=Ra.substr(td,qa-td);if(qa>5&&rd==="xml")return getErrorObject("InvalidXml","XML declaration allowed only at the start of the document.",getLineNumberForPosition(Ra,qa));if(Ra[qa]=="?"&&Ra[qa+1]==">"){qa++;break}else continue}return qa}function readCommentAndCDATA(Ra,qa){if(Ra.length>qa+5&&Ra[qa+1]==="-"&&Ra[qa+2]==="-"){for(qa+=3;qa<Ra.length;qa++)if(Ra[qa]==="-"&&Ra[qa+1]==="-"&&Ra[qa+2]===">"){qa+=2;break}}else if(Ra.length>qa+8&&Ra[qa+1]==="D"&&Ra[qa+2]==="O"&&Ra[qa+3]==="C"&&Ra[qa+4]==="T"&&Ra[qa+5]==="Y"&&Ra[qa+6]==="P"&&Ra[qa+7]==="E"){let td=1;for(qa+=8;qa<Ra.length;qa++)if(Ra[qa]==="<")td++;else if(Ra[qa]===">"&&(td--,td===0))break}else if(Ra.length>qa+9&&Ra[qa+1]==="["&&Ra[qa+2]==="C"&&Ra[qa+3]==="D"&&Ra[qa+4]==="A"&&Ra[qa+5]==="T"&&Ra[qa+6]==="A"&&Ra[qa+7]==="["){for(qa+=8;qa<Ra.length;qa++)if(Ra[qa]==="]"&&Ra[qa+1]==="]"&&Ra[qa+2]===">"){qa+=2;break}}return qa}const doubleQuote='"',singleQuote="'";function readAttributeStr(Ra,qa){let td="",rd="",nd=!1;for(;qa<Ra.length;qa++){if(Ra[qa]===doubleQuote||Ra[qa]===singleQuote)rd===""?rd=Ra[qa]:rd!==Ra[qa]||(rd="");else if(Ra[qa]===">"&&rd===""){nd=!0;break}td+=Ra[qa]}return rd!==""?!1:{value:td,index:qa,tagClosed:nd}}const validAttrStrRegxp=new RegExp( ` ( \ \ s * ) ( [ ^ \ \ s = ] + ) ( \ \ s *= ) ? ( \ \ s * ( [ '"])(([\\s\\S])*?)\\5)?`,"g");function validateAttributeString(Ra,qa){const td=util$3.getAllMatches(Ra,validAttrStrRegxp),rd={};for(let nd=0;nd<td.length;nd++){if(td[nd][1].length===0)return getErrorObject("InvalidAttr","Attribute ' "+td[nd][2]+" ' has no space in starting.",getPositionFromMatch(td[nd]));if(td[nd][3]!==void 0&&td[nd][4]===void 0)return getErrorObject("InvalidAttr","Attribute ' "+td[nd][2]+" ' is without value.",getPositionFromMatch(td[nd]));if(td[nd][3]===void 0&&!qa.allowBooleanAttributes)return getErrorObject("InvalidAttr","boolean attribute ' "+td[nd][2]+" ' is not allowed.",getPositionFromMatch(td[nd]));const ad=td[nd][2];if(!validateAttrName(ad))return getErrorObject("InvalidAttr","Attribute ' "+ad+" ' is an invalid name.",getPositionFromMatch(td[nd]));if(!rd.hasOwnProperty(ad))rd[ad]=1;else return getErrorObject("InvalidAttr","Attribute ' "+ad+" ' is repeated . ",getPositionFromMatch(td[nd]))}return!0}function validateNumberAmpersand(Ra,qa){let td=/\d/;for(Ra[qa]===" x "&&(qa++,td=/[\da-fA-F]/);qa<Ra.length;qa++){if(Ra[qa]===" ; ")return qa;if(!Ra[qa].match(td))break}return-1}function validateAmpersand(Ra,qa){if(qa++,Ra[qa]===" ; ")return-1;if(Ra[qa]===" # ")return qa++,validateNumberAmpersand(Ra,qa);let td=0;for(;qa<Ra.length;qa++,td++)if(!(Ra[qa].match(/\w/)&&td<20)){if(Ra[qa]===" ; ")break;return-1}return qa}function getErrorObject(Ra,qa,td){return{err:{code:Ra,msg:qa,line:td.line||td,col:td.col}}}function validateAttrName(Ra){return util$3.isName(Ra)}function validateTagName(Ra){return util$3.isName(Ra)}function getLineNumberForPosition(Ra,qa){const td=Ra.substring(0,qa).split(/\r?\n/);return{line:td.length,col:td[td.length-1].length+1}}function getPositionFromMatch(Ra){return Ra.startIndex+Ra[1].length}var OptionsBuilder={};const defaultOptions$1={preserveOrder:!1,attributeNamePrefix:" @ _ ",attributesGroupName:!1,textNodeName:" # text ",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(Ra,qa){return qa},attributeValueProcessor:function(Ra,qa){return qa},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(Ra,qa,td){return Ra}},buildOptions$1=function(Ra){return Object.assign({},defaultOptions$1,Ra)};OptionsBuilder.buildOptions=buildOptions$1;OptionsBuilder.defaultOptions=defaultOptions$1;class XmlNode{constructor(qa){this.tagname=qa,this.child=[],this[" : @ "]={}}add(qa,td){qa===" _ _proto _ _ "&&(qa=" # _ _proto _ _ " ) , this . child . push ( { [ qa ] : td } ) } addChild ( qa )
2024-11-27 11:30:55 +08:00
` );const qa=new xmlNode("!xml");let td=qa,rd="",nd="";for(let ad=0;ad<Ra.length;ad++)if(Ra[ad]==="<")if(Ra[ad+1]==="/"){const ud=findClosingIndex(Ra,">",ad,"Closing Tag is not closed.");let cd=Ra.substring(ad+2,ud).trim();if(this.options.removeNSPrefix){const fd=cd.indexOf(":");fd!==-1&&(cd=cd.substr(fd+1))}this.options.transformTagName&&(cd=this.options.transformTagName(cd)),td&&(rd=this.saveTextToParentTag(rd,td,nd));const dd=nd.substring(nd.lastIndexOf(".")+1);if(cd&&this.options.unpairedTags.indexOf(cd)!==-1)throw new Error( ` Unpaired tag can not be used as closing tag : < /${cd}>`);let pd=0;dd&&this.options.unpairedTags.indexOf(dd)!==-1?(pd=nd.lastIndexOf(".",nd.lastIndexOf(".")-1),this.tagsNodeStack.pop()):pd=nd.lastIndexOf("."),nd=nd.substring(0,pd),td=this.tagsNodeStack.pop(),rd="",ad=ud}else if(Ra[ad+1]==="?"){let ud=readTagExp(Ra,ad,!1,"?>");if(!ud)throw new Error("Pi Tag is not closed.");if(rd=this.saveTextToParentTag(rd,td,nd),!(this.options.ignoreDeclaration&&ud.tagName==="?xml"||this.options.ignorePiTags)){const cd=new xmlNode(ud.tagName);cd.add(this.options.textNodeName,""),ud.tagName!==ud.tagExp&&ud.attrExpPresent&&(cd[":@"]=this.buildAttributesMap(ud.tagExp,nd,ud.tagName)),this.addChild(td,cd,nd)}ad=ud.closeIndex+1}else if(Ra.substr(ad+1,3)==="!--"){const ud=findClosingIndex(Ra,"-->",ad+4,"Comment is not closed.");if(this.options.commentPropName){const cd=Ra.substring(ad+4,ud-2);rd=this.saveTextToParentTag(rd,td,nd),td.add(this.options.commentPropName,[{[this.options.textNodeName]:cd}])}ad=ud}else if(Ra.substr(ad+1,2)==="!D"){const ud=readDocType(Ra,ad);this.docTypeEntities=ud.entities,ad=ud.i}else if(Ra.substr(ad+1,2)==="!["){const ud=findClosingIndex(Ra,"]]>",ad,"CDATA is not closed.")-2,cd=Ra.substring(ad+9,ud);rd=this.saveTextToParentTag(rd,td,nd);let dd=this.parseTextData(cd,td.tagname,nd,!0,!1,!0,!0);dd==null&&(dd=""),this.options.cdataPropName?td.add(this.options.cdataPropName,[{[this.options.textNodeName]:cd}]):td.add(this.options.textNodeName,dd),ad=ud+2}else{let ud=readTagExp(Ra,ad,this.options.removeNSPrefix),cd=ud.tagName;const dd=ud.rawTagName;let pd=ud.tagExp,fd=ud.attrExpPresent,Td=ud.closeIndex;this.options.transformTagName&&(cd=this.options.transformTagName(cd)),td&&rd&&td.tagname!=="!xml"&&(rd=this.saveTextToParentTag(rd,td,nd,!1));const Sd=td;if(Sd&&this.options.unpairedTags.indexOf(Sd.tagname)!==-1&&(td=this.tagsNodeStack.pop(),nd=nd.substring(0,nd.lastIndexOf("."))),cd!==qa.tagname&&(nd+=nd?"."+cd:cd),this.isItStopNode(this.options.stopNodes,nd,cd)){let Ad="";if(pd.length>0&&pd.lastIndexOf("/ ")===pd.length-1)cd[cd.length-1]===" / "?(cd=cd.substr(0,cd.length-1),nd=nd.substr(0,nd.length-1),pd=cd):pd=pd.substr(0,pd.length-1),ad=ud.closeIndex;else if(this.options.unpairedTags.indexOf(cd)!==-1)ad=ud.closeIndex;else{const Ld=this.readStopNodeData(Ra,dd,Td+1);if(!Ld)throw new Error(`Unexpected end of ${dd}`);ad=Ld.i,Ad=Ld.tagContent}const Nd=new xmlNode(cd);cd!==pd&&fd&&(Nd[" : @ "]=this.buildAttributesMap(pd,nd,cd)),Ad&&(Ad=this.parseTextData(Ad,cd,nd,!0,fd,!0,!0)),nd=nd.substr(0,nd.lastIndexOf(" . ")),Nd.add(this.options.textNodeName,Ad),this.addChild(td,Nd,nd)}else{if(pd.length>0&&pd.lastIndexOf(" / ")===pd.length-1){cd[cd.length-1]===" / "?(cd=cd.substr(0,cd.length-1),nd=nd.substr(0,nd.length-1),pd=cd):pd=pd.substr(0,pd.length-1),this.options.transformTagName&&(cd=this.options.transformTagName(cd));const Ad=new xmlNode(cd);cd!==pd&&fd&&(Ad[" : @ "]=this.buildAttributesMap(pd,nd,cd)),this.addChild(td,Ad,nd),nd=nd.substr(0,nd.lastIndexOf(" . "))}else{const Ad=new xmlNode(cd);this.tagsNodeStack.push(td),cd!==pd&&fd&&(Ad[" : @ "]=this.buildAttributesMap(pd,nd,cd)),this.addChild(td,Ad,nd),td=Ad}rd=" ",ad=Td}}else rd+=Ra[ad];return qa.child};function addChild(Ra,qa,td){const rd=this.options.updateTag(qa.tagname,td,qa[" : @ "]);rd===!1||(typeof rd==" string " && ( qa . tagname = rd ) , Ra . addChild ( qa ) ) } const replaceEntitiesValue$1 = function ( Ra ) { if ( this . options . processEntities ) { for ( let qa in this . docTypeEntities ) { const td = this . docTypeEntities [ qa ] ; Ra = Ra . replace ( td . regx , td . val ) } for ( let qa in this . lastEntities ) { const td = this . lastEntit
` ;function toXml(Ra,qa){let td="";return qa.format&&qa.indentBy.length>0&&(td=EOL),arrToStr(Ra,qa,"",td)}function arrToStr(Ra,qa,td,rd){let nd="",ad=!1;for(let sd=0;sd<Ra.length;sd++){const ud=Ra[sd],cd=propName(ud);if(cd===void 0)continue;let dd="";if(td.length===0?dd=cd:dd= ` $ { td } . $ { cd } ` ,cd===qa.textNodeName){let Ad=ud[cd];isStopNode(dd,qa)||(Ad=qa.tagValueProcessor(cd,Ad),Ad=replaceEntitiesValue(Ad,qa)),ad&&(nd+=rd),nd+=Ad,ad=!1;continue}else if(cd===qa.cdataPropName){ad&&(nd+=rd),nd+= ` < ! [ CDATA [ $ { ud [ cd ] [ 0 ] [ qa . textNodeName ] } ] ] > ` ,ad=!1;continue}else if(cd===qa.commentPropName){nd+=rd+ ` <!-- $ { ud [ cd ] [ 0 ] [ qa . textNodeName ] } -- > ` ,ad=!0;continue}else if(cd[0]==="?"){const Ad=attr_to_str(ud[":@"],qa),Nd=cd==="?xml"?"":rd;let Ld=ud[cd][0][qa.textNodeName];Ld=Ld.length!==0?" "+Ld:"",nd+=Nd+ ` < $ { cd } $ { Ld } $ { Ad } ? > ` ,ad=!0;continue}let pd=rd;pd!==""&&(pd+=qa.indentBy);const fd=attr_to_str(ud[":@"],qa),Td=rd+ ` < $ { cd } $ { fd } ` ,Sd=arrToStr(ud[cd],qa,dd,pd);qa.unpairedTags.indexOf(cd)!==-1?qa.suppressUnpairedNode?nd+=Td+">":nd+=Td+"/>":(!Sd||Sd.length===0)&&qa.suppressEmptyNode?nd+=Td+"/>":Sd&&Sd.endsWith(">")?nd+=Td+ ` > $ { Sd } $ { rd } < /${cd}>`:(nd+=Td+">",Sd&&rd!==""&&(Sd.includes("/ > ")||Sd.includes(" < /"))?nd+=rd+qa.indentBy+Sd+rd:nd+=Sd,nd+=`</ $ { cd } > ` ),ad=!0}return nd}function propName(Ra){const qa=Object.keys(Ra);for(let td=0;td<qa.length;td++){const rd=qa[td];if(Ra.hasOwnProperty(rd)&&rd!==":@")return rd}}function attr_to_str(Ra,qa){let td="";if(Ra&&!qa.ignoreAttributes)for(let rd in Ra){if(!Ra.hasOwnProperty(rd))continue;let nd=qa.attributeValueProcessor(rd,Ra[rd]);nd=replaceEntitiesValue(nd,qa),nd===!0&&qa.suppressBooleanAttributes?td+= ` $ { rd . substr ( qa . attributeNamePrefix . length ) } ` :td+= ` $ { rd . substr ( qa . attributeNamePrefix . length ) } = "${nd}" ` }return td}function isStopNode(Ra,qa){Ra=Ra.substr(0,Ra.length-qa.textNodeName.length-1);let td=Ra.substr(Ra.lastIndexOf(".")+1);for(let rd in qa.stopNodes)if(qa.stopNodes[rd]===Ra||qa.stopNodes[rd]==="*."+td)return!0;return!1}function replaceEntitiesValue(Ra,qa){if(Ra&&Ra.length>0&&qa.processEntities)for(let td=0;td<qa.entities.length;td++){const rd=qa.entities[td];Ra=Ra.replace(rd.regex,rd.val)}return Ra}var orderedJs2Xml=toXml;const buildFromOrderedJs=orderedJs2Xml,getIgnoreAttributesFn=ignoreAttributes,defaultOptions={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(Ra,qa){return qa},attributeValueProcessor:function(Ra,qa){return qa},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Builder(Ra){this.options=Object.assign({},defaultOptions,Ra),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=getIgnoreAttributesFn(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=isAttribute),this.processTextOrObjNode=processTextOrObjNode,this.options.format?(this.indentate=indentate,this.tagEndChar= ` >
2024-09-18 09:46:23 +08:00
` ,this.newLine= `
2024-11-27 11:30:55 +08:00
` ):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}Builder.prototype.build=function(Ra){return this.options.preserveOrder?buildFromOrderedJs(Ra,this.options):(Array.isArray(Ra)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(Ra={[this.options.arrayNodeName]:Ra}),this.j2x(Ra,0,[]).val)};Builder.prototype.j2x=function(Ra,qa,td){let rd="",nd="";const ad=td.join(".");for(let sd in Ra)if(Object.prototype.hasOwnProperty.call(Ra,sd))if(typeof Ra[sd]>"u")this.isAttribute(sd)&&(nd+="");else if(Ra[sd]===null)this.isAttribute(sd)?nd+="":sd[0]==="?"?nd+=this.indentate(qa)+"<"+sd+"?"+this.tagEndChar:nd+=this.indentate(qa)+"<"+sd+"/"+this.tagEndChar;else if(Ra[sd]instanceof Date)nd+=this.buildTextValNode(Ra[sd],sd,"",qa);else if(typeof Ra[sd]!="object"){const ud=this.isAttribute(sd);if(ud&&!this.ignoreAttributesFn(ud,ad))rd+=this.buildAttrPairStr(ud,""+Ra[sd]);else if(!ud)if(sd===this.options.textNodeName){let cd=this.options.tagValueProcessor(sd,""+Ra[sd]);nd+=this.replaceEntitiesValue(cd)}else nd+=this.buildTextValNode(Ra[sd],sd,"",qa)}else if(Array.isArray(Ra[sd])){const ud=Ra[sd].length;let cd="",dd="";for(let pd=0;pd<ud;pd++){const fd=Ra[sd][pd];if(!(typeof fd>"u"))if(fd===null)sd[0]==="?"?nd+=this.indentate(qa)+"<"+sd+"?"+this.tagEndChar:nd+=this.indentate(qa)+"<"+sd+"/"+this.tagEndChar;else if(typeof fd=="object")if(this.options.oneListGroup){const Td=this.j2x(fd,qa+1,td.concat(sd));cd+=Td.val,this.options.attributesGroupName&&fd.hasOwnProperty(this.options.attributesGroupName)&&(dd+=Td.attrStr)}else cd+=this.processTextOrObjNode(fd,sd,qa,td);else if(this.options.oneListGroup){let Td=this.options.tagValueProcessor(sd,fd);Td=this.replaceEntitiesValue(Td),cd+=Td}else cd+=this.buildTextValNode(fd,sd,"",qa)}this.options.oneListGroup&&(cd=this.buildObjectNode(cd,sd,dd,qa)),nd+=cd}else if(this.options.attributesGroupName&&sd===this.options.attributesGroupName){const ud=Object.keys(Ra[sd]),cd=ud.length;for(let dd=0;dd<cd;dd++)rd+=this.buildAttrPairStr(ud[dd],""+Ra[sd][ud[dd]])}else nd+=this.processTextOrObjNode(Ra[sd],sd,qa,td);return{attrStr:rd,val:nd}};Builder.prototype.buildAttrPairStr=function(Ra,qa){return qa=this.options.attributeValueProcessor(Ra,""+qa),qa=this.replaceEntitiesValue(qa),this.options.suppressBooleanAttributes&&qa==="true"?" "+Ra:" "+Ra+'="'+qa+'"'};function processTextOrObjNode(Ra,qa,td,rd){const nd=this.j2x(Ra,td+1,rd.concat(qa));return Ra[this.options.textNodeName]!==void 0&&Object.keys(Ra).length===1?this.buildTextValNode(Ra[this.options.textNodeName],qa,nd.attrStr,td):this.buildObjectNode(nd.val,qa,nd.attrStr,td)}Builder.prototype.buildObjectNode=function(Ra,qa,td,rd){if(Ra==="")return qa[0]==="?"?this.indentate(rd)+"<"+qa+td+"?"+this.tagEndChar:this.indentate(rd)+"<"+qa+td+this.closeTag(qa)+this.tagEndChar;{let nd="</"+qa+this.tagEndChar,ad="";return qa[0]==="?"&&(ad="?",nd=""),(td||td==="")&&Ra.indexOf("<")===-1?this.indentate(rd)+"<"+qa+td+ad+">"+Ra+nd:this.options.commentPropName!==!1&&qa===this.options.commentPropName&&ad.length===0?this.indentate(rd)+ ` <!-- $ { Ra } -- > ` +this.newLine:this.indentate(rd)+"<"+qa+td+ad+this.tagEndChar+Ra+this.indentate(rd)+nd}};Builder.prototype.closeTag=function(Ra){let qa="";return this.options.unpairedTags.indexOf(Ra)!==-1?this.options.suppressUnpairedNode||(qa="/"):this.options.suppressEmptyNode?qa="/":qa= ` > < /${Ra}`,qa};Builder.prototype.buildTextValNode=function(Ra,qa,td,rd){if(this.options.cdataPropName!==!1&&qa===this.options.cdataPropName)return this.indentate(rd)+`<![CDATA[${Ra}]]>`+this.newLine;if(this.options.commentPropName!==!1&&qa===this.options.commentPropName)return this.indentate(rd)+`<!--${Ra}-->`+this.newLine;if(qa[0]==="?")return this.indentate(rd)+"<"+qa+td+"?"+this.tagEndChar;{let nd=this.options.tagValueProcessor(qa,Ra);return nd=this.replaceEntitiesValue(nd),nd===""?this.indentate(rd)+"<"+qa+td+this.closeTag(qa)+this.tagEndChar:this.indentate(rd)+"<"+qa+td+">"+nd+"</ " + qa + this . tagEndChar } } ; Builder . prototype . replaceEntitiesValue = function ( Ra ) { if ( Ra && Ra . length > 0 && this . options . processEntities ) for ( let qa = 0 ; qa < this . op
2024-09-18 09:46:23 +08:00
* mime - db
* Copyright ( c ) 2014 Jonathan Ong
* Copyright ( c ) 2015 - 2022 Douglas Christopher Wilson
* MIT Licensed
* /var mimeDb=require$$0;/ * !
* mime - types
* Copyright ( c ) 2014 Jonathan Ong
* Copyright ( c ) 2015 Douglas Christopher Wilson
* MIT Licensed
2024-11-27 11:30:55 +08:00
* /(function(Ra){var qa=mimeDb,td=pathBrowserify.extname,rd=/ ^ \ s * ( [ ^ ; \ s ] * ) ( ? : ; | \ s | $ ) / , nd = /^text\//i ; Ra . charset = ad , Ra . charsets = { lookup : ad } , Ra . contentType = sd , Ra . extension = ud , Ra . extensions = Object . create ( null ) , Ra . lookup = cd , Ra . types = Object . create ( null ) , dd ( Ra . extensions , Ra . types ) ; function ad ( pd ) { if ( ! pd || typeof pd != "string" ) return ! 1 ; var fd = rd . exec ( pd ) , Td = fd && qa [ fd [ 1 ] . toLowerCase ( ) ] ; return Td && Td . charset ? Td . charset : fd && nd . test ( fd [ 1 ] ) ? "UTF-8" : ! 1 } function sd ( pd ) { if ( ! pd || typeof pd != "string" ) return ! 1 ; var fd = pd . indexOf ( "/" ) === - 1 ? Ra . lookup ( pd ) : pd ; if ( ! fd ) return ! 1 ; if ( fd . indexOf ( "charset" ) === - 1 ) { var Td = Ra . charset ( fd ) ; Td && ( fd += "; charset=" + Td . toLowerCase ( ) ) } return fd } function ud ( pd ) { if ( ! pd || typeof pd != "string" ) return ! 1 ; var fd = rd . exec ( pd ) , Td = fd && Ra . extensions [ fd [ 1 ] . toLowerCase ( ) ] ; return ! Td || ! Td . length ? ! 1 : Td [ 0 ] } function cd ( pd ) { if ( ! pd || typeof pd != "string" ) return ! 1 ; var fd = td ( "x." + pd ) . toLowerCase ( ) . substr ( 1 ) ; return fd && Ra . types [ fd ] || ! 1 } function dd ( pd , fd ) { var Td = [ "nginx" , "apache" , void 0 , "iana" ] ; Object . keys ( qa ) . forEach ( function ( Ad ) { var Nd = qa [ Ad ] , Ld = Nd . extensions ; if ( ! ( ! Ld || ! Ld . length ) ) { pd [ Ad ] = Ld ; for ( var Rd = 0 ; Rd < Ld . length ; Rd ++ ) { var Od = Ld [ Rd ] ; if ( fd [ Od ] ) { var kd = Td . indexOf ( qa [ fd [ Od ] ] . source ) , Fd = Td . indexOf ( Nd . source ) ; if ( fd [ Od ] !== "application/octet-stream" && ( kd > Fd || kd === Fd && fd [ Od ] . substr ( 0 , 12 ) === "application/" ) ) continue } fd [ Od ] = Ad } } } ) } } ) ( mimeTypes$1 ) ; let ENCRYPTION _TYPES = function ( Ra ) { return Ra . SSEC = "SSE-C" , Ra . KMS = "KMS" , Ra } ( { } ) , RETENTION _MODES = function ( Ra ) { return Ra . GOVERNANCE = "GOVERNANCE" , Ra . COMPLIANCE = "COMPLIANCE" , Ra } ( { } ) , RETENTION _VALIDITY _UNITS = function ( Ra ) { return Ra . DAYS = "Days" , Ra . YEARS = "Years" , Ra } ( { } ) , LEGAL _HOLD _STATUS = function ( Ra ) { return Ra . ENABLED = "ON" , Ra . DISABLED = "OFF" , Ra } ( { } ) ; const MetaDataHeaderPrefix = "x-amz-meta-" ; function uriEscape ( Ra ) { return Ra . split ( "" ) . reduce ( ( qa , td ) => { const rd = Buffer$2 . from ( td ) ; if ( rd . length === 1 && ( "A" <= td && td <= "Z" || "a" <= td && td <= "z" || "0" <= td && td <= "9" || td === "_" || td === "." || td === "~" || td === "-" ) ) return qa = qa + td , qa ; for ( const nd of rd ) qa = qa + "%" + nd . toString ( 16 ) . toUpperCase ( ) ; return qa } , "" ) } function uriResourceEscape ( Ra ) { return uriEscape ( Ra ) . replace ( /%2F/g , "/" ) } function getScope ( Ra , qa , td = "s3" ) { return ` ${ makeDateShort ( qa ) } / ${ Ra } / ${ td } /aws4_request ` } function isAmazonEndpoint ( Ra ) { return Ra === "s3.amazonaws.com" || Ra === "s3.cn-north-1.amazonaws.com.cn" } function isVirtualHostStyle ( Ra , qa , td , rd ) { return qa === "https:" && td . includes ( "." ) ? ! 1 : isAmazonEndpoint ( Ra ) || ! rd } function isValidIP ( Ra ) { return ipaddr . isValid ( Ra ) } function isValidEndpoint ( Ra ) { return isValidDomain ( Ra ) || isValidIP ( Ra ) } function isValidDomain ( Ra ) { if ( ! isString ( Ra ) || Ra . length === 0 || Ra . length > 255 || Ra [ 0 ] === "-" || Ra . slice ( - 1 ) === "-" || Ra [ 0 ] === "_" || Ra . slice ( - 1 ) === "_" || Ra [ 0 ] === "." ) return ! 1 ; const qa = "`~!@#$%^&*()+={}[]|\\\"';:><?/" ; for ( const td of qa ) if ( Ra . includes ( td ) ) return ! 1 ; return ! 0 } function probeContentType ( Ra ) { let qa = mimeTypes$1 . lookup ( Ra ) ; return qa || ( qa = "application/octet-stream" ) , qa } function isValidPort ( Ra ) { return isNumber ( Ra ) ? 0 <= Ra && Ra <= 65535 : ! 1 } function isValidBucketName ( Ra ) { return ! isString ( Ra ) || Ra . length < 3 || Ra . length > 63 || Ra . includes ( ".." ) || /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/ . test ( Ra ) ? ! 1 : ! ! /^[a-z0-9][a-z0-9.-]+[a-z0-9]$/ . test ( Ra ) } function isValidObjectName ( Ra ) { return isValidPrefix ( Ra ) ? Ra . length !== 0 : ! 1 } function isValidPrefix ( Ra ) { return ! ( ! isString ( Ra ) || Ra . length > 1024 ) } function isNumber ( Ra ) { return typeof Ra == "number" } function isFunction ( Ra ) { return typeof Ra == "function" } function isString ( Ra ) { return typeof Ra == "string" } function isObject ( Ra ) { return typeof Ra == "object" && Ra !== null } function isReadableStream ( Ra ) { return isObject ( Ra ) && isFunction ( Ra . _read ) } function isBoolean ( Ra ) { return typeof Ra == "boolean" } function isEmpty ( Ra ) { return _ . isEmpty ( Ra ) } function isEmptyObject ( Ra ) { return Object . values ( Ra ) . filter ( qa => qa !== void 0 ) . length !== 0 } function isDefined ( Ra ) { return Ra != null } function isValidDate ( Ra ) { return Ra instanceof Date && ! isNaN ( Ra ) } function makeDateLong ( Ra ) { Ra = Ra || new Date ; const qa = Ra . toISOString ( ) ; return qa . slice ( 0 , 4 ) + qa . slice ( 5 , 7 ) + qa . slice ( 8 , 13 ) + qa . slice ( 14 , 16 ) + qa . slice ( 17 , 19 ) + "Z" } function makeDateShort ( Ra ) { Ra = Ra || new Date ; const qa = Ra . toISOString ( ) ; return qa . slice ( 0 , 4 ) + qa . slice ( 5 , 7 ) + qa . slice ( 8 , 10 ) }
2024-09-18 09:46:23 +08:00
` )+ `
2024-09-25 14:23:53 +08:00
` ,rd.join(";").toLowerCase(),nd].join( `
2024-09-29 10:14:52 +08:00
` )}function getCredential(Ra,qa,td,rd="s3"){if(!isString(Ra))throw new TypeError('accessKey should be of type "string"');if(!isString(qa))throw new TypeError('region should be of type "string"');if(!isObject(td))throw new TypeError('requestDate should be of type "object"');return ` $ { Ra } / $ { getScope ( qa , td , rd ) } ` }function getSignedHeaders(Ra){if(!isObject(Ra))throw new TypeError('request should be of type "object"');const qa=["authorization","content-length","content-type","user-agent"];return Object.keys(Ra).filter(td=>!qa.includes(td)).sort()}function getSigningKey(Ra,qa,td,rd="s3"){if(!isObject(Ra))throw new TypeError('date should be of type "object"');if(!isString(qa))throw new TypeError('region should be of type "string"');if(!isString(td))throw new TypeError('secretKey should be of type "string"');const nd=makeDateShort(Ra);return(void 0)("sha256",(void 0)("sha256",(void 0)("sha256",(void 0)("sha256","AWS4"+td).update(nd).digest()).update(qa).digest()).update(rd).digest()).update("aws4_request").digest()}function getStringToSign(Ra,qa,td,rd="s3"){if(!isString(Ra))throw new TypeError('canonicalRequest should be of type "string"');if(!isObject(qa))throw new TypeError('requestDate should be of type "object"');if(!isString(td))throw new TypeError('region should be of type "string"');const nd=(void 0)("sha256").update(Ra).digest("hex"),ad=getScope(td,qa,rd);return[signV4Algorithm,makeDateLong(qa),ad,nd].join( `
2024-11-27 11:30:55 +08:00
` )}function postPresignSignatureV4(Ra,qa,td,rd){if(!isString(Ra))throw new TypeError('region should be of type "string"');if(!isObject(qa))throw new TypeError('date should be of type "object"');if(!isString(td))throw new TypeError('secretKey should be of type "string"');if(!isString(rd))throw new TypeError('policyBase64 should be of type "string"');return(void 0)("sha256",getSigningKey(qa,Ra,td)).update(rd).digest("hex").toLowerCase()}function signV4(Ra,qa,td,rd,nd,ad,sd="s3"){if(!isObject(Ra))throw new TypeError('request should be of type "object"');if(!isString(qa))throw new TypeError('accessKey should be of type "string"');if(!isString(td))throw new TypeError('secretKey should be of type "string"');if(!isString(rd))throw new TypeError('region should be of type "string"');if(!qa)throw new AccessKeyRequiredError("accessKey is required for signing");if(!td)throw new SecretKeyRequiredError("secretKey is required for signing");const ud=getSignedHeaders(Ra.headers),cd=getCanonicalRequest(Ra.method,Ra.path,Ra.headers,ud,ad),dd=sd||"s3",pd=getStringToSign(cd,nd,rd,dd),fd=getSigningKey(nd,rd,td,dd),Td=getCredential(qa,rd,nd,dd),Sd=(void 0)("sha256",fd).update(pd).digest("hex").toLowerCase();return ` $ { signV4Algorithm } Credential = $ { Td } , SignedHeaders = $ { ud . join ( ";" ) . toLowerCase ( ) } , Signature = $ { Sd } ` }function presignSignatureV4(Ra,qa,td,rd,nd,ad,sd){if(!isObject(Ra))throw new TypeError('request should be of type "object"');if(!isString(qa))throw new TypeError('accessKey should be of type "string"');if(!isString(td))throw new TypeError('secretKey should be of type "string"');if(!isString(nd))throw new TypeError('region should be of type "string"');if(!qa)throw new AccessKeyRequiredError("accessKey is required for presigning");if(!td)throw new SecretKeyRequiredError("secretKey is required for presigning");if(!isNumber(sd))throw new TypeError('expires should be of type "number"');if(sd<1)throw new ExpiresParamError("expires param cannot be less than 1 seconds");if(sd>604800)throw new ExpiresParamError("expires param cannot be greater than 7 days");const ud=makeDateLong(ad),cd=getSignedHeaders(Ra.headers),dd=getCredential(qa,nd,ad),pd="UNSIGNED-PAYLOAD",fd=[];fd.push( ` X - Amz - Algorithm = $ { signV4Algorithm } ` ),fd.push( ` X - Amz - Credential = $ { uriEscape ( dd ) } ` ),fd.push( ` X - Amz - Date = $ { ud } ` ),fd.push( ` X - Amz - Expires = $ { sd } ` ),fd.push( ` X - Amz - SignedHeaders = $ { uriEscape ( cd . join ( ";" ) . toLowerCase ( ) ) } ` ),rd&&fd.push( ` X - Amz - Security - Token = $ { uriEscape ( rd ) } ` );const Td=Ra.path.split("?")[0];let Sd=Ra.path.split("?")[1];Sd?Sd=Sd+"&"+fd.join("&"):Sd=fd.join("&");const Ad=Td+"?"+Sd,Nd=getCanonicalRequest(Ra.method,Ad,Ra.headers,cd,pd),Ld=getStringToSign(Nd,ad,nd),Od=(void 0)("sha256",getSigningKey(ad,nd,td)).update(Ld).digest("hex").toLowerCase();return Ra.protocol+"//"+Ra.headers.host+Ad+ ` & X - Amz - Signature = $ { Od } ` }async function readAsBuffer(Ra){return new Promise((qa,td)=>{const rd=[];Ra.on("data",nd=>rd.push(nd)).on("error",nd=>td(nd)).on("end",()=>qa(Buffer $ 2.concat(rd)))})}async function readAsString(Ra){return(await readAsBuffer(Ra)).toString()}async function drainResponse(Ra){return new Promise((qa,td)=>{Ra.on("data",()=>{}).on("error",rd=>td(rd)).on("end",()=>qa())})}function parseBucketRegion(Ra){return parseXml(Ra).LocationConstraint}const fxp=new fxp $ 2.XMLParser;function parseError(Ra,qa){let td={};const rd=fxp.parse(Ra);rd.Error&&(td=rd.Error);const nd=new S3Error;return Object.entries(td).forEach(([ad,sd])=>{nd[ad.toLowerCase()]=sd}),Object.entries(qa).forEach(([ad,sd])=>{nd[ad]=sd}),nd}async function parseResponseError(Ra){const qa=Ra.statusCode;let td,rd;qa===301?(td="MovedPermanently",rd="Moved Permanently"):qa===307?(td="TemporaryRedirect",rd="Are you using the correct endpoint URL?"):qa===403?(td="AccessDenied",rd="Valid and authorized credentials required"):qa===404?(td="NotFound",rd="Not Found"):qa===405||qa===501?(td="MethodNotAllowed",rd="Method Not Allowed"):(td="UnknownError",rd= ` $ { qa } ` );const nd={};nd.amzRequestid=Ra.headers["x-amz-request-id"],nd.amzId2=Ra.headers["x-amz-id-2"],nd.amzBucketRegion=Ra.headers["x-amz-bucket-region"];const ad=await r
2024-09-25 14:23:53 +08:00
` )}),nd.write( `
` )};if(nd.write( ` REQUEST : $ { qa . method } $ { qa . path }
` ),ad(qa.headers),td&&(this.logStream.write( ` RESPONSE : $ { td . statusCode }
` ),ad(td.headers)),rd){nd.write( ` ERROR BODY :
` );const sd=JSON.stringify(rd,null," ");nd.write( ` $ { sd }
2024-11-27 11:30:55 +08:00
` )}}traceOn(qa){qa||(qa=define_process_default $ 2.stdout),this.logStream=qa}traceOff(){this.logStream=void 0}async makeRequestAsync(qa,td="",rd=[200],nd=""){if(!isObject(qa))throw new TypeError('options should be of type "object"');if(!isString(td)&&!isObject(td))throw new TypeError('payload should be of type "string" or "Buffer"');if(rd.forEach(sd=>{if(!isNumber(sd))throw new TypeError('statusCode should be of type "number"')}),!isString(nd))throw new TypeError('region should be of type "string"');qa.headers||(qa.headers={}),(qa.method==="POST"||qa.method==="PUT"||qa.method==="DELETE")&&(qa.headers["content-length"]=td.length.toString());const ad=this.enableSHA256?toSha256(td):"";return this.makeRequestStreamAsync(qa,td,ad,rd,nd)}async makeRequestAsyncOmit(qa,td="",rd=[200],nd=""){const ad=await this.makeRequestAsync(qa,td,rd,nd);return await drainResponse(ad),ad}async makeRequestStreamAsync(qa,td,rd,nd,ad){if(!isObject(qa))throw new TypeError('options should be of type "object"');if(!(Buffer $ 2.isBuffer(td)||typeof td=="string"||isReadableStream(td)))throw new InvalidArgumentError( ` stream should be a Buffer , string or readable Stream , got $ { typeof td } instead ` );if(!isString(rd))throw new TypeError('sha256sum should be of type "string"');if(nd.forEach(cd=>{if(!isNumber(cd))throw new TypeError('statusCode should be of type "number"')}),!isString(ad))throw new TypeError('region should be of type "string"');if(!this.enableSHA256&&rd.length!==0)throw new InvalidArgumentError("sha256sum expected to be empty for anonymous or https requests");if(this.enableSHA256&&rd.length!==64)throw new InvalidArgumentError( ` Invalid sha256sum : $ { rd } ` );await this.checkAndRefreshCreds(),ad=ad||await this.getBucketRegionAsync(qa.bucketName);const sd=this.getRequestOptions({...qa,region:ad});if(!this.anonymous){this.enableSHA256||(rd="UNSIGNED-PAYLOAD");const cd=new Date;sd.headers["x-amz-date"]=makeDateLong(cd),sd.headers["x-amz-content-sha256"]=rd,this.sessionToken&&(sd.headers["x-amz-security-token"]=this.sessionToken),sd.headers.authorization=signV4(sd,this.accessKey,this.secretKey,ad,cd,rd)}const ud=await request $ 1(this.transport,sd,td);if(!ud.statusCode)throw new Error("BUG: response doesn't have a statusCode");if(!nd.includes(ud.statusCode)){delete this.regionMap[qa.bucketName];const cd=await parseResponseError(ud);throw this.logHTTP(sd,ud,cd),cd}return this.logHTTP(sd,ud),ud}async getBucketRegionAsync(qa){if(!isValidBucketName(qa))throw new InvalidBucketNameError( ` Invalid bucket name : $ { qa } ` );if(this.region)return this.region;const td=this.regionMap[qa];if(td)return td;const rd=async dd=>{const pd=await readAsString(dd),fd=parseBucketRegion(pd)||DEFAULT_REGION;return this.regionMap[qa]=fd,fd},nd="GET",ad="location",sd=this.pathStyle&&!isBrowser_1;let ud;try{const dd=await this.makeRequestAsync({method:nd,bucketName:qa,query:ad,pathStyle:sd},"",[200],DEFAULT_REGION);return rd(dd)}catch(dd){if(dd.name!=="AuthorizationHeaderMalformed"||(ud=dd.Region,!ud))throw dd}const cd=await this.makeRequestAsync({method:nd,bucketName:qa,query:ad,pathStyle:sd},"",[200],ud);return await rd(cd)}makeRequest(qa,td="",rd=[200],nd="",ad,sd){let ud;ad?ud=this.makeRequestAsync(qa,td,rd,nd):ud=this.makeRequestAsyncOmit(qa,td,rd,nd),ud.then(cd=>sd(null,cd),cd=>{sd(cd)})}makeRequestStream(qa,td,rd,nd,ad,sd,ud){(async()=>{const dd=await this.makeRequestStreamAsync(qa,td,rd,nd,ad);return sd||await drainResponse(dd),dd})().then(dd=>ud(null,dd),dd=>ud(dd))}getBucketRegion(qa,td){return this.getBucketRegionAsync(qa).then(rd=>td(null,rd),rd=>td(rd))}async removeBucket(qa){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);await this.makeRequestAsyncOmit({method:"DELETE",bucketName:qa},"",[204]),delete this.regionMap[qa]}async statObject(qa,td,rd={}){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(td))throw new InvalidObjectNameError( ` Invalid object name : $ { td } ` );if(!isObject(rd))throw new InvalidArgumentError('statOpts should be of type "object"');const nd=queryString.string
2024-09-18 09:46:23 +08:00
object - assign
( c ) Sindre Sorhus
@ license MIT
2024-11-27 11:30:55 +08:00
* /var objectAssign,hasRequiredObjectAssign;function requireObjectAssign(){if(hasRequiredObjectAssign)return objectAssign;hasRequiredObjectAssign=1;var Ra=Object.getOwnPropertySymbols,qa=Object.prototype.hasOwnProperty,td=Object.prototype.propertyIsEnumerable;function rd(ad){if(ad==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(ad)}function nd(){try{if(!Object.assign)return!1;var ad=new String("abc");if(ad[5]="de",Object.getOwnPropertyNames(ad)[0]==="5")return!1;for(var sd={},ud=0;ud<10;ud++)sd["_"+String.fromCharCode(ud)]=ud;var cd=Object.getOwnPropertyNames(sd).map(function(pd){return sd[pd]});if(cd.join("")!=="0123456789")return!1;var dd={};return"abcdefghijklmnopqrst".split("").forEach(function(pd){dd[pd]=pd}),Object.keys(Object.assign({},dd)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return objectAssign=nd()?Object.assign:function(ad,sd){for(var ud,cd=rd(ad),dd,pd=1;pd<arguments.length;pd++){ud=Object(arguments[pd]);for(var fd in ud)qa.call(ud,fd)&&(cd[fd]=ud[fd]);if(Ra){dd=Ra(ud);for(var Td=0;Td<dd.length;Td++)td.call(ud,dd[Td])&&(cd[dd[Td]]=ud[dd[Td]])}}return cd},objectAssign}var ajax={},hasRequiredAjax;function requireAjax(){return hasRequiredAjax||(hasRequiredAjax=1,function(Ra){Ra.__esModule=!0,Ra.default=qa;function qa(td,rd){return rd===void 0&&(rd={}),new Promise(function(nd,ad){var sd=rd,ud=sd.async,cd=ud===void 0?!0:ud,dd=sd.data,pd=dd===void 0?null:dd,fd=sd.headers,Td=fd===void 0?{}:fd,Sd=sd.method,Ad=Sd===void 0?"get":Sd,Nd=sd.timeout,Ld=Nd===void 0?0:Nd,Rd=sd.onprogress,Od=new XMLHttpRequest,kd;Ld&&(kd=setTimeout(function(){ad(new Error("the request timeout "+Ld+"ms"))},Ld)),Od.onerror=function(){ad(new Error("unknown error"))},Od.upload&&(Od.upload.onprogress=Rd),Od.onreadystatechange=function(){if(Od.readyState===4)if(Ld&&clearTimeout(kd),Od.status>=200&&Od.status<300)nd(Od.response,Od);else{var Fd=new Error("the request is error");ad(Fd)}},Od.open(Ad,td,cd),Object.keys(Td).forEach(function(Fd){Od.setRequestHeader(Fd,Td[Fd])});try{Od.send(pd)}catch(Fd){ad(Fd)}})}}(ajax)),ajax}var utils={},md5={exports:{}},crypt={exports:{}},hasRequiredCrypt;function requireCrypt(){return hasRequiredCrypt||(hasRequiredCrypt=1,function(){var Ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ ",qa={rotl:function(td,rd){return td<<rd|td>>>32-rd},rotr:function(td,rd){return td<<32-rd|td>>>rd},endian:function(td){if(td.constructor==Number)return qa.rotl(td,8)&16711935|qa.rotl(td,24)&4278255360;for(var rd=0;rd<td.length;rd++)td[rd]=qa.endian(td[rd]);return td},randomBytes:function(td){for(var rd=[];td>0;td--)rd.push(Math.floor(Math.random()*256));return rd},bytesToWords:function(td){for(var rd=[],nd=0,ad=0;nd<td.length;nd++,ad+=8)rd[ad>>>5]|=td[nd]<<24-ad%32;return rd},wordsToBytes:function(td){for(var rd=[],nd=0;nd<td.length*32;nd+=8)rd.push(td[nd>>>5]>>>24-nd%32&255);return rd},bytesToHex:function(td){for(var rd=[],nd=0;nd<td.length;nd++)rd.push((td[nd]>>>4).toString(16)),rd.push((td[nd]&15).toString(16));return rd.join(" ")},hexToBytes:function(td){for(var rd=[],nd=0;nd<td.length;nd+=2)rd.push(parseInt(td.substr(nd,2),16));return rd},bytesToBase64:function(td){for(var rd=[],nd=0;nd<td.length;nd+=3)for(var ad=td[nd]<<16|td[nd+1]<<8|td[nd+2],sd=0;sd<4;sd++)nd*8+sd*6<=td.length*8?rd.push(Ra.charAt(ad>>>6*(3-sd)&63)):rd.push(" = ");return rd.join(" ")},base64ToBytes:function(td){td=td.replace(/[^A-Z0-9+\/]/ig," " ) ; for ( var rd = [ ] , nd = 0 , ad = 0 ; nd < td . length ; ad = ++ nd % 4 ) ad != 0 && rd . push ( ( Ra . indexOf ( td . charAt ( nd - 1 ) ) & Math . pow ( 2 , - 2 * ad + 8 ) - 1 ) << ad * 2 | Ra . indexOf ( td . charAt ( nd ) ) >>> 6 - ad * 2 ) ; return rd } } ; crypt . exports = qa } ( ) ) , crypt . exports } var charenc _1 , hasRequiredCharenc ; function requireCharenc ( ) { if ( hasRequiredCharenc ) return charenc _1 ; hasRequiredCharenc = 1 ; var Ra = { utf8 : { stringToBytes : function ( qa ) { return Ra . bin . stringToBytes ( unescape ( encodeURIComponent ( qa ) ) ) } , bytesToString : function ( qa ) { return decodeURIComponent ( escape ( Ra . bin . bytesToString ( qa ) ) ) } } , bin : { stringToBytes : function ( qa ) { for ( var td = [ ] , rd = 0 ; rd < qa . length ; rd ++ ) td . push ( qa . charCodeAt ( rd ) & 255 ) ; return td } , bytesToString : function ( qa ) { fo
2024-09-18 09:46:23 +08:00
* Determine if an object is a Buffer
*
* @ author Feross Aboukhadijeh < https : //feross.org>
* @ license MIT
2024-11-27 11:30:55 +08:00
* / v a r i s B u f f e r _ 1 , h a s R e q u i r e d I s B u f f e r ; f u n c t i o n r e q u i r e I s B u f f e r ( ) { i f ( h a s R e q u i r e d I s B u f f e r ) r e t u r n i s B u f f e r _ 1 ; h a s R e q u i r e d I s B u f f e r = 1 , i s B u f f e r _ 1 = f u n c t i o n ( t d ) { r e t u r n t d ! = n u l l & & ( R a ( t d ) | | q a ( t d ) | | ! ! t d . _ i s B u f f e r ) } ; f u n c t i o n R a ( t d ) { r e t u r n ! ! t d . c o n s t r u c t o r & & t y p e o f t d . c o n s t r u c t o r . i s B u f f e r = = " f u n c t i o n " & & t d . c o n s t r u c t o r . i s B u f f e r ( t d ) } f u n c t i o n q a ( t d ) { r e t u r n t y p e o f t d . r e a d F l o a t L E = = " f u n c t i o n " & & t y p e o f t d . s l i c e = = " f u n c t i o n " & & R a ( t d . s l i c e ( 0 , 0 ) ) } r e t u r n i s B u f f e r _ 1 } v a r h a s R e q u i r e d M d 5 ; f u n c t i o n r e q u i r e M d 5 ( ) { r e t u r n h a s R e q u i r e d M d 5 | | ( h a s R e q u i r e d M d 5 = 1 , f u n c t i o n ( ) { v a r R a = r e q u i r e C r y p t ( ) , q a = r e q u i r e C h a r e n c ( ) . u t f 8 , t d = r e q u i r e I s B u f f e r ( ) , r d = r e q u i r e C h a r e n c ( ) . b i n , n d = f u n c t i o n ( a d , s d ) { a d . c o n s t r u c t o r = = S t r i n g ? s d & & s d . e n c o d i n g = = = " b i n a r y " ? a d = r d . s t r i n g T o B y t e s ( a d ) : a d = q a . s t r i n g T o B y t e s ( a d ) : t d ( a d ) ? a d = A r r a y . p r o t o t y p e . s l i c e . c a l l ( a d , 0 ) : ! A r r a y . i s A r r a y ( a d ) & & a d . c o n s t r u c t o r ! = = U i n t 8 A r r a y & & ( a d = a d . t o S t r i n g ( ) ) ; f o r ( v a r u d = R a . b y t e s T o W o r d s ( a d ) , c d = a d . l e n g t h * 8 , d d = 1 7 3 2 5 8 4 1 9 3 , p d = - 2 7 1 7 3 3 8 7 9 , f d = - 1 7 3 2 5 8 4 1 9 4 , T d = 2 7 1 7 3 3 8 7 8 , S d = 0 ; S d < u d . l e n g t h ; S d + + ) u d [ S d ] = ( u d [ S d ] < < 8 | u d [ S d ] > > > 2 4 ) & 1 6 7 1 1 9 3 5 | ( u d [ S d ] < < 2 4 | u d [ S d ] > > > 8 ) & 4 2 7 8 2 5 5 3 6 0 ; u d [ c d > > > 5 ] | = 1 2 8 < < c d % 3 2 , u d [ ( c d + 6 4 > > > 9 < < 4 ) + 1 4 ] = c d ; f o r ( v a r A d = n d . _ f f , N d = n d . _ g g , L d = n d . _ h h , R d = n d . _ i i , S d = 0 ; S d < u d . l e n g t h ; S d + = 1 6 ) { v a r O d = d d , k d = p d , F d = f d , U d = T d ; d d = A d ( d d , p d , f d , T d , u d [ S d + 0 ] , 7 , - 6 8 0 8 7 6 9 3 6 ) , T d = A d ( T d , d d , p d , f d , u d [ S d + 1 ] , 1 2 , - 3 8 9 5 6 4 5 8 6 ) , f d = A d ( f d , T d , d d , p d , u d [ S d + 2 ] , 1 7 , 6 0 6 1 0 5 8 1 9 ) , p d = A d ( p d , f d , T d , d d , u d [ S d + 3 ] , 2 2 , - 1 0 4 4 5 2 5 3 3 0 ) , d d = A d ( d d , p d , f d , T d , u d [ S d + 4 ] , 7 , - 1 7 6 4 1 8 8 9 7 ) , T d = A d ( T d , d d , p d , f d , u d [ S d + 5 ] , 1 2 , 1 2 0 0 0 8 0 4 2 6 ) , f d = A d ( f d , T d , d d , p d , u d [ S d + 6 ] , 1 7 , - 1 4 7 3 2 3 1 3 4 1 ) , p d = A d ( p d , f d , T d , d d , u d [ S d + 7 ] , 2 2 , - 4 5 7 0 5 9 8 3 ) , d d = A d ( d d , p d , f d , T d , u d [ S d + 8 ] , 7 , 1 7 7 0 0 3 5 4 1 6 ) , T d = A d ( T d , d d , p d , f d , u d [ S d + 9 ] , 1 2 , - 1 9 5 8 4 1 4 4 1 7 ) , f d = A d ( f d , T d , d d , p d , u d [ S d + 1 0 ] , 1 7 , - 4 2 0 6 3 ) , p d = A d ( p d , f d , T d , d d , u d [ S d + 1 1 ] , 2 2 , - 1 9 9 0 4 0 4 1 6 2 ) , d d = A d ( d d , p d , f d , T d , u d [ S d + 1 2 ] , 7 , 1 8 0 4 6 0 3 6 8 2 ) , T d = A d ( T d , d d , p d , f d , u d [ S d + 1 3 ] , 1 2 , - 4 0 3 4 1 1 0 1 ) , f d = A d ( f d , T d , d d , p d , u d [ S d + 1 4 ] , 1 7 , - 1 5 0 2 0 0 2 2 9 0 ) , p d = A d ( p d , f d , T d , d d , u d [ S d + 1 5 ] , 2 2 , 1 2 3 6 5 3 5 3 2 9 ) , d d = N d ( d d , p d , f d , T d , u d [ S d + 1 ] , 5 , - 1 6 5 7 9 6 5 1 0 ) , T d = N d ( T d , d d , p d , f d , u d [ S d + 6 ] , 9 , - 1 0 6 9 5 0 1 6 3 2 ) , f d = N d ( f d , T d , d d , p d , u d [ S d + 1 1 ] , 1 4 , 6 4 3 7 1 7 7 1 3 ) , p d = N d ( p d , f d , T d , d d , u d [ S d + 0 ] , 2 0 , - 3 7 3 8 9 7 3 0 2 ) , d d = N d ( d d , p d , f d , T d , u d [ S d + 5 ] , 5 , - 7 0 1 5 5 8 6 9 1 ) , T d = N d ( T d , d d , p d , f d , u d [ S d + 1 0 ] , 9 , 3 8 0 1 6 0 8 3 ) , f d = N d ( f d , T d , d d , p d , u d [ S d + 1 5 ] , 1 4 , - 6 6 0 4 7 8 3 3 5 ) , p d = N d ( p d , f d , T d , d d , u d [ S d + 4 ] , 2 0 , - 4 0 5 5 3 7 8 4 8 ) , d d = N d ( d d , p d , f d , T d , u d [ S d + 9 ] , 5 , 5 6 8 4 4 6 4 3 8 ) , T d = N d ( T d , d d , p d , f d , u d [ S d + 1 4 ] , 9 , - 1 0 1 9 8 0 3 6 9 0 ) , f d = N d ( f d , T d , d d , p d , u d [ S d + 3 ] , 1 4 , - 1 8 7 3 6 3 9 6 1 ) , p d = N d ( p d , f d , T d , d d , u d [ S d + 8 ] , 2 0 , 1 1 6 3 5 3 1 5 0 1 ) , d d = N d ( d d , p d , f d , T d , u d [ S d + 1 3 ] , 5 , - 1 4 4 4 6 8 1 4 6 7 ) , T d = N d ( T d , d d , p d , f d , u d [ S d + 2 ] , 9 , - 5 1 4 0 3 7 8 4 ) , f d = N d ( f d , T d , d d , p d , u d [ S d + 7 ] , 1 4 , 1 7 3 5 3 2 8 4 7 3 ) , p d = N d ( p d , f d , T d , d d , u d [ S d + 1 2 ] , 2 0 , - 1 9 2 6 6 0 7 7 3 4 ) , d d = L d ( d d , p d , f d , T d , u d [ S d + 5 ] , 4 , - 3 7 8 5 5 8 ) , T d = L d ( T d , d d , p d , f d , u d [ S d + 8 ] , 1 1 , - 2 0 2 2 5 7 4 4 6 3 ) , f d = L d ( f d , T d , d d , p d , u d [ S d + 1 1 ] , 1 6 , 1 8 3 9 0 3 0 5 6 2 ) , p d = L d ( p d , f d , T d , d d , u d [ S d + 1 4 ] , 2 3 , - 3 5 3 0 9 5 5 6 ) , d d = L d ( d d , p d , f d , T d , u d [ S d + 1 ] , 4 , - 1 5 3 0 9 9 2 0 6 0 ) , T d = L d ( T d , d d , p d , f d , u d [ S d + 4 ] , 1 1 , 1 2 7 2 8 9 3 3 5 3 ) , f d = L d ( f d , T d , d d , p d , u d [ S d + 7 ] , 1 6 , - 1 5 5 4 9 7 6 3 2 ) , p d = L d ( p d , f d , T d , d d , u d [ S d + 1 0 ] , 2 3 , - 1 0 9 4 7 3 0 6 4 0 ) , d d = L d ( d d , p d , f d , T d , u d [ S d + 1 3 ] , 4 , 6 8 1 2 7 9 1 7 4 ) , T d = L d ( T d , d d , p d , f d , u d [ S d + 0 ] , 1 1 , - 3 5 8 5 3 7 2 2 2 ) , f d = L d ( f d , T d , d d , p d , u d [ S d + 3 ] , 1 6 , - 7 2 2 5 2 1 9 7 9 ) , p d = L d ( p d , f d , T d , d d , u d [ S d + 6 ] , 2 3 , 7 6 0 2 9 1 8 9 ) , d d = L d ( d d , p d , f d , T d , u d [ S d + 9 ] , 4 , - 6 4 0 3 6 4 4 8 7 ) , T d = L d ( T d , d d , p d , f d , u d [ S d + 1 2 ] , 1 1 , - 4 2 1 8 1 5 8 3 5 ) , f d = L d ( f d , T d , d d , p d , u d [ S d + 1 5 ] , 1 6 , 5 3 0 7 4 2 5 2 0 ) , p d = L d ( p d , f d , T d , d d , u d [ S d + 2 ] , 2 3 , - 9 9 5 3 3 8 6 5 1 ) , d d = R d ( d d , p d , f d , T d , u d [ S d + 0 ] , 6 , - 1 9 8 6 3 0 8 4 4 ) , T d = R d ( T d , d d , p d , f d , u d [ S d + 7 ] , 1 0 , 1 1 2 6 8 9 1 4 1 5 ) , f d = R d ( f d , T d , d d , p d , u d [ S d + 1 4 ] , 1 5 , - 1 4 1 6 3 5 4 9 0 5 ) , p d = R d ( p d , f d , T d , d d , u d [ S d + 5 ] , 2 1 , - 5 7 4 3 4 0 5 5 ) , d d = R d ( d d , p d , f d , T d , u d [ S d + 1 2 ] , 6 , 1 7 0 0 4 8 5 5 7 1 ) , T d = R d ( T d , d d , p d , f d , u d [ S d + 3 ] , 1 0 , - 1 8 9 4 9 8 6 6 0 6 ) , f d = R d ( f d , T d , d d , p d , u d [ S d + 1 0 ] , 1 5 , - 1 0 5 1 5 2 3 ) , p d = R d ( p d , f d , T d , d d , u d [ S d + 1 ] , 2 1 , - 2 0 5 4 9 2 2 7 9 9 ) , d d = R d ( d d , p d , f d , T d , u d [ S d + 8 ] , 6 , 1 8 7 3 3 1 3 3 5 9 ) , T d = R d ( T d , d d , p d , f d , u d [ S d + 1 5 ] , 1 0 , - 3 0 6 1 1 7 4 4 ) , f d = R d ( f d , T d , d d , p d , u d [ S d + 6 ] , 1 5 , - 1 5 6 0 1 9 8 3 8 0 ) , p d = R d ( p d , f d , T d , d d , u d [ S d + 1 3 ] , 2 1 , 1 3 0 9 1 5 1 6 4 9 ) , d d = R d ( d d , p d , f d , T d , u d [ S d + 4 ] , 6 , - 1 4 5 5 2 3 0 7 0 ) , T d = R d ( T d , d d , p d , f d , u d [ S d + 1 1 ] , 1 0 , - 1 1 2 0 2 1 0 3 7 9 ) , f d = R d ( f d , T d , d d , p d , u d [ S d + 2 ] , 1 5 , 7 1 8 7 8 7 2 5 9 ) , p d = R d ( p d , f d , T d , d d , u d [ S d + 9 ] , 2 1 , - 3 4 3 4 8 5 5 5 1 ) , d d = d d + O d > > > 0 , p d = p d + k d > > > 0 , f d = f d + F d > > > 0 , T d = T d + U d > > > 0 } r e t u r n R a . e n d i a n ( [ d d , p d , f d , T d ] ) } ; n d . _ f f = f u n c t i o n ( a d , s d , u d , c d , d d , p d , f d ) { v a r T d = a d + ( s d & u d | ~ s d & c d ) + ( d d > > > 0 ) + f d ; r e t u r n ( T d < < p d | T d > > > 3 2 - p d ) + s d } , n d . _ g g = f u n c t i o n ( a d , s
2024-09-18 09:46:23 +08:00
* !
* ! Copyright 2011 - 2012 , 2014 Jean - Christophe Sirot < sirot @ chelonix . com >
* !
* ! This file is part of digest . js
* !
* ! digest . js is free software : you can redistribute it and / or modify it under
* ! the terms of the GNU General Public License as published by the Free Software
* ! Foundation , either version 3 of the License , or ( at your option ) any later
* ! version .
* !
* ! digest . js is distributed in the hope that it will be useful , but
* ! WITHOUT ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY
* ! or FITNESS FOR A PARTICULAR PURPOSE . See the GNU General Public License for
* ! more details .
* !
* ! You should have received a copy of the GNU General Public License along with
* ! digest . js . If not , see http : //www.gnu.org/licenses/.
* !
2024-11-27 11:30:55 +08:00
* ! * * * * * END LICENSE BLOCK * * * * * * / v a r h a s R e q u i r e d D i g e s t ; f u n c t i o n r e q u i r e D i g e s t ( ) { r e t u r n h a s R e q u i r e d D i g e s t | | ( h a s R e q u i r e d D i g e s t = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( ) { A r r a y B u f f e r . p r o t o t y p e . s l i c e | | ( A r r a y B u f f e r . p r o t o t y p e . s l i c e = f u n c t i o n ( t d , r d ) { v a r n d , a d = n e w U i n t 8 A r r a y ( t h i s ) ; r d = = = v o i d 0 & & ( r d = a d . l e n g t h ) ; v a r s d = n e w A r r a y B u f f e r ( r d - t d ) , u d = n e w U i n t 8 A r r a y ( s d ) ; f o r ( n d = 0 ; n d < u d . l e n g t h ; n d + + ) u d [ n d ] = a d [ n d + t d ] ; r e t u r n s d } ) } ) ( ) , f u n c t i o n ( t d ) { f u n c t i o n r d ( ) { } r d . p r o t o t y p e . p r o c e s s B l o c k = f u n c t i o n ( p d ) { v a r f d = t h i s . c u r r e n t [ 0 ] , T d = t h i s . c u r r e n t [ 1 ] , S d = t h i s . c u r r e n t [ 2 ] , A d = t h i s . c u r r e n t [ 3 ] , N d = t h i s . c u r r e n t [ 4 ] , L d = [ p d [ 0 ] < < 2 4 | p d [ 1 ] < < 1 6 | p d [ 2 ] < < 8 | p d [ 3 ] , p d [ 4 ] < < 2 4 | p d [ 5 ] < < 1 6 | p d [ 6 ] < < 8 | p d [ 7 ] , p d [ 8 ] < < 2 4 | p d [ 9 ] < < 1 6 | p d [ 1 0 ] < < 8 | p d [ 1 1 ] , p d [ 1 2 ] < < 2 4 | p d [ 1 3 ] < < 1 6 | p d [ 1 4 ] < < 8 | p d [ 1 5 ] , p d [ 1 6 ] < < 2 4 | p d [ 1 7 ] < < 1 6 | p d [ 1 8 ] < < 8 | p d [ 1 9 ] , p d [ 2 0 ] < < 2 4 | p d [ 2 1 ] < < 1 6 | p d [ 2 2 ] < < 8 | p d [ 2 3 ] , p d [ 2 4 ] < < 2 4 | p d [ 2 5 ] < < 1 6 | p d [ 2 6 ] < < 8 | p d [ 2 7 ] , p d [ 2 8 ] < < 2 4 | p d [ 2 9 ] < < 1 6 | p d [ 3 0 ] < < 8 | p d [ 3 1 ] , p d [ 3 2 ] < < 2 4 | p d [ 3 3 ] < < 1 6 | p d [ 3 4 ] < < 8 | p d [ 3 5 ] , p d [ 3 6 ] < < 2 4 | p d [ 3 7 ] < < 1 6 | p d [ 3 8 ] < < 8 | p d [ 3 9 ] , p d [ 4 0 ] < < 2 4 | p d [ 4 1 ] < < 1 6 | p d [ 4 2 ] < < 8 | p d [ 4 3 ] , p d [ 4 4 ] < < 2 4 | p d [ 4 5 ] < < 1 6 | p d [ 4 6 ] < < 8 | p d [ 4 7 ] , p d [ 4 8 ] < < 2 4 | p d [ 4 9 ] < < 1 6 | p d [ 5 0 ] < < 8 | p d [ 5 1 ] , p d [ 5 2 ] < < 2 4 | p d [ 5 3 ] < < 1 6 | p d [ 5 4 ] < < 8 | p d [ 5 5 ] , p d [ 5 6 ] < < 2 4 | p d [ 5 7 ] < < 1 6 | p d [ 5 8 ] < < 8 | p d [ 5 9 ] , p d [ 6 0 ] < < 2 4 | p d [ 6 1 ] < < 1 6 | p d [ 6 2 ] < < 8 | p d [ 6 3 ] ] , R d , O d ; f o r ( O d = 1 6 ; O d < 8 0 ; O d + + ) L d . p u s h ( ( L d [ O d - 3 ] ^ L d [ O d - 8 ] ^ L d [ O d - 1 4 ] ^ L d [ O d - 1 6 ] ) < < 1 | ( L d [ O d - 3 ] ^ L d [ O d - 8 ] ^ L d [ O d - 1 4 ] ^ L d [ O d - 1 6 ] ) > > > 3 1 ) ; f o r ( O d = 0 ; O d < 8 0 ; O d + + ) R d = ( f d < < 5 | f d > > > 2 7 ) + N d + L d [ O d ] , O d < 2 0 ? R d + = ( T d & S d | ~ T d & A d ) + 1 5 1 8 5 0 0 2 4 9 | 0 : O d < 4 0 ? R d + = ( T d ^ S d ^ A d ) + 1 8 5 9 7 7 5 3 9 3 | 0 : O d < 6 0 ? R d + = ( T d & S d | T d & A d | S d & A d ) + 2 4 0 0 9 5 9 7 0 8 | 0 : R d + = ( T d ^ S d ^ A d ) + 3 3 9 5 4 6 9 7 8 2 | 0 , N d = A d , A d = S d , S d = T d < < 3 0 | T d > > > 2 , T d = f d , f d = R d ; t h i s . c u r r e n t [ 0 ] + = f d , t h i s . c u r r e n t [ 1 ] + = T d , t h i s . c u r r e n t [ 2 ] + = S d , t h i s . c u r r e n t [ 3 ] + = A d , t h i s . c u r r e n t [ 4 ] + = N d , t h i s . c u r r e n t L e n + = 6 4 } , r d . p r o t o t y p e . d o P a d d i n g = f u n c t i o n ( ) { v a r p d = ( t h i s . i n L e n + t h i s . c u r r e n t L e n ) * 8 , f d = 0 , T d = p d & 4 2 9 4 9 6 7 2 9 5 , S d = t h i s . i n L e n < = 5 5 ? 5 5 - t h i s . i n L e n : 1 1 9 - t h i s . i n L e n , A d = n e w U i n t 8 A r r a y ( n e w A r r a y B u f f e r ( S d + 1 + 8 ) ) ; r e t u r n A d [ 0 ] = 1 2 8 , A d [ A d . l e n g t h - 1 ] = T d & 2 5 5 , A d [ A d . l e n g t h - 2 ] = T d > > > 8 & 2 5 5 , A d [ A d . l e n g t h - 3 ] = T d > > > 1 6 & 2 5 5 , A d [ A d . l e n g t h - 4 ] = T d > > > 2 4 & 2 5 5 , A d [ A d . l e n g t h - 5 ] = f d & 2 5 5 , A d [ A d . l e n g t h - 6 ] = f d > > > 8 & 2 5 5 , A d [ A d . l e n g t h - 7 ] = f d > > > 1 6 & 2 5 5 , A d [ A d . l e n g t h - 8 ] = f d > > > 2 4 & 2 5 5 , A d } , r d . p r o t o t y p e . g e t D i g e s t = f u n c t i o n ( ) { v a r p d = n e w U i n t 8 A r r a y ( n e w A r r a y B u f f e r ( 2 0 ) ) ; r e t u r n p d [ 3 ] = t h i s . c u r r e n t [ 0 ] & 2 5 5 , p d [ 2 ] = t h i s . c u r r e n t [ 0 ] > > > 8 & 2 5 5 , p d [ 1 ] = t h i s . c u r r e n t [ 0 ] > > > 1 6 & 2 5 5 , p d [ 0 ] = t h i s . c u r r e n t [ 0 ] > > > 2 4 & 2 5 5 , p d [ 7 ] = t h i s . c u r r e n t [ 1 ] & 2 5 5 , p d [ 6 ] = t h i s . c u r r e n t [ 1 ] > > > 8 & 2 5 5 , p d [ 5 ] = t h i s . c u r r e n t [ 1 ] > > > 1 6 & 2 5 5 , p d [ 4 ] = t h i s . c u r r e n t [ 1 ] > > > 2 4 & 2 5 5 , p d [ 1 1 ] = t h i s . c u r r e n t [ 2 ] & 2 5 5 , p d [ 1 0 ] = t h i s . c u r r e n t [ 2 ] > > > 8 & 2 5 5 , p d [ 9 ] = t h i s . c u r r e n t [ 2 ] > > > 1 6 & 2 5 5 , p d [ 8 ] = t h i s . c u r r e n t [ 2 ] > > > 2 4 & 2 5 5 , p d [ 1 5 ] = t h i s . c u r r e n t [ 3 ] & 2 5 5 , p d [ 1 4 ] = t h i s . c u r r e n t [ 3 ] > > > 8 & 2 5 5 , p d [ 1 3 ] = t h i s . c u r r e n t [ 3 ] > > > 1 6 & 2 5 5 , p d [ 1 2 ] = t h i s . c u r r e n t [ 3 ] > > > 2 4 & 2 5 5 , p d [ 1 9 ] = t h i s . c u r r e n t [ 4 ] & 2 5 5 , p d [ 1 8 ] = t h i s . c u r r e n t [ 4 ] > > > 8 & 2 5 5 , p d [ 1 7 ] = t h i s . c u r r e n t [ 4 ] > > > 1 6 & 2 5 5 , p d [ 1 6 ] = t h i s . c u r r e n t [ 4 ] > > > 2 4 & 2 5 5 , p d . b u f f e r } , r d . p r o t o t y p e . r e s e t = f u n c t i o n ( ) { t h i s . c u r r e n t L e n = 0 , t h i s . i n L e n = 0 , t h i s . c u r r e n t = n e w U i n t 3 2 A r r a y ( n e w A r r a y B u f f e r ( 2 0 ) ) , t h i s . c u r r e n t [ 0 ] = 1 7 3 2 5 8 4 1 9 3 , t h i s . c u r r e n t [ 1 ] = 4 0 2 3 2 3 3 4 1 7 , t h i s . c u r r e n t [ 2 ] = 2 5 6 2 3 8 3 1 0 2 , t h i s . c u r r e n t [ 3 ] = 2 7 1 7 3 3 8 7 8 , t h i s . c u r r e n t [ 4 ] = 3 2 8 5 3 7 7 5 2 0 } , r d . p r o t o t y p e . b l o c k L e n = 6 4 , r d . p r o t o t y p e . d i g e s t L e n = 2 0 ; v a r n d = f u n c t i o n ( p d ) { v a r f d = n e w A r r a y B u f f e r ( p d . l e n g t h ) , T d = n e w U i n t 8 A r r a y ( f d ) , S d ; f o r ( S d = 0 ; S d < p d . l e n g t h ; S d + + ) T d [ S d ] = p d . c h a r C o d e A t ( S d ) ; r e t u r n T d } , a d = f u n c t i o n ( p d ) { v a r f d = n e w A r r a y B u f f e r ( 1 ) , T d = n e w U i n t 8 A r r a y ( f d ) ; r e t u r n T d [ 0 ] = p d , T d } , s d = f u n c t i o n ( p d ) { i f ( p d . c o n s t r u c t o r = = = U i n t 8 A r r a y ) r e t u r n p d ; i f ( p d . c o n s t r u c t o r = = = A r r a y B u f f e r ) r e t u r n n e w U i n t 8 A r r a y ( p d ) ; i f ( p d . c o n s t r u c t o r = = = S t r i n g ) r e t u r n n d ( p d ) ; i f ( p d . c o n s t r u c t o r = = = N u m b e r ) { i f ( p d > 2 5 5 ) t h r o w " F o r m o r e t h a n o n e b y t e , u s e a n a r r a y b u f f e r " ; i f ( p d < 0 ) t h r o w " I n p u t v a l u e m u s t b e p o s i t i v e " ; r e t u r n a d ( p d ) } e l s e t h r o w " U n s u p p o r t e d t y p e " } , u d = f u n c t i o n ( p d ) { v a r f d = f u n c t i o n ( A d ) { f o r ( v a r N d = A d . l e n g t h , L d = 0 ; N d > 0 ; ) { v a r R d = t h i s . b l o c k L e n - t h i s . i n L e n ; R d > N d & & ( R d = N d ) ; v a r O d = A d . s u b a r r a y ( L d , L d + R d ) ; t h i s . i n b u f . s e t ( O d , t h i s . i n L e n ) , L d + = R d , N d - = R d , t h i s . i n L e n + = R d , t h i s . i n L e n = = = t h i s . b l o c k L e n & & ( t h i s . p r o c e s s B l o c k ( t h i s . i n b u f ) , t h i s . i n L e n = 0 ) } } , T d = f u n c t i o n ( ) { v a r A d = t h i s . d o P a d d i n g ( ) ; t h i s . u p d a t e ( A d ) ; v a r N d = t h i s . g e t D i g e s t ( ) ; r e t u r n t h i s . r e s e t ( ) , N d } , S d = f u n c t i o n ( ) { i f ( ! p d ) t h r o w " U n s u p p o r t e d a l g o r i t h m : " + p d . t o S t r i n g ( ) ; p d . p r o t o t y p e .
` )}),Ad}function fd(Sd,Ad,Nd){Sd===void 0&&(Sd=""),Ad===void 0&&(Ad="");var Ld="";Sd&&(Ld+="/"+Sd),Ad&&(Ad.charAt(0)!=="/"&&(Ld+="/"),Ld+=Ad);var Rd=""+Ld,Od="?";if(Nd){var kd=function(Hd,Vd){return Hd[0]>Vd[0]?1:Hd[0]<Vd[0]?-1:0},Fd=function(Hd){Rd+=Od+Hd,Nd[Hd]&&(Rd+="="+Nd[Hd]),Od="&"};Object.keys(Nd).sort(kd).forEach(Fd)}return Rd}function Td(Sd){Sd===void 0&&(Sd={});var Ad=Sd,Nd=Ad.type,Ld=Nd===void 0?"header":Nd,Rd=Ad.verb,Od=Rd===void 0?"":Rd,kd=Ad.contentMd5,Fd=kd===void 0?"":kd,Ud=Ad.expires,Hd=Ud===void 0?ad()+3600:Ud,Vd=Ad.bucket,Zd=Ad.objectName,zd=Ad.accessKeySecret,Xd=Ad.headers,Qd=Xd===void 0?{}:Xd,hf=Ad.subResource,bf=Qd["x-oss-date"]||"",yf=Qd["Content-Type"]||"",_f=[Od,Fd,yf];Ld==="header"?_f.push(bf):_f.push(Hd);var gf=pd(Qd),xf=fd(Vd,Zd,hf);_f.push(""+gf+xf);var Mf=_f.join( `
` ),Yf=new rd.default.HMAC_SHA1;Yf.setKey(zd),Yf.update(Mf);var Qf=new Uint8Array(Yf.finalize()),qf=td.default.fromByteArray(Qf);return qf}return utils}(function(Ra){var qa=interopRequireDefaultExports;Ra.__esModule=!0,Ra.default=void 0;var td=qa(requireObjectAssign()),rd=qa(requireAjax()),nd=requireUtils(),ad=function(){function sd(cd){cd===void 0&&(cd={}),(0,nd.assertOptions)(cd),this.opts=(0,td.default)({region:"oss-cn-hangzhou",internal:!1,cname:!1,secure:!1,timeout:6e4},cd);var dd=this.opts,pd=dd.bucket,fd=dd.region,Td=dd.endpoint,Sd=dd.internal;if(this.host="",Td)this.host=Td;else{var Ad=pd;Sd&&(Ad+="-internal"),Ad+="."+fd+".aliyuncs.com",this.host=Ad}}var ud=sd.prototype;return ud.put=function(dd,pd,fd){var Td=this;return fd===void 0&&(fd={}),new Promise(function(Sd,Ad){(0,nd.blobToBuffer)(pd).then(function(Nd){var Ld=Td.opts,Rd=Ld.accessKeyId,Od=Ld.accessKeySecret,kd=Ld.stsToken,Fd=Ld.bucket,Ud="PUT",Hd=(0,nd.getContentMd5)(Nd),Vd=pd.type,Zd={"Content-Md5":Hd,"Content-Type":Vd,"x-oss-date":new Date().toGMTString()};kd&&(Zd["x-oss-security-token"]=kd);var zd=(0,nd.getSignature)({verb:Ud,contentMd5:Hd,headers:Zd,bucket:Fd,objectName:dd,accessKeyId:Rd,accessKeySecret:Od});Zd.Authorization="OSS "+Rd+":"+zd;var Xd=Td.opts.secure?"https":"http",Qd=Xd+"://"+Td.host+"/"+dd;return(0,rd.default)(Qd,{method:Ud,headers:Zd,data:pd,timeout:Td.opts.timeout,onprogress:fd.onprogress})}).then(Sd).catch(Ad)})},ud.putSymlink=function(dd,pd){var fd=this.opts,Td=fd.accessKeyId,Sd=fd.accessKeySecret,Ad=fd.stsToken,Nd=fd.bucket,Ld="PUT",Rd={"x-oss-date":new Date().toGMTString(),"x-oss-symlink-target":encodeURI(pd)};Ad&&(Rd["x-oss-security-token"]=Ad);var Od=(0,nd.getSignature)({verb:Ld,headers:Rd,bucket:Nd,objectName:dd,accessKeyId:Td,accessKeySecret:Sd,subResource:{symlink:""}});Rd.Authorization="OSS "+Td+":"+Od;var kd=this.opts.secure?"https":"http",Fd=kd+"://"+this.host+"/"+dd+"?symlink";return(0,rd.default)(Fd,{method:Ld,headers:Rd,timeout:this.opts.timeout})},ud.signatureUrl=function(dd,pd){pd===void 0&&(pd={});var fd=pd,Td=fd.expires,Sd=Td===void 0?1800:Td,Ad=fd.method,Nd=fd.process,Ld=fd.response,Rd=this.opts,Od=Rd.accessKeyId,kd=Rd.accessKeySecret,Fd=Rd.stsToken,Ud=Rd.bucket,Hd={},Vd={};if(Nd){var Zd="x-oss-process";Vd[Zd]=Nd}Ld&&Object.keys(Ld).forEach(function(yf){var _f="response-"+yf.toLowerCase();Vd[_f]=Ld[yf]}),Object.keys(pd).forEach(function(yf){var _f=yf.toLowerCase(),gf=pd[yf];_f.indexOf("x-oss-")===0?Hd[_f]=gf:_f.indexOf("content-md5")===0||_f.indexOf("content-type")===0?Hd[yf]=gf:_f!=="expires"&&_f!=="response"&&_f!=="process"&&_f!=="method"&&(Vd[_f]=gf)});var zd=pd["security-token"]||Fd;zd&&(Vd["security-token"]=zd);var Xd=(0,nd.unix)()+Sd,Qd=(0,nd.getSignature)({type:"url",verb:Ad||"GET",accessKeyId:Od,accessKeySecret:kd,bucket:Ud,objectName:dd,headers:Hd,subResource:Vd,expires:Xd}),hf=this.opts.secure?"https":"http",bf=hf+"://"+this.host+"/"+dd;return bf+="?OSSAccessKeyId="+Od,bf+="&Expires="+Xd,bf+="&Signature="+encodeURIComponent(Qd),Object.keys(Vd).forEach(function(yf){bf+="&"+yf+"="+encodeURIComponent(Vd[yf])}),bf},sd}();Ra.default=ad})(TinyOSS);var lib=TinyOSS.default;const OSS=getDefaultExportFromCjs(lib);var byteToHex=[];for(var i=0;i<256;++i)byteToHex.push((i+256).toString(16).slice(1));function unsafeStringify(Ra,qa=0){return(byteToHex[Ra[qa+0]]+byteToHex[Ra[qa+1]]+byteToHex[Ra[qa+2]]+byteToHex[Ra[qa+3]]+"-"+byteToHex[Ra[qa+4]]+byteToHex[Ra[qa+5]]+"-"+byteToHex[Ra[qa+6]]+byteToHex[Ra[qa+7]]+"-"+byteToHex[Ra[qa+8]]+byteToHex[Ra[qa+9]]+"-"+byteToHex[Ra[qa+10]]+byteToHex[Ra[qa+11]]+byteToHex[Ra[qa+12]]+byteToHex[Ra[qa+13]]+byteToHex[Ra[qa+14]]+byteToHex[Ra[qa+15]]).toLowerCase()}var getRandomValues,rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}var randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);cons
2024-09-18 09:46:23 +08:00
async ( CUSTOM _ARG ) => {
$ { localStorage . getItem ( "formCustomConfig" ) }
}
2024-11-27 11:30:55 +08:00
` ;return new Promise((resolve,reject)=>{const exportObj={content,file,util:{axios:service,CryptoJS,OSS,COS,Buffer:Buffer $ 1,uuidv4:v4,qiniu,tokenTools,getDir,getDateFilename},okCb:resolve,errCb:reject};eval(str)(exportObj).catch(Ra=>{console.error(Ra),reject(Ra)})})}function fileUpload(Ra,qa){const td=localStorage.getItem("imgHost");switch(td||localStorage.setItem("imgHost","default"),td){case"aliOSS":return aliOSSFileUpload(qa);case"minio":return minioFileUpload(Ra,qa.name);case"txCOS":return txCOSFileUpload(qa);case"qiniu":return qiniuUpload(qa);case"gitee":return giteeUpload(Ra,qa.name);case"github":return ghFileUpload(Ra,qa.name);case"formCustom":return formCustomUpload(Ra,qa);default:return ghFileUpload(Ra,qa.name)}}const fileApi={fileUpload},_hoisted_1={class:"container-main flex-1"},_hoisted_2={class:"preview border shadow-xl"},_hoisted_3=["innerHTML"],_hoisted_4={key:0,class:"loading-mask"},_sfc_main $ 1=defineComponent({__name:"CodemirrorEditor",setup(Ra){const qa=useStore(),td=useDisplayStore(),{isDark:rd,output:nd,editor:ad,editorContent:sd}=storeToRefs(qa),{isShowCssEditor:ud}=storeToRefs(td),{editorRefresh:cd,exportEditorContent2HTML:dd,exportEditorContent2MD:pd,formatContent:fd,importMarkdownContent:Td,resetStyleConfirm:Sd}=qa,{toggleShowInsertFormDialog:Ad,toggleShowUploadImgDialog:Nd}=td,Ld=ref $ 1(!1),Rd=ref $ 1(),Od=ref $ 1(null);function kd(){const Mf=qf=>{let Bf,Df;clearTimeout(Rd.value),qf==="preview"?(Bf=Od.value. $ el,Df=document.querySelector(".CodeMirror-scroll"),ad.value.off("scroll",Yf),Rd.value=setTimeout(()=>{ad.value.on("scroll",Yf)},300)):(Bf=document.querySelector(".CodeMirror-scroll"),Df=Od.value. $ el,Df.removeEventListener("scroll",Qf,!1),Rd.value=setTimeout(()=>{Df.addEventListener("scroll",Qf,!1)},300));const Zf=Bf.scrollTop/(Bf.scrollHeight-Bf.offsetHeight)*(Df.scrollHeight-Df.offsetHeight);Df.scrollTo(0,Zf)};function Yf(){Mf("editor")}function Qf(){Mf("preview")}Od.value. $ el.addEventListener("scroll",Qf,!1),ad.value.on("scroll",Yf)}onMounted(()=>{setTimeout(()=>{kd()},300)});function Fd(){cd()}const Ud=ref $ 1(!1),Hd=ref $ 1(!1);function Vd(){Hd.value=!0,Ud.value=!0}function Zd(){Ud.value=!1,setTimeout(()=>{Hd.value=!1},800)}function zd(Mf){const Yf=checkImage(Mf);if(!Yf.ok)return ElMessage.error(Yf.msg),!1;const Qf=localStorage.getItem("imgHost")||"default";localStorage.setItem("imgHost",Qf);const qf=localStorage.getItem( ` $ { Qf } Config ` );return Qf==="default"||qf?!0:(ElMessage.error( ` 请先配置 $ { Qf } 图床参数 ` ),!1)}function Xd(Mf){if(!Mf){ElMessage.error("上传图片未知异常");return}Nd(!1);const Yf=ad.value.getCursor(),Qf= ` ! [ ] ( $ { Mf } ) ` ;toRaw(qa.editor).replaceSelection( `
$ { Qf }
` ,Yf),ElMessage.success("图片上传成功")}function Qd(Mf,Yf){Ld.value=!0,toBase64 $ 1(Mf).then(Qf=>fileApi.fileUpload(Qf,Mf)).then(Qf=>{Yf?Yf(Qf):Xd(Qf)}).catch(Qf=>{ElMessage.error(Qf.message)}).finally(()=>{Ld.value=!1})}const hf=ref $ 1();watch(rd,()=>{var Yf,Qf;const Mf=rd.value?"darcula":"xq-light";(Qf=(Yf=toRaw(ad.value))==null?void 0:Yf.setOption)==null||Qf.call(Yf,"theme",Mf)});function bf(){const Mf=document.querySelector("#editor");Mf.value||(Mf.value=sd.value),ad.value=CodeMirror.fromTextArea(Mf,{mode:"text/x-markdown",theme:rd.value?"darcula":"xq-light",lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,autoCloseBrackets:!0,extraKeys:{[ ` $ { shiftKey } - $ { altKey } - F ` ]:function(Qf){formatDoc(Qf.getValue()).then(qf=>{Qf.setValue(qf)})},[ ` $ { ctrlKey } - B ` ]:function(Qf){const qf=Qf.getSelection();Qf.replaceSelection( ` * * $ { qf } * * ` )},[ ` $ { ctrlKey } - I ` ]:function(Qf){const qf=Qf.getSelection();Qf.replaceSelection( ` * $ { qf } * ` )},[ ` $ { ctrlKey } - D ` ]:function(Qf){const qf=Qf.getSelection();Qf.replaceSelection( ` ~ ~ $ { qf } ~ ~ ` )},[ ` $ { ctrlKey } - K ` ]:function(Qf){const qf=Qf.getSelection();Qf.replaceSelection( ` [ $ { qf } ] ( ) ` )},[ ` $ { ctrlKey } - E ` ]:function(Qf){const qf=Qf.getSelection();Qf.replaceSelection( ` \ ` ${ qf } \` ` ) } , [ ` ${ ctrlKey } -L ` ] : function ( Qf ) { const qf = Qf . getSelection ( ) ; Qf . replaceSelection ( ` \` ${ qf } \` ` ) } } } ) , ad . value . on ( "change" , Yf => { clearTimeout ( hf . value ) , hf . value = setTimeout ( ( ) => { Fd ( ) , sd . value = Yf . getValue ( ) } , 300 ) } ) , ad . value . on ( "paste" , ( Yf , Qf ) => { if ( ! ( ! ( Qf . clipboardData && Qf . clipboardData . items ) || Ld . value ) ) for ( let qf = 0 , Bf = Qf . clipboardData . items . length ; qf < Bf ; ++ qf ) { const Df = Qf . clipboardData . items [ qf ] ; if ( Df . kind === "file" ) { const $f = Df . getAsFile ( ) ; if ( ! zd ( $f ) ) continue ; Qd ( $f ) } } } ) } const yf = ref$1 ( null ) ; function _f ( Mf ) { ad . value . options . extraKeys [ Mf ] ( ad . value ) } const gf = ref$1 ( null ) ; function xf ( ) { const Mf = gf . value . $el , Yf = async ( { md : Bf , list : Df } ) => { const $f = [ ... Bf . str . matchAll ( /!\[(.*?)\]\((.*?)\)/g ) || [ ] ] . filter ( Tf => Tf ) , Zf = Bf . path . match ( /.+?\// ) [ 0 ] ; ( await Promise . all ( $f . map ( Tf => new Promise ( vf => { let [ , , Pf ] = Tf ; Pf = Pf . replace ( /^.\// , "" ) ; const { file : Gf } = Df . find ( ah => ah . path === ` ${ Zf } ${ Pf } ` ) || { } ; Qd ( Gf , ah => { vf ( { matchStr : Pf , url : ah } ) } ) } ) ) ) ) . forEach ( Tf => { Bf . str = Bf . str . replace ( ` ](./ ${ Tf . matchStr } ) ` , ` ]( ${ Tf . url } ) ` ) . replace ( ` ]( ${ Tf . matchStr } ) ` , ` ]( ${ Tf . url } ) ` ) } ) , ad . value . setValue ( Bf . str ) } ; Mf . ondragover = Bf => Bf . preventDefault ( ) , Mf . ondrop = async Bf => { Bf . preventDefault ( ) ; for ( const Df of Bf . dataTransfer . items ) Df . getAsFileSystemHandle ( ) . then ( async $f => { if ( $f . kind === "directory" ) { const Zf = await qf ( $f ) , Xf = await Qf ( { list : Zf } ) ; Yf ( { md : Xf , list : Zf } ) } else { const Zf = await $f . getFile ( ) ; console . log ( "file" , Zf ) } } ) } ; async function Qf ( { list : Bf } ) { return new Promise ( Df => { const { path : $f , file : Zf } = Bf . find ( Tf => Tf . path . match ( /\.md$/ ) ) , Xf = new FileReader ; Xf . readAsText ( Zf , "UTF-8" ) , Xf . onload = Tf => { Df ( { str : Tf . target . result , file : Zf , path : $f } ) } } ) } async function qf ( Bf ) { const Df = [ ] ; let $f = "" ; try { const Zf = [ Bf ] ; for ( const Xf of Zf ) { $f += ` ${ Xf . name } / ` ; for await ( const [ , Tf ] of Xf ) Tf . kind === "file" ? Df . push ( { path : $f + Tf . name , file : await Tf . getFile ( ) } ) : ( Df . push ( { path : ` ${ $f + Tf . name } / ` } ) , Zf . push ( Tf ) ) } } catch ( Zf ) { console . error ( Zf ) } return Df } } return onMounted ( ( ) => { bf ( ) , Fd ( ) , xf ( ) } ) , ( Mf , Yf ) => { const Qf = ElRow ; return openBlock ( ) , createElementBlock ( "div" , { ref _key : "container" , ref : yf , class : "container flex flex-col" } , [ createVNode ( EditorHeader , { onAddFormat : _f , onFormatContent : unref ( fd ) , onStartCopy : Vd , onEndCopy : Zd } , null , 8 , [ "onFormatContent" ] ) , createBaseVNode ( "main" , _hoisted _1 , [ createVNode ( Qf , { class : "container-main-section h-full border-1" } , { default : withCtx ( ( ) => [ createVNode ( unref ( ElCol ) , { ref _key : "codeMirrorWrapper" , ref : gf , span : unref ( ud ) ? 8 : 12 , class : normalizeClass ( [ "codeMirror-wrapper border-r-1" , { "order-1" : ! unref ( qa ) . isEditOnLeft } ] ) } , { default : withCtx ( ( ) => [ createVNode ( unref ( _sfc _main$7 ) , null , { default : withCtx ( ( ) => [ createVNode ( unref ( _sfc _main$2 ) , null , { default : withCtx ( ( ) => Yf [ 7 ] || ( Yf [ 7 ] = [ createBaseVNode ( "textarea" , { id : "editor" , type : "textarea" , placeholder : "Your markdown text here." } , null , - 1 ) ] ) ) , _ : 1 } ) , createVNode ( unref ( _sfc _main$6 ) , { class : "w-64" } , { default : withCtx ( ( ) => [ createVNode ( unref ( _sfc _main$5 ) , { inset : "" , onClick : Yf [ 0 ] || ( Yf [ 0 ] = qf => unref ( Nd ) ( ) ) } , { default : withCtx ( ( ) => Y
` ;Rd.replaceSelection(Vd+Vd,null),Td(Rd,-1),Fd=Rd.listSelections();for(var Zd=0;Zd<Fd.length;Zd++){var zd=Fd[Zd].head.line;Rd.indentLine(zd,null,!0),Rd.indentLine(zd+1,null,!0)}})}function Td(Rd,Od){for(var kd=[],Fd=Rd.listSelections(),Ud=0,Hd=0;Hd<Fd.length;Hd++){var Vd=Fd[Hd];Vd.head==Rd.getCursor()&&(Ud=Hd);var Zd=Vd.head.ch||Od>0?{line:Vd.head.line,ch:Vd.head.ch+Od}:{line:Vd.head.line-1};kd.push({anchor:Zd,head:Zd})}Rd.setSelections(kd,Ud)}function Sd(Rd){var Od=td.cmpPos(Rd.anchor,Rd.head)>0;return{anchor:new nd(Rd.anchor.line,Rd.anchor.ch+(Od?-1:1)),head:new nd(Rd.head.line,Rd.head.ch+(Od?1:-1))}}function Ad(Rd,Od){var kd=dd(Rd);if(!kd||Rd.getOption("disableInput"))return td.Pass;var Fd=ad(kd,"pairs"),Ud=Fd.indexOf(Od);if(Ud==-1)return td.Pass;for(var Hd=ad(kd,"closeBefore"),Vd=ad(kd,"triples"),Zd=Fd.charAt(Ud+1)==Od,zd=Rd.listSelections(),Xd=Ud%2==0,Qd,hf=0;hf<zd.length;hf++){var bf=zd[hf],yf=bf.head,_f,gf=Rd.getRange(yf,nd(yf.line,yf.ch+1));if(Xd&&!bf.empty())_f="surround";else if((Zd||!Xd)&&gf==Od)Zd&&Ld(Rd,yf)?_f="both":Vd.indexOf(Od)>=0&&Rd.getRange(yf,nd(yf.line,yf.ch+3))==Od+Od+Od?_f="skipThree":_f="skip";else if(Zd&&yf.ch>1&&Vd.indexOf(Od)>=0&&Rd.getRange(nd(yf.line,yf.ch-2),yf)==Od+Od){if(yf.ch>2&&/ \b string/.test(Rd.getTokenTypeAt(nd(yf.line,yf.ch-2))))return td.Pass;_f="addFour"}else if(Zd){var xf=yf.ch==0?" ":Rd.getRange(nd(yf.line,yf.ch-1),yf);if(!td.isWordChar(gf)&&xf!=Od&&!td.isWordChar(xf))_f="both";else return td.Pass}else if(Xd&&(gf.length===0||/ \s /.test(gf)||Hd.indexOf(gf)>-1))_f="both";else return td.Pass;if(!Qd)Qd=_f;else if(Qd!=_f)return td.Pass}var Mf=Ud%2?Fd.charAt(Ud-1):Od,Yf=Ud%2?Od:Fd.charAt(Ud+1);Rd.operation(function(){if(Qd=="skip")Td(Rd,1);else if(Qd=="skipThree")Td(Rd,3);else if(Qd=="surround"){for(var Qf=Rd.getSelections(),qf=0;qf<Qf.length;qf++)Qf[qf]=Mf+Qf[qf]+Yf;Rd.replaceSelections(Qf,"around"),Qf=Rd.listSelections().slice();for(var qf=0;qf<Qf.length;qf++)Qf[qf]=Sd(Qf[qf]);Rd.setSelections(Qf)}else Qd=="both"?(Rd.replaceSelection(Mf+Yf,null),Rd.triggerElectric(Mf+Yf),Td(Rd,-1)):Qd=="addFour"&&(Rd.replaceSelection(Mf+Mf+Mf+Mf,"before"),Td(Rd,1))})}function Nd(Rd,Od){var kd=Rd.getRange(nd(Od.line,Od.ch-1),nd(Od.line,Od.ch+1));return kd.length==2?kd:null}function Ld(Rd,Od){var kd=Rd.getTokenAt(nd(Od.line,Od.ch+1));return/ \b string/.test(kd.type)&&kd.start==Od.ch&&(Od.ch==0||!/ \b string/.test(Rd.getTokenTypeAt(Od)))}})})();(function(Ra,qa){(function(td){td(requireCodemirror())})(function(td){var rd=/MSIE \d /.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),nd=td.Pos,ad={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function sd(Td){return Td&&Td.bracketRegex||/[(){}[ \] ]/}function ud(Td,Sd,Ad){var Nd=Td.getLineHandle(Sd.line),Ld=Sd.ch-1,Rd=Ad&&Ad.afterCursor;Rd==null&&(Rd=/(^| )cm-fat-cursor( $ | )/.test(Td.getWrapperElement().className));var Od=sd(Ad),kd=!Rd&&Ld>=0&&Od.test(Nd.text.charAt(Ld))&&ad[Nd.text.charAt(Ld)]||Od.test(Nd.text.charAt(Ld+1))&&ad[Nd.text.charAt(++Ld)];if(!kd)return null;var Fd=kd.charAt(1)==">"?1:-1;if(Ad&&Ad.strict&&Fd>0!=(Ld==Sd.ch))return null;var Ud=Td.getTokenTypeAt(nd(Sd.line,Ld+1)),Hd=cd(Td,nd(Sd.line,Ld+(Fd>0?1:0)),Fd,Ud,Ad);return Hd==null?null:{from:nd(Sd.line,Ld),to:Hd&&Hd.pos,match:Hd&&Hd.ch==kd.charAt(0),forward:Fd>0}}function cd(Td,Sd,Ad,Nd,Ld){for(var Rd=Ld&&Ld.maxScanLineLength||1e4,Od=Ld&&Ld.maxScanLines||1e3,kd=[],Fd=sd(Ld),Ud=Ad>0?Math.min(Sd.line+Od,Td.lastLine()+1):Math.max(Td.firstLine()-1,Sd.line-Od),Hd=Sd.line;Hd!=Ud;Hd+=Ad){var Vd=Td.getLine(Hd);if(Vd){var Zd=Ad>0?0:Vd.length-1,zd=Ad>0?Vd.length:-1;if(!(Vd.length>Rd))for(Hd==Sd.line&&(Zd=Sd.ch-(Ad<0?1:0));Zd!=zd;Zd+=Ad){var Xd=Vd.charAt(Zd);if(Fd.test(Xd)&&(Nd===void 0||(Td.getTokenTypeAt(nd(Hd,Zd+1))||"")==(Nd||""))){var Qd=ad[Xd];if(Qd&&Qd.charAt(1)==">"==Ad>0)kd.push(Xd);else if(kd.length)kd.pop();else return{pos:nd(Hd,Zd),ch:Xd}}}}}return Hd-Ad==(Ad>0?Td.lastLine():Td.firstLine())?!1:null}function dd(Td,Sd,Ad){for(var Nd=Td.state.matchBrackets.maxHighlightLineLength||1e3,Ld=Ad&&Ad.highlightNonMatching,Rd=[],Od=Td.listSelections(