PageSourceSearch

https://korve.edu.ee/javascripts/global-application.min.js?v=boulder-2.2.3

js korve.edu.ee collected 2026-10-02 14:16:07 UTC 16,189 bytes, 1 lines download raw bytes

1var MMCQ,PriorityQueue;PriorityQueue=function(){function e(e){this.comparator=e,this.contents=[],this.sorted=!1}return e.prototype.sort=function(){return this.contents.sort(this.comparator),this.sotred=!0},e.prototype.push=function(e){return this.contents.push(e),this.sorted=!1},e.prototype.peek=function(e){return null==e&&(e=this.contents.length-1),this.sorted||this.sort(),this.contents[e]},e.prototype.pop=function(){return this.sorted||this.sort(),this.contents.pop()},e.prototype.size=function(){return this.contents.length},e.prototype.map=function(e){return this.contents.map(e)},e}(),MMCQ=function(){function e(){this.maxIterations=1e3,this.fractByPopulations=.75}var t,o,n,r,s,i;return e.sigbits=5,e.rshift=8-e.sigbits,r=function(t,o,n){return(t<<2*e.sigbits)+(o<<e.sigbits)+n},t=function(){function t(e,t,o,n,r,s,i){this.r1=e,this.r2=t,this.g1=o,this.g2=n,this.b1=r,this.b2=s,this.histo=i}return t.prototype.volume=function(e){return this._volume&&!e||(this._volume=(this.r2-this.r1+1)*(this.g2-this.g1+1)*(this.b2-this.b1+1)),this._volume},t.prototype.count=function(e){var t,o,n,s,i,a,c,h,l,u,d;if(!this._count_set||e){for(s=0,i=a=this.r1,l=this.r2;a<=l;i=a+=1)for(o=c=this.g1,u=this.g2;c<=u;o=c+=1)for(t=h=this.b1,d=this.b2;h<=d;t=h+=1)n=r(i,o,t),s+=this.histo[n]||0;this._count_set=!0,this._count=s}return this._count},t.prototype.copy=function(){return new t(this.r1,this.r2,this.g1,this.g2,this.b1,this.b2,this.histo)},t.prototype.average=function(t){var o,n,s,i,a,c,h,l,u,d,g,p,f,m,b,v;if(!this._average||t){for(h=1<<8-e.sigbits,d=0,u=0,i=0,n=0,l=g=this.r1,m=this.r2;g<=m;l=g+=1)for(s=p=this.g1,b=this.g2;p<=b;s=p+=1)for(o=f=this.b1,v=this.b2;f<=v;o=f+=1)c=r(l,s,o),d+=a=this.histo[c]||0,u+=a*(l+.5)*h,i+=a*(s+.5)*h,n+=a*(o+.5)*h;this._average=d?[~~(u/d),~~(i/d),~~(n/d)]:[~~(h*(this.r1+this.r2+1)/2),~~(h*(this.g1+this.g2+1)/2),~~(h*(this.b1+this.b2+1)/2)]}return this._average},t.prototype.contains=function(t){var o,n,r;return r=t[0]>>e.rshift,n=t[1]>>e.rshift,o=t[2]>>e.rshift,this.r1<=r&&r<=this.r2&&this.g1<=n&&n<=this.g2&&this.b1<=o&&o<=this.b2},t}(),o=function(){function e(){this.cboxes=new PriorityQueue(function(e,t){var o,n;return o=e.count()*e.volume(),n=t.count()*t.volume(),o>n?1:o<n?-1:0})}return e.prototype.push=function(e){return this.cboxes.push({cbox:e,color:e.average()})},e.prototype.palette=function(){return this.cboxes.map(function(e){return e.color})},e.prototype.size=function(){return this.cboxes.size()},e.prototype.map=function(e){var t,o,n;for(t=o=0,n=this.cboxes.size();o<n;t=o+=1)return this.cboxes.peek(t).cbox.contains(e)?this.cboxes.peek(t).color:this.nearest(e)},e.prototype.cboxes=function(){return this.cboxes},e.prototype.nearest=function(e){var t,o,n,r,s,i,a;for(s=function(e){return e*e},n=1e9,o=i=0,a=this.cboxes.size();i<a;o=i+=1)(t=Math.sqrt(s(e[0]-this.cboxes.peek(o).color[0])+s(e[1]-this.cboxes.peek(o).color[1])+s(e[2]-this.cboxes.peek(o).color[2])))<n&&(n=t,r=this.cboxes.peek(o).color);return r},e}(),s=function(t){var o,n,s,i,a,c,h,l,u;for(i=1<<3*e.sigbits,s=new Array(i),l=0,u=t.length;l<u;l++)h=(c=t[l])[0]>>e.rshift,n=c[1]>>e.rshift,o=c[2]>>e.rshift,s[a=r(h,n,o)]=(s[a]||0)+1;return s},n=function(o,n){var r,s,i,a,c,h,l,u,d,g,p,f;for(g=1e6,d=0,h=1e6,c=0,i=1e6,s=0,p=0,f=o.length;p<f;p++)u=(l=o[p])[0]>>e.rshift,a=l[1]>>e.rshift,r=l[2]>>e.rshift,u<g?g=u:u>d&&(d=u),a<h?h=a:a>c&&(c=a),r<i?i=r:r>s&&(s=r);return new t(g,d,h,c,i,s,n)},i=function(e,t){var o,n,s,i,a,c,h,l,u,d,g,p,f,m,b,v,C,y,w,j,x,_,k,A,B,z,I,M,D,P;if(t.count()){if(1===t.count())return[t.copy()];if(d=t.r2-t.r1+1,a=t.g2-t.g1+1,n=t.b2-t.b1+1,h=Math.max(d,a,n),p=0,l=[],c=[],h===d)for(u=f=t.r1,_=t.r2;f<=_;u=f+=1){for(g=0,i=m=t.g1,I=t.g2;m<=I;i=m+=1)for(o=b=t.b1,M=t.b2;b<=M;o=b+=1)g+=e[r(u,i,o)]||0;p+=g,l[u]=p}else if(h===a)for(i=v=t.g1,D=t.g2;v<=D;i=v+=1){for(g=0,u=C=t.r1,P=t.r2;C<=P;u=C+=1)for(o=y=t.b1,k=t.b2;y<=k;o=y+=1)g+=e[r(u,i,o)]||0;p+=g,l[i]=p}else for(o=w=t.b1,A=t.b2;w<=A;o=w+=1){for(g=0,u=j=t.r1,B=t.r2;j<=B;u=j+=1)for(i=x=t.g1,z=t.g2;x<=z;i=x+=1)g+=e[r(u,i,o)]||0;p+=g,l[o]=p}return l.forEach(function(e,t){return c[t]=p-e}),s=function(e){var o,n,r,s,i,a,h,u,d,g,f;for(a=e+"2",h=g=t[i=e+"1"],f=t[a];g<=f;h=g+=1)if(l[h]>p/2){for(o=t.copy(),n=t.copy(),s=(u=h-t[i])<=(d=t[a]-h)?Math.min(t[a]-1,~~(h+d/2)):Math.max(t[i],~~(h-1-u/2));!l[s];)s++;for(r=c[s];!r&&l[s-1];)r=c[--s];return o[a]=s,n[i]=o[a]+1,[o,n]}},h===d?s("r"):h===a?s("g"):h===n?s("b"):void 0}},e.prototype.quantize=function(e,t){var r,a,c,h,l,u,d=this;if(!e.length||t<2||t>256)return console.log("invalid arguments"),!1;for(c=s(e),r=n(e,c),(l=new PriorityQueue(function(e,t){var o,n;return o=e.count(),n=t.count(),o>n?1:o<n?-1:0})).push(r),(h=function(e,t){var o,n,s,a,h;for(a=1,h=0;h<d.maxIterations;)if((r=e.pop()).count()){if(s=i(c,r),o=s[0],n=s[1],!o)return void console.log("cbox1 not defined; shouldn't happen");if(e.push(o),n&&(e.push(n),a++),a>=t)return;if(h++>d.maxIterations)return void console.log("infinite loop; perhaps too few pixels")}else e.push(r),h++})(l,this.fractByPopulations*t),u=new PriorityQueue(function(e,t){var o,n;return o=e.count()*e.volume(),n=t.count()*t.volume(),o>n?1:o<n?-1:0});l.size();)u.push(l.pop());for(h(u,t-u.size()),a=new o;u.size();)a.push(u.pop());return a},e}.call(this),function(){window.ColorExtract=function(){function e(){}return e.getColorMap=function(e,t,o,n,r,s){var i,a,c,h,l,u,d,g,p,f;for(null==s&&(s=8),c=e.getContext("2d").getImageData(t,o,n,r).data,h=[],u=d=o,p=o+r;d<p;u=d+=1)for(a=u*n*4,l=g=t,f=t+n;g<f;l=g+=1)i=a+4*l,h.push([c[i],c[i+1],c[i+2]]);return(new MMCQ).quantize(h,s)},e.colorDist=function(e,t){var o;return(o=function(e){return e*e})(e[0]-t[0])+o(e[1]-t[1])+o(e[2]-t[2])},e.extract=function(t,o,n){var r,s,i,a,c,h,l,u,d,g,p,f,m;for(o.width=25,o.height=25,o.getContext("2d").drawImage(t,0,0,o.width,o.height),(s=e.getColorMap(o,0,0,o.width,o.height,4).
1cboxes.map(function(e){return{count:e.cbox.count(),rgb:e.color}})).sort(function(e,t){return t.count-e.count}),r=s[0].rgb,(l=e.getColorMap(o,0,0,t.width,t.height,10).cboxes.map(function(e){return{count:e.cbox.count(),rgb:e.color}})).sort(function(e,t){return t.count-e.count}),u=0,g=0,f=l.length;g<f;g++)i=l[g],(a=e.colorDist(r,i.rgb))>u&&(u=a,c=i.rgb);for(u=0,p=0,m=l.length;p<m;p++)i=l[p],(a=e.colorDist(r,i.rgb))>u&&i.rgb!==c&&(u=a,h=i.rgb);return d=function(e){return"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},n({bgColor:d(r),fgColor:d(c),fgColor2:d(h)})},e}()}.call(this),function(e){var t=e("html").hasClass("editmode"),o=function(e,t,o){var n;return function(){var r=this,s=arguments,i=o&&!n;clearTimeout(n),n=setTimeout(function(){n=null,o||e.apply(r,s)},t),i&&e.apply(r,s)}},n=function(){e(".js-container").on("mousedown",function(t){e(t.target).closest(".js-prevent-sideclick").length||(e(".js-popover").removeClass("expanded"),e("body").removeClass("search-open"),e(".js-search-open-btn").removeClass("open"),e(".js-search-close-btn").removeClass("open"),e(".js-search").removeClass("active"))})},r=function(){e(".js-menu-btn").click(function(){e(this).toggleClass("open"),e(".js-menu-main").toggleClass("expanded"),e(".js-search-close-btn").hasClass("open")&&e(".js-search-close-btn").trigger("click")}),e(".js-menu-lang-btn").click(function(){e(".js-menu-lang-popover").toggleClass("expanded")}),e(".js-search-open-btn").click(function(){e(".js-menu-main").hasClass("expanded")&&(e(".js-menu-main").removeClass("expanded"),e(".js-menu-btn").removeClass("open")),e(this).addClass("open"),e("body").addClass("search-open"),e(".js-search-close-btn").addClass("open"),e(".js-search").addClass("active"),e(".js-search-inner").css({"margin-top":"-25px"}),e(".js-search-input").val("").focus()}),e(".js-search-close-btn").click(function(){e(this).removeClass("open"),e("body").removeClass("search-open"),e(".js-search-open-btn").removeClass("open"),e(".js-search").removeClass("active")}),e(".js-search").click(function(){})},s=function(){var t=e(window).width(),o=e(".js-search"),n=e(".js-menu-btn");t<=640?o.next().is(n)&&o.before(n):o.prev().is(n)&&o.after(n)},i=function(){e(".js-search-submit").on("click",function(){e(".js-search-input").parent().blur()})},a=function(e,t){for(var o,n=0,r=e.length;n<r;n++){if(e[n].width<t)return o||e[n];o=e[n]}return e[e.length-1]},c=function(e,t){for(var o=e.length;o--;)if(t.indexOf(e[o].url.trim())>-1)return!0;return!1},h=function(){headerBgCombinedLightness>=.5?e(".js-background-type").addClass("light-background").removeClass("dark-background"):e(".js-background-type").addClass("dark-background").removeClass("light-background")},l=function(e){return null==e||"string"==typeof e&&e.match(/^[\\'"]+$/)?"":e},u=function(t,o){if(t&&o){"string"==typeof t&&(t=t.replace(/rgba?\(/,"").replace(/\)/,"").split(","),e.each(t,function(e,o){t[e]=+o})),"string"==typeof o&&(o=o.replace(/rgba?\(/,"").replace(/\)/,"").split(","),e.each(o,function(e,t){o[e]=+t})),"object"==typeof t&&t.hasOwnProperty("length")&&3==t.length&&t.push(1),"object"==typeof o&&o.hasOwnProperty("length")&&3==o.length&&o.push(1);var n=[0,0,0,0];return n[3]=1-(1-o[3])*(1-t[3]),0===n[3]&&(n[3]=1e-6),n[0]=Math.min(o[0]*o[3]/n[3]+t[0]*t[3]*(1-o[3])/n[3],255),n[1]=Math.min(o[1]*o[3]/n[3]+t[1]*t[3]*(1-o[3])/n[3],255),n[2]=Math.min(o[2]*o[3]/n[3]+t[2]*t[3]*(1-o[3])/n[3],255),e.map(n,function(e){return Math.floor(e)})}},d=function(e,t){return u(e||[255,255,255,1],t||[255,255,255,1])},g=function(e,t){var o=d(e,t);return Math.round((.2126*+o[0]+.7152*+o[1]+.0722*+o[2])/2.55)/100},p=function(){e(document).ready(function(){e(".comment-form").hasClass("form_with_errors")?e("html, body").scrollTop(e(".comment-form").offset().top):e("form").find(".form_error, .form_notice").length>0&&e("html, body").scrollTop(e(".form_error, .form_notice").closest("form").offset().top)})},f=function(){t||e.each(e('.content-formatted:not(".js-custom-content-formatted") table'),function(){e(this).wrap('<div class="table-container overthrow"></div>')})},m=function(){e(window).resize(o(s,1e3))},b=function(e,t,o){var n=e.find(".js-content-item-img-drop-area"),r=e.find(".js-toggle-crop-state");t>o?n.removeClass("image-landscape image-square image-portrait").addClass("image-landscape"):t===o?n.removeClass("image-landscape image-square image-portrait").addClass("image-square"):n.removeClass("image-landscape image-square image-portrait").addClass("image-portrait"),n.hasClass("image-square")?r.removeClass("is-visible").addClass("is-hidden"):r.removeClass("is-hidden").addClass("is-visible")},v=function(t,o,n,r,s){var i="article"===s?"articles":"pages",a=new Edicy.CustomData({type:s,id:n});e.ajax({type:"PATCH",contentType:"application/json",url:"/admin/api/"+i+"/"+n,data:JSON.stringify({image_id:r}),dataType:"json",success:function(e){a.set("image_crop_state","not-cropped"),t.removeClass("not-loaded with-error").addClass("is-loaded"),t.find(".edy-img-drop-area-placeholder").css("opacity",1),o.css("opacity",1)},timeout:3e4,error:function(e){t.removeClass("not-loaded is-loaded with-error").addClass("with-error")}})},C=function(){e(document).ready(function(){setTimeout(function(){e(".js-content-item-box").addClass("not-loaded")},3e3)}),e(".js-lazyload").lazyload({threshold:500,effect:"fadeIn",placeholder:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",load:function(){var t=e(this).closest(".
1js-content-item-box");t.removeClass("not-loaded with-error").addClass("is-loaded"),setTimeout(function(){t.removeClass("not-loaded with-error"),t.find(".js-loader").remove()},3e3)}})},t=function(){return e("html").hasClass("editmode")};window.site=e.extend(window.site||{},{initBlogPage:function(){},initArticlePage:function(){},initCommonPage:function(){},initFrontPage:function(){},initItemsPage:function(){t()||C()},toggleFlags:function(){e(".js-option-toggle-flags").on("click",function(){if(e(this).hasClass("js-flag-disable-btn"))t=!1;else var t=!0;siteData.set("flags_state",t),e(this).toggleClass("js-flag-disable-btn"),e(".js-menu-lang").toggleClass("flags-enabled flags-disabled")})},headerBgPreview:function(t,o){var n=e(".js-bgpicker-header-image").css("background-image"),r=t.imageSizes?a(t.imageSizes,e(window).width()):null,s=t.image&&""!==t.image?"url("+r.url+")":"none",i=t.imageSizes&&""!==t.imageSizes?t.imageSizes:null,l=t.color&&""!==t.color?t.color:"rgba(0,0,0,0)",u=(t.colorData&&""!==t.colorData&&t.colorData.lightness,e("<img>")),d=e("<canvas>"),p=t.image&&""!==t.image?t.image:null;p?c(i,n)?(headerBg.headerBgImageColor=headerBg.headerBgImageColor?headerBg.headerBgImageColor:"rgba(103,103,110,1)",headerBgCombinedLightness=g(headerBg.headerBgImageColor,l),h()):(u.attr("src",p.replace(/.*\/(photos|voogstock)/g,"/photos")),u.on("load",function(){ColorExtract.extract(u[0],d[0],function(e){headerBg.headerBgImageColor=e.bgColor?e.bgColor:"rgba(255,255,255,1)",headerBgCombinedLightness=g(headerBg.headerBgImageColor,l),h()})})):(headerBg.headerBgImageColor="rgba(255,255,255,1)",headerBgCombinedLightness=g("rgba(255,255,255,1)",l),h()),e(o).find(".js-bgpicker-header-image").css({"background-image":s}),e(o).find(".js-bgpicker-header-color").css({"background-color":l})},headerBgCommit:function(t,o){var n=e.extend(!0,{},t);n.image=t.image||"",n.imageSizes=l(t.imageSizes),n.color=t.color||"rgba(255,255,255,0)",n.combinedLightness=headerBgCombinedLightness,pageData.set(o,n)},bindCustomTexteditorStyles:function(e){window.edy=window.edy||[],edy.push(["texteditorStyles",{name:e,tagname:"a",attribute:{href:"#"},classname:"custom-btn",toggle:!0}])},bindRootItemSettings:function(t){"show_product_related_pages_in_main_menu"in t||(t.show_product_related_pages_in_main_menu=!1),e(".js-root-item-settings-toggle").each(function(o,n){new Edicy.SettingsEditor(n,{menuItems:[{titleI18n:"show_in_main_menu",type:"checkbox",key:"show_product_related_pages_in_main_menu",states:{on:!0,off:!1}}],buttonTitleI18n:"settings",values:t,containerClass:["js-root-item-settings-popover","js-prevent-sideclick"],preview:function(t){1==!t.show_product_related_pages_in_main_menu?e(".js-menu-item-products").addClass("is-hidden"):e(".js-menu-item-products").removeClass("is-hidden")},commit:function(e){siteData.set("settings_root_item",e)}})})},bindContentItemImgDropAreas:function(t){e(".js-content-item-img-drop-area").each(function(o,n){var r=e(n),s=r.closest(".js-content-item-box"),i=s.data("item-id"),a=s.data("item-type");new Edicy.CustomData({type:a,id:i}),new Edicy.ImgDropArea(r,{positionable:!1,target_width:1280,placeholder:'<div class="edy-img-drop-area-placeholder">'+t+"</div>",removeBtn:'<div class="edy-img-drop-area-remove-image"><div class="edy-img-drop-area-remove-image-ico"><svg width="16" height="20" viewBox="0 0 26 30" xmlns="http://www.w3.org/2000/svg"><g fill-rule="nonzero" fill="currentColor"><g transform="translate(2 5)"><path d="M0 .997h2V21c0 1 1 2 2 2h14c1 0 2-1 2-2V1h2v20c0 2.25-1.75 4-4 4H4c-2.25 0-4-1.75-4-4V.997z"/><rect x="10" y="4" width="2" height="16" rx="1"/><rect x="5" y="4" width="2" height="16" rx="1"/><rect x="15" y="4" width="2" height="16" rx="1"/></g><path d="M26 4v2H0V4h7V2c0-1 1-2 2-2h8c1 0 2 1 2 2v2h7zM9 4h8V3c0-.5-.5-1-1-1h-6c-.5 0-1 .5-1 1v1z"/></g></svg></div></div>',change:function(e){var t;r.removeClass("is-cropped").addClass("not-cropped").css("opacity",.1),e?(t=e.original_id,s.removeClass("without-image is-loaded with-error").addClass("with-image not-loaded"),b(s,e.width,e.height)):(t=null,s.removeClass("with-image is-loaded with-error").addClass("without-image not-loaded"),s.find(".edy-img-drop-area-placeholder").css("opacity",0)
1),v(s,r,i,t,a)}})})},bindContentItemImageCropToggle:function(){e(".js-toggle-crop-state").on("click",function(){var t,o=e(this).closest(".js-content-item-box"),n=o.find(".js-content-item-img-drop-area"),r=o.data("item-id"),s=o.data("item-type"),i=new Edicy.CustomData({type:s,id:r});n.hasClass("is-cropped")?(n.removeClass("is-cropped").addClass("not-cropped"),t="not-cropped"):(n.removeClass("not-cropped").addClass("is-cropped"),t="is-cropped"),i.set("image_crop_state",t)})},bindSiteSearch:function(t,o,n){t&&new VoogSearch(t,{per_page:10,lang:o,resultsContainer:e(".js-voog-search-modal-inner").get(0),sideclick:!0,mobileModeWidth:640,updateOnKeypress:!0,noResults:n})}}),n(),r(),s(),i(),m(),f(),p()}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.