"use strict";var stringUtil=require("./stringUtil-0d797e21.js"),baseSlice=stringUtil._baseSlice;function castSlice$1(r,s,a){var n=r.length;return a=void 0===a?n:a,!s&&n<=a?r:baseSlice(r,s,a)}var _castSlice=castSlice$1,baseIndexOf$1=stringUtil._baseIndexOf;function charsEndIndex$1(r,s){for(var a=r.length;a--&&-1<baseIndexOf$1(s,r[a],0););return a}var _charsEndIndex=charsEndIndex$1,baseIndexOf=stringUtil._baseIndexOf;function charsStartIndex$1(r,s){for(var a=-1,n=r.length;++a<n&&-1<baseIndexOf(s,r[a],0););return a}var _charsStartIndex=charsStartIndex$1;function asciiToArray$1(r){return r.split("")}var _asciiToArray=asciiToArray$1,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange+"]",rsCombo="["+rsComboRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ="\\u200d",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");function unicodeToArray$1(r){return r.match(reUnicode)||[]}var _unicodeToArray=unicodeToArray$1,asciiToArray=_asciiToArray,hasUnicode=stringUtil._hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$1(r){return(hasUnicode(r)?unicodeToArray:asciiToArray)(r)}var _stringToArray=stringToArray$1,baseToString=stringUtil._baseToString,baseTrim=stringUtil._baseTrim,castSlice=_castSlice,charsEndIndex=_charsEndIndex,charsStartIndex=_charsStartIndex,stringToArray=_stringToArray,toString=stringUtil.toString_1;function trim(r,s,a){if((r=toString(r))&&(a||void 0===s))return baseTrim(r);if(!r||!(s=baseToString(s)))return r;a=stringToArray(r),r=stringToArray(s),s=charsStartIndex(a,r),r=charsEndIndex(a,r)+1;return castSlice(a,s,r).join("")}var trim_1=trim;exports.trim_1=trim_1;
