/*
 * This script contains the language-specific data used by searchtools.js,
 * namely the set of stopwords, stemmer, scorer and splitter.
 */

const stopwords = new Set(["alle", "at", "av", "bare", "begge", "ble", "blei", "bli", "blir", "blitt", "b\u00e5de", "b\u00e5e", "da", "de", "deg", "dei", "deim", "deira", "deires", "dem", "den", "denne", "der", "dere", "deres", "det", "dette", "di", "din", "disse", "ditt", "du", "dykk", "dykkar", "d\u00e5", "eg", "ein", "eit", "eitt", "eller", "elles", "en", "enn", "er", "et", "ett", "etter", "for", "fordi", "fra", "f\u00f8r", "ha", "hadde", "han", "hans", "har", "hennar", "henne", "hennes", "her", "hj\u00e5", "ho", "hoe", "honom", "hoss", "hossen", "hun", "hva", "hvem", "hver", "hvilke", "hvilken", "hvis", "hvor", "hvordan", "hvorfor", "i", "ikke", "ikkje", "ingen", "ingi", "inkje", "inn", "inni", "ja", "jeg", "kan", "kom", "korleis", "korso", "kun", "kunne", "kva", "kvar", "kvarhelst", "kven", "kvi", "kvifor", "man", "mange", "me", "med", "medan", "meg", "meget", "mellom", "men", "mi", "min", "mine", "mitt", "mot", "mykje", "ned", "no", "noe", "noen", "noka", "noko", "nokon", "nokor", "nokre", "n\u00e5", "n\u00e5r", "og", "ogs\u00e5", "om", "opp", "oss", "over", "p\u00e5", "samme", "seg", "selv", "si", "sia", "sidan", "siden", "sin", "sine", "sitt", "sj\u00f8l", "skal", "skulle", "slik", "so", "som", "somme", "somt", "s\u00e5", "s\u00e5nn", "til", "um", "upp", "ut", "uten", "var", "vart", "varte", "ved", "vere", "verte", "vi", "vil", "ville", "vore", "vors", "vort", "v\u00e5r", "v\u00e6re", "v\u00e6rt", "\u00e5"]);
window.stopwords = stopwords;  // Export to global scope


/* Non-minified versions are copied as separate JavaScript files, if available */
BaseStemmer=function(){this.current="",this.cursor=0,this.limit=0,this.limit_backward=0,this.bra=0,this.ket=0,this.setCurrent=function(t){this.current=t,this.cursor=0,this.limit=this.current.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},this.getCurrent=function(){return this.current},this.copy_from=function(t){this.current=t.current,this.cursor=t.cursor,this.limit=t.limit,this.limit_backward=t.limit_backward,this.bra=t.bra,this.ket=t.ket},this.in_grouping=function(t,r,i){return!(this.cursor>=this.limit||i<(i=this.current.charCodeAt(this.cursor))||i<r||0==(t[(i-=r)>>>3]&1<<(7&i))||(this.cursor++,0))},this.go_in_grouping=function(t,r,i){for(;this.cursor<this.limit;){var s=this.current.charCodeAt(this.cursor);if(i<s||s<r)return!0;if(0==(t[(s-=r)>>>3]&1<<(7&s)))return!0;this.cursor++}return!1},this.in_grouping_b=function(t,r,i){return!(this.cursor<=this.limit_backward||i<(i=this.current.charCodeAt(this.cursor-1))||i<r||0==(t[(i-=r)>>>3]&1<<(7&i))||(this.cursor--,0))},this.go_in_grouping_b=function(t,r,i){for(;this.cursor>this.limit_backward;){var s=this.current.charCodeAt(this.cursor-1);if(i<s||s<r)return!0;if(0==(t[(s-=r)>>>3]&1<<(7&s)))return!0;this.cursor--}return!1},this.out_grouping=function(t,r,i){return!(this.cursor>=this.limit)&&(i<(i=this.current.charCodeAt(this.cursor))||i<r||0==(t[(i-=r)>>>3]&1<<(7&i)))&&(this.cursor++,!0)},this.go_out_grouping=function(t,r,i){for(;this.cursor<this.limit;){var s=this.current.charCodeAt(this.cursor);if(s<=i&&r<=s&&0!=(t[(s-=r)>>>3]&1<<(7&s)))return!0;this.cursor++}return!1},this.out_grouping_b=function(t,r,i){return!(this.cursor<=this.limit_backward)&&(i<(i=this.current.charCodeAt(this.cursor-1))||i<r||0==(t[(i-=r)>>>3]&1<<(7&i)))&&(this.cursor--,!0)},this.go_out_grouping_b=function(t,r,i){for(;this.cursor>this.limit_backward;){var s=this.current.charCodeAt(this.cursor-1);if(s<=i&&r<=s&&0!=(t[(s-=r)>>>3]&1<<(7&s)))return!0;this.cursor--}return!1},this.eq_s=function(t){return!(this.limit-this.cursor<t.length||this.current.slice(this.cursor,this.cursor+t.length)!=t||(this.cursor+=t.length,0))},this.eq_s_b=function(t){return!(this.cursor-this.limit_backward<t.length||this.current.slice(this.cursor-t.length,this.cursor)!=t||(this.cursor-=t.length,0))},this.find_among=function(t){for(var r=0,i=t.length,s=this.cursor,h=this.limit,e=0,n=0,c=!1;;){for(var u=r+(i-r>>>1),o=0,a=e<n?e:n,l=t[u],f=a;f<l[0].length;f++){if(s+a==h){o=-1;break}if(0!=(o=this.current.charCodeAt(s+a)-l[0].charCodeAt(f)))break;a++}if(o<0?(i=u,n=a):(r=u,e=a),i-r<=1){if(0<r)break;if(i==r)break;if(c)break;c=!0}}do{if(e>=(l=t[r])[0].length){if(this.cursor=s+l[0].length,l.length<4)return l[2];var g=l[3](this);if(this.cursor=s+l[0].length,g)return l[2]}}while(0<=(r=l[1]));return 0},this.find_among_b=function(t){for(var r=0,i=t.length,s=this.cursor,h=this.limit_backward,e=0,n=0,c=!1;;){for(var u,o=r+(i-r>>1),a=0,l=e<n?e:n,f=(u=t[o])[0].length-1-l;0<=f;f--){if(s-l==h){a=-1;break}if(0!=(a=this.current.charCodeAt(s-1-l)-u[0].charCodeAt(f)))break;l++}if(a<0?(i=o,n=l):(r=o,e=l),i-r<=1){if(0<r)break;if(i==r)break;if(c)break;c=!0}}do{if(e>=(u=t[r])[0].length){if(this.cursor=s-u[0].length,u.length<4)return u[2];var g=u[3](this);if(this.cursor=s-u[0].length,g)return u[2]}}while(0<=(r=u[1]));return 0},this.replace_s=function(t,r,i){var s=i.length-(r-t);return this.current=this.current.slice(0,t)+i+this.current.slice(r),this.limit+=s,this.cursor>=r?this.cursor+=s:this.cursor>t&&(this.cursor=t),s},this.slice_check=function(){return!(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>this.current.length)},this.slice_from=function(t){var r=!1;return this.slice_check()&&(this.replace_s(this.bra,this.ket,t),r=!0),r},this.slice_del=function(){return this.slice_from("")},this.insert=function(t,r,i){r=this.replace_s(t,r,i);t<=this.bra&&(this.bra+=r),t<=this.ket&&(this.ket+=r)},this.slice_to=function(){var t="";return t=this.slice_check()?this.current.slice(this.bra,this.ket):t},this.assign_to=function(){return this.current.slice(0,this.limit)}};
var NorwegianStemmer=function(){var t=new BaseStemmer,a=[["",-1,1],["ind",0,-1],["kk",0,-1],["nk",0,-1],["amm",0,-1],["omm",0,-1],["kap",0,-1],["skap",6,1],["pp",0,-1],["lt",0,-1],["ast",0,-1],["øst",0,-1],["v",0,-1],["hav",12,1],["giv",12,1]],c=[["a",-1,1],["e",-1,1],["ede",1,1],["ande",1,1],["ende",1,1],["ane",1,1],["ene",1,1],["hetene",6,1],["erte",1,4],["en",-1,1],["heten",9,1],["ar",-1,1],["er",-1,1],["heter",12,1],["s",-1,3],["as",14,1],["es",14,1],["edes",16,1],["endes",16,1],["enes",16,1],["hetenes",19,1],["ens",14,1],["hetens",21,1],["ers",14,2],["ets",14,1],["et",-1,1],["het",25,1],["ert",-1,4],["ast",-1,1]],s=[["dt",-1,-1],["vt",-1,-1]],o=[["leg",-1,1],["eleg",0,1],["ig",-1,1],["eig",2,1],["lig",2,1],["elig",4,1],["els",-1,1],["lov",-1,1],["elov",7,1],["slov",7,1],["hetslov",9,1]],u=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,2,142],l=[119,125,148,1],m=0,n=0;this.stem=function(){var r=t.cursor,i=(n=t.limit,e=t.cursor,(i=t.cursor+3)>t.limit||(t.cursor=i,m=t.cursor,t.cursor=e,t.go_out_grouping(u,97,248)&&(t.cursor++,t.go_in_grouping(u,97,248))&&(t.cursor++,n=t.cursor,m<=n||(n=m))),t.cursor=r,t.limit_backward=t.cursor,t.cursor=t.limit,t.limit-t.cursor),e=((()=>{var r;if(!(t.cursor<n)){var i=t.limit_backward;if(t.limit_backward=n,t.ket=t.cursor,0==(r=t.find_among_b(c)))t.limit_backward=i;else switch(t.bra=t.cursor,t.limit_backward=i,r){case 1:if(t.slice_del())break;return;case 2:switch(t.find_among_b(a)){case 1:if(t.slice_del())break;return}break;case 3:r:{var e=t.limit-t.cursor;if(!t.in_grouping_b(l,98,122)){if(t.cursor=t.limit-e,t.eq_s_b("r")){var s=t.limit-t.cursor;if(!t.eq_s_b("e")){t.cursor=t.limit-s;break r}}if(t.cursor=t.limit-e,!t.eq_s_b("k"))return;if(!t.out_grouping_b(u,97,248))return}}if(t.slice_del())break;return;case 4:if(t.slice_from("er"))break}}})(),t.cursor=t.limit-i,t.limit-t.cursor),i=(r=t.limit-t.cursor,t.cursor<n||(i=t.limit_backward,t.limit_backward=n,t.ket=t.cursor,0==t.find_among_b(s)?t.limit_backward=i:(t.bra=t.cursor,t.limit_backward=i,t.cursor=t.limit-r,t.cursor<=t.limit_backward||(t.cursor--,t.bra=t.cursor,t.slice_del()))),t.cursor=t.limit-e,t.limit-t.cursor);return t.cursor<n||(r=t.limit_backward,t.limit_backward=n,t.ket=t.cursor,0==t.find_among_b(o)?t.limit_backward=r:(t.bra=t.cursor,t.limit_backward=r,t.slice_del())),t.cursor=t.limit-i,t.cursor=t.limit_backward,!0},this.stemWord=function(r){return t.setCurrent(r),this.stem(),t.getCurrent()}};
window.Stemmer = NorwegianStemmer;
