import{__exports as r}from"../../../_virtual/es.regexp.escape.mjs";import{__require as e}from"../internals/export.mjs";import{__require as t}from"../internals/function-uncurry-this.mjs";import{__require as s}from"../internals/a-string.mjs";import{__require as i}from"../internals/has-own-property.mjs";import{__require as a}from"../internals/string-pad.mjs";import{__require as n}from"../internals/whitespaces.mjs";var o;function m(){if(o)return r;o=1;var m=e(),p=t(),f=s(),u=i(),_=a().start,c=n(),l=Array,g=RegExp.escape,x=p("".charAt),v=p("".charCodeAt),j=p(1.1.toString),h=p([].join),q=/^[0-9a-z]/i,d=/^[$()*+./?[\\\]^{|}]/,y=RegExp("^[!\"#%&',\\-:;<=>@`~"+c+"]"),A=p(q.exec),E={"\t":"t","\n":"n","\v":"v","\f":"f","\r":"r"},R=function(r){var e=j(v(r,0),16);return e.length<3?"\\x"+_(e,2,"0"):"\\u"+_(e,4,"0")};return m({target:"RegExp",stat:!0,forced:!g||"\\x61b"!==g("ab")},{escape:function(r){f(r);for(var e=r.length,t=l(e),s=0;s<e;s++){var i=x(r,s);if(0===s&&A(q,i))t[s]=R(i);else if(u(E,i))t[s]="\\"+E[i];else if(A(d,i))t[s]="\\"+i;else if(A(y,i))t[s]=R(i);else{var a=v(i,0);55296!=(63488&a)?t[s]=i:a>=56320||s+1>=e||56320!=(64512&v(r,s+1))?t[s]=R(i):(t[s]=i,t[++s]=x(r,s))}}return h(t,"")}}),r}export{m as __require};