openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
2 lines • 6.78 kB
JavaScript
import{n as e}from"./rolldown-runtime-DkW27tQK.js";import{n as t,t as n}from"./javascript-DX2C-kp4.js";function r(e){if(typeof e!=`object`)return e;let t={};for(let n in e){let r=e[n];t[n]=r instanceof Array?r.slice():r}return t}function i(e,n){if(e.sol()&&(n.javaScriptLine=!1,n.javaScriptLineExcludesColon=!1),n.javaScriptLine){if(n.javaScriptLineExcludesColon&&e.peek()===`:`){n.javaScriptLine=!1,n.javaScriptLineExcludesColon=!1;return}var r=t.token(e,n.jsState);return e.eol()&&(n.javaScriptLine=!1),r||!0}}function a(e,n){if(n.javaScriptArguments){if(n.javaScriptArgumentsDepth===0&&e.peek()!==`(`){n.javaScriptArguments=!1;return}if(e.peek()===`(`?n.javaScriptArgumentsDepth++:e.peek()===`)`&&n.javaScriptArgumentsDepth--,n.javaScriptArgumentsDepth===0){n.javaScriptArguments=!1;return}return t.token(e,n.jsState)||!0}}function o(e){if(e.match(/^yield\b/))return`keyword`}function s(e){if(e.match(/^(?:doctype) *([^\n]+)?/))return`meta`}function c(e,t){if(e.match(`#{`))return t.isInterpolating=!0,t.interpolationNesting=0,`punctuation`}function l(e,n){if(n.isInterpolating){if(e.peek()===`}`){if(n.interpolationNesting--,n.interpolationNesting<0)return e.next(),n.isInterpolating=!1,`punctuation`}else e.peek()===`{`&&n.interpolationNesting++;return t.token(e,n.jsState)||!0}}function u(e,t){if(e.match(/^case\b/))return t.javaScriptLine=!0,`keyword`}function d(e,t){if(e.match(/^when\b/))return t.javaScriptLine=!0,t.javaScriptLineExcludesColon=!0,`keyword`}function f(e){if(e.match(/^default\b/))return`keyword`}function p(e,t){if(e.match(/^extends?\b/))return t.restOfLine=`string`,`keyword`}function m(e,t){if(e.match(/^append\b/))return t.restOfLine=`variable`,`keyword`}function h(e,t){if(e.match(/^prepend\b/))return t.restOfLine=`variable`,`keyword`}function g(e,t){if(e.match(/^block\b *(?:(prepend|append)\b)?/))return t.restOfLine=`variable`,`keyword`}function _(e,t){if(e.match(/^include\b/))return t.restOfLine=`string`,`keyword`}function v(e,t){if(e.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&e.match(`include`))return t.isIncludeFiltered=!0,`keyword`}function y(e,t){if(t.isIncludeFiltered){var n=O(e,t);return t.isIncludeFiltered=!1,t.restOfLine=`string`,n}}function b(e,t){if(e.match(/^mixin\b/))return t.javaScriptLine=!0,`keyword`}function x(e,t){if(e.match(/^\+([-\w]+)/))return e.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),`variable`;if(e.match(`+#{`,!1))return e.next(),t.mixinCallAfter=!0,c(e,t)}function S(e,t){if(t.mixinCallAfter)return t.mixinCallAfter=!1,e.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),!0}function C(e,t){if(e.match(/^(if|unless|else if|else)\b/))return t.javaScriptLine=!0,`keyword`}function w(e,t){if(e.match(/^(- *)?(each|for)\b/))return t.isEach=!0,`keyword`}function T(e,t){if(t.isEach){if(e.match(/^ in\b/))return t.javaScriptLine=!0,t.isEach=!1,`keyword`;if(e.sol()||e.eol())t.isEach=!1;else if(e.next()){for(;!e.match(/^ in\b/,!1)&&e.next(););return`variable`}}}function E(e,t){if(e.match(/^while\b/))return t.javaScriptLine=!0,`keyword`}function D(e,t){var n;if(n=e.match(/^(\w(?:[-:\w]*\w)?)\/?/))return t.lastTag=n[1].toLowerCase(),`tag`}function O(e,t){if(e.match(/^:([\w\-]+)/))return V(e,t),`atom`}function k(e,t){if(e.match(/^(!?=|-)/))return t.javaScriptLine=!0,`punctuation`}function A(e){if(e.match(/^#([\w-]+)/))return`builtin`}function j(e){if(e.match(/^\.([\w-]+)/))return`className`}function M(e,t){if(e.peek()==`(`)return e.next(),t.isAttrs=!0,t.attrsNest=[],t.inAttributeName=!0,t.attrValue=``,t.attributeIsType=!1,`punctuation`}function N(e,n){if(n.isAttrs){if(K[e.peek()]&&n.attrsNest.push(K[e.peek()]),n.attrsNest[n.attrsNest.length-1]===e.peek())n.attrsNest.pop();else if(e.eat(`)`))return n.isAttrs=!1,`punctuation`;if(n.inAttributeName&&e.match(/^[^=,\)!]+/))return(e.peek()===`=`||e.peek()===`!`)&&(n.inAttributeName=!1,n.jsState=t.startState(2),n.attributeIsType=n.lastTag===`script`&&e.current().trim().toLowerCase()===`type`),`attribute`;var r=t.token(e,n.jsState);if(n.attrsNest.length===0&&(r===`string`||r===`variable`||r===`keyword`))try{return Function(``,`var x `+n.attrValue.replace(/,\s*$/,``).replace(/^!/,``)),n.inAttributeName=!0,n.attrValue=``,e.backUp(e.current().length),N(e,n)}catch{}return n.attrValue+=e.current(),r||!0}}function P(e,t){if(e.match(/^&attributes\b/))return t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0,`keyword`}function F(e){if(e.sol()&&e.eatSpace())return`indent`}function I(e,t){if(e.match(/^ *\/\/(-)?([^\n]*)/))return t.indentOf=e.indentation(),t.indentToken=`comment`,`comment`}function L(e){if(e.match(/^: */))return`colon`}function R(e,t){if(e.match(/^(?:\| ?| )([^\n]+)/))return`string`;if(e.match(/^(<[^\n]*)/,!1))return V(e,t),e.skipToEnd(),t.indentToken}function z(e,t){if(e.eat(`.`))return V(e,t),`dot`}function B(e){return e.next(),null}function V(e,t){t.indentOf=e.indentation(),t.indentToken=`string`}function H(e,t){if(e.sol()&&(t.restOfLine=``),t.restOfLine){e.skipToEnd();var n=t.restOfLine;return t.restOfLine=``,n}}function U(e){return new q(e)}function W(e){return e.copy()}function G(e,t){var n=H(e,t)||l(e,t)||y(e,t)||T(e,t)||N(e,t)||i(e,t)||a(e,t)||S(e,t)||o(e)||s(e)||c(e,t)||u(e,t)||d(e,t)||f(e)||p(e,t)||m(e,t)||h(e,t)||g(e,t)||_(e,t)||v(e,t)||b(e,t)||x(e,t)||C(e,t)||w(e,t)||E(e,t)||D(e,t)||O(e,t)||k(e,t)||A(e)||j(e)||M(e,t)||P(e,t)||F(e)||R(e,t)||I(e,t)||L(e)||z(e,t)||B(e);return n===!0?null:n}var K,q,J;function Y(){return(Y=e((()=>{n(),K={"{":`}`,"(":`)`,"[":`]`},q=class e{constructor(e){this.indentUnit=e,this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=t.startState(e),this.restOfLine=``,this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag=``,this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue=``,this.indentOf=1/0,this.indentToken=``}copy(){var n=new e(this.indentUnit);return n.javaScriptLine=this.javaScriptLine,n.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,n.javaScriptArguments=this.javaScriptArguments,n.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,n.isInterpolating=this.isInterpolating,n.interpolationNesting=this.interpolationNesting,n.jsState=(t.copyState||r)(this.jsState),n.restOfLine=this.restOfLine,n.isIncludeFiltered=this.isIncludeFiltered,n.isEach=this.isEach,n.lastTag=this.lastTag,n.isAttrs=this.isAttrs,n.attrsNest=this.attrsNest.slice(),n.inAttributeName=this.inAttributeName,n.attributeIsType=this.attributeIsType,n.attrValue=this.attrValue,n.indentOf=this.indentOf,n.indentToken=this.indentToken,n}},J={startState:U,copyState:W,token:G}})))()}Y();export{J as pug};
//# sourceMappingURL=pug-RXDoR6tl.js.map