(function(){return function(t,n,a){var e,r,l=[],g=RegExp("\\][\n\\s]*"+n.source+"[\n\\s]*\\[","i"),s=t.getSpan().next(g);r=s.previous("td").start_<s.previous("th").start_?"th":"td",s=s.next(n).nextAnyTag(r).previousAnyTag(r);for(var u=s.innerCapture(/\[t[dh](\d+)\]/,1),i=s.parentAnyTag("tr").allInnerTags(r+u),p=0,h=0;h<i.length;h++)if(i[h].sameAs(s)){p=h;break}for(var o=s.parentAnyTag("table");o!==t.getNullSpan();){for(var T=o.allInnerTags("tr"+u),h=0;h<T.length;h++)(e=T[h].allInnerTags("td"+u)[p])&&e.tagContents()!==t.getNullSpan()&&(e=(""+e.tagContents()).trim(),(e=e.match(a))&&e.length>=1&&l.push(e[0]));o=o.nextAnyTag("table")}if(0===l.length)for(var d=0,f=3,v=s.nextAnyTag("tr");!v.isNullSpan_&&d<=f;)u=v.innerCapture(/\[t[dh](\d+)\]/,1),e=v.allInnerTagsFiltered("td"+u)[p],e&&!e.isNullSpan_&&(e=(""+e).trim().match(a))&&e.length>=1&&l.push(e[0]),0===l.length&&d++,v=v.nextAnyTag("tr");return l}}).call();