import{__require as r}from"./function-bind-context.mjs";import{__require as t}from"./function-call.mjs";import{__require as e}from"./an-object.mjs";import{__require as o}from"./try-to-string.mjs";import{__require as i}from"./is-array-iterator-method.mjs";import{__require as n}from"./length-of-array-like.mjs";import{__require as m}from"./object-is-prototype-of.mjs";import{__require as s}from"./get-iterator.mjs";import{__require as a}from"./get-iterator-method.mjs";import{__require as f}from"./iterator-close.mjs";var u,_;function p(){if(_)return u;_=1;var p=r(),c=t(),j=e(),l=o(),q=i(),h=n(),y=m(),E=s(),R=a(),w=f(),T=TypeError,b=function(r,t){this.stopped=r,this.result=t},d=b.prototype;return u=function(r,t,e){var o,i,n,m,s,a,f,u=e&&e.that,_=!(!e||!e.AS_ENTRIES),I=!(!e||!e.IS_RECORD),g=!(!e||!e.IS_ITERATOR),v=!(!e||!e.INTERRUPTED),x=p(t,u),S=function(r){return o&&w(o,"normal"),new b(!0,r)},A=function(r){return _?(j(r),v?x(r[0],r[1],S):x(r[0],r[1])):v?x(r,S):x(r)};if(I)o=r.iterator;else if(g)o=r;else{if(!(i=R(r)))throw new T(l(r)+" is not iterable");if(q(i)){for(n=0,m=h(r);m>n;n++)if((s=A(r[n]))&&y(d,s))return s;return new b(!1)}o=E(r,i)}for(a=I?r.next:o.next;!(f=c(a,o)).done;){try{s=A(f.value)}catch(r){w(o,"throw",r)}if("object"==typeof s&&s&&y(d,s))return s}return new b(!1)}}export{p as __require};