import{__require as r}from"./function-uncurry-this.mjs";import{__require as e}from"./to-object.mjs";var t,n;function u(){if(n)return t;n=1;var u=r(),a=e(),i=Math.floor,o=u("".charAt),c=u("".replace),s=u("".slice),f=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,v=/\$([$&'`]|\d{1,2})/g;return t=function(r,e,t,n,u,d){var h=t+r.length,l=n.length,m=v;return void 0!==u&&(u=a(u),m=f),c(d,m,function(a,c){var f;switch(o(c,0)){case"$":return"$";case"&":return r;case"`":return s(e,0,t);case"'":return s(e,h);case"<":f=u[s(c,1,-1)];break;default:var v=+c;if(0===v)return a;if(v>l){var d=i(v/10);return 0===d?a:d<=l?void 0===n[d-1]?o(c,1):n[d-1]+o(c,1):a}f=n[v-1]}return void 0===f?"":f})}}export{u as __require};