sparnatural
Version:
Visual client-side SPARQL query builder and knowledge graph exploration tool
2 lines • 1.79 MB
JavaScript
/*! For license information please see sparnatural-form.js.LICENSE.txt */
(()=>{var e={8778:function(e,t,r){!function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e=e&&e.hasOwnProperty("default")?e.default:e;var i={autoShow:!1,autoHide:!1,autoPick:!1,inline:!1,container:null,trigger:null,language:"",format:"mm/dd/yyyy",date:null,startDate:null,endDate:null,startView:0,weekStart:0,yearFirst:!1,yearSuffix:"",days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],itemTag:"li",mutedClass:"muted",pickedClass:"picked",disabledClass:"disabled",highlightedClass:"highlighted",template:'<div class="datepicker-container"><div class="datepicker-panel" data-view="years picker"><ul><li data-view="years prev">‹</li><li data-view="years current"></li><li data-view="years next">›</li></ul><ul data-view="years"></ul></div><div class="datepicker-panel" data-view="months picker"><ul><li data-view="year prev">‹</li><li data-view="year current"></li><li data-view="year next">›</li></ul><ul data-view="months"></ul></div><div class="datepicker-panel" data-view="days picker"><ul><li data-view="month prev">‹</li><li data-view="month current"></li><li data-view="month next">›</li></ul><ul data-view="week"></ul><ul data-view="days"></ul></div></div>',offset:10,zIndex:1e3,filter:null,show:null,hide:null,pick:null},n="undefined"!=typeof window,s=n?window:{},o=!!n&&"ontouchstart"in s.document.documentElement,a="datepicker",l="click.".concat(a),c="focus.".concat(a),u="hide.".concat(a),h="keyup.".concat(a),d="pick.".concat(a),p="resize.".concat(a),f="scroll.".concat(a),g="show.".concat(a),_="touchstart.".concat(a),m="".concat(a,"-hide"),y={},v=0,b=1,w=2,E=Object.prototype.toString;function x(e){return"string"==typeof e}var T=Number.isNaN||s.isNaN;function S(e){return"number"==typeof e&&!T(e)}function L(e){return void 0===e}function C(e){return"date"===(t=e,E.call(t).slice(8,-1).toLowerCase())&&!T(e.getTime());var t}function k(e,t){for(var r=arguments.length,i=new Array(r>2?r-2:0),n=2;n<r;n++)i[n-2]=arguments[n];return function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return e.apply(t,i.concat(n))}}function P(e){return'[data-view="'.concat(e,'"]')}function R(e){return e%4==0&&e%100!=0||e%400==0}function A(e,t){return[31,R(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]}function O(e,t,r){return Math.min(r,A(e,t))}var I=/(y|m|d)+/g;function N(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e(t),n=i.css("position"),s="absolute"===n,o=r?/auto|scroll|hidden/:/auto|scroll/,a=i.parents().filter((function(t,r){var i=e(r);return(!s||"static"!==i.css("position"))&&o.test(i.css("overflow")+i.css("overflow-y")+i.css("overflow-x"))})).eq(0);return"fixed"!==n&&a.length?a:e(t.ownerDocument||document)}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=String(Math.abs(e)),i=r.length,n="";for(e<0&&(n+="-");i<t;)i+=1,n+="0";return n+r}var D=/\d+/g,j={show:function(){this.built||this.build(),this.shown||this.trigger(g).isDefaultPrevented()||(this.shown=!0,this.$picker.removeClass(m).on(l,e.proxy(this.click,this)),this.showView(this.options.startView),this.inline||(this.$scrollParent.on(f,e.proxy(this.place,this)),e(window).on(p,this.onResize=k(this.place,this)),e(document).on(l,this.onGlobalClick=k(this.globalClick,this)),e(document).on(h,this.onGlobalKeyup=k(this.globalKeyup,this)),o&&e(document).on(_,this.onTouchStart=k(this.touchstart,this)),this.place()))},hide:function(){this.shown&&(this.trigger(u).isDefaultPrevented()||(this.shown=!1,this.$picker.addClass(m).off(l,this.click),this.inline||(this.$scrollParent.off(f,this.place),e(window).off(p,this.onResize),e(document).off(l,this.onGlobalClick),e(document).off(h,this.onGlobalKeyup),o&&e(document).off(_,this.onTouchStart))))},toggle:function(){this.shown?this.hide():this.show()},update:function(){var e=this.getValue();e!==this.oldValue&&(this.setDate(e,!0),this.oldValue=e)},pick:function(e){var t=this.$element,r=this.date;this.trigger(d,{view:e||"",date:r}).isDefaultPrevented()||(r=this.formatDate(this.date),this.setValue(r),this.isInput&&(t.trigger("input"),t.trigger("change")))},reset:function(){this.setDate(this.initialDate,!0),this.setValue(this.initialValue),this.shown&&this.showView(this.options.startView)},getMonthName:function(t,r){var i=this.options,n=i.monthsShort,s=i.months;return e.isNumeric(t)?t=Number(t):L(r)&&(r=t),!0===r&&(s=n),s[S(t)?t:this.date.getMonth()]},getDayName:function(t,r,i){var n=this.options,s=n.days;return e.isNumeric(t)?t=Number(t):(L(i)&&(i=r),L(r)&&(r=t)),i?s=n.daysMin:r&&(s=n.daysShort),s[S(t)?t:this.date.getDay()]},getDate:function(e){var t=this.date;return e?this.formatDate(t):new Date(t)},setDate:function(t,r){var i=this.options.filter;if(C(t)||x(t)){if(t=this.parseDate(t),e.isFunction(i)&&!1===i.call(this.$element,t,"day"))return;this.date=t,this.viewDate=new Date(t),r||this.pick(),this.built&&this.render()}},setStartDate:function(e){C(e)||x(e)?this.startDate=this.parseDate(e):this.startDate=null,this.built&&this.render()},setEndDate:function(e){C(e)||x(e)?this.endDate=this.parseDate(e):this.endDate=null,this.built&&this.render()},parseDate:function(t){var r=this.format,i=[];return C(t)||(x(t)&&(i=t.match(D)||[]),C(t=t?new Date(t):new Date)||(t=new Date),i.length===r.parts.length&&(e.each(i,(function(e,i){var n=parseInt(i,10);switch(r.parts[e]){case"yy":t.setFullYear(2e3+n);break;case"yyyy":t.setFullYear(2===i.length?2e3+n:n);break;case"mm":case"m":t.setMonth(n-1)}})),e.each(i,(function(e,i){var n=parseInt(i,10);switch(r.parts[e]){case"dd":case"d":t.setDate(n)}})))),new Date(t.getFullYear(),t.getMonth(),t.getDate())},formatDate:function(t){var r=this.format,i="";if(C(t)){var n=t.getFullYear(),s=t.getMonth(),o=t.getDate(),a={d:o,dd:M(o,2),m:s+1,mm:M(s+1,2),yy:String(n).substring(2),yyyy:M(n,4)};i=r.source,e.each(r.parts,(function(e,t){i=i.replace(t,a[t])}))}return i},destroy:function(){this.unbind(),this.unbuild(),this.$element.removeData(a)}},B={click:function(t){var r=e(t.target),i=this.options,n=this.date,s=this.viewDate,o=this.format;if(t.stopPropagation(),t.preventDefault(),!r.hasClass("disabled")){var a=r.data("view"),l=s.getFullYear(),c=s.getMonth(),u=s.getDate();switch(a){case"years prev":case"years next":l="years prev"===a?l-10:l+10,s.setFullYear(l),s.setDate(O(l,c,u)),this.renderYears();break;case"year prev":case"year next":l="year prev"===a?l-1:l+1,s.setFullYear(l),s.setDate(O(l,c,u)),this.renderMonths();break;case"year current":o.hasYear&&this.showView(w);break;case"year picked":o.hasMonth?this.showView(b):(r.siblings(".".concat(i.pickedClass)).removeClass(i.pickedClass).data("view","year"),this.hideView()),this.pick("year");break;case"year":l=parseInt(r.text(),10),n.setDate(O(l,c,u)),n.setFullYear(l),s.setDate(O(l,c,u)),s.setFullYear(l),o.hasMonth?this.showView(b):(r.addClass(i.pickedClass).data("view","year picked").siblings(".".concat(i.pickedClass)).removeClass(i.pickedClass).data("view","year"),this.hideView()),this.pick("year");break;case"month prev":case"month next":(c="month prev"===a?c-1:c+1)<0?(l-=1,c+=12):c>11&&(l+=1,c-=12),s.setFullYear(l),s.setDate(O(l,c,u)),s.setMonth(c),this.renderDays();break;case"month current":o.hasMonth&&this.showView(b);break;case"month picked":o.hasDay?this.showView(v):(r.siblings(".".concat(i.pickedClass)).removeClass(i.pickedClass).data("view","month"),this.hideView()),this.pick("month");break;case"month":c=e.inArray(r.text(),i.monthsShort),n.setFullYear(l),n.setDate(O(l,c,u)),n.setMonth(c),s.setFullYear(l),s.setDate(O(l,c,u)),s.setMonth(c),o.hasDay?this.showView(v):(r.addClass(i.pickedClass).data("view","month picked").siblings(".".concat(i.pickedClass)).removeClass(i.pickedClass).data("view","month"),this.hideView()),this.pick("month");break;case"day prev":case"day next":case"day":"day prev"===a?c-=1:"day next"===a&&(c+=1),u=parseInt(r.text(),10),n.setDate(1),n.setFullYear(l),n.setMonth(c),n.setDate(u),s.setDate(1),s.setFullYear(l),s.setMonth(c),s.setDate(u),this.renderDays(),"day"===a&&this.hideView(),this.pick("day");break;case"day picked":this.hideView(),this.pick("day")}}},globalClick:function(e){for(var t=e.target,r=this.element,i=this.$trigger[0],n=!0;t!==document;){if(t===i||t===r){n=!1;break}t=t.parentNode}n&&this.hide()},keyup:function(){this.update()},globalKeyup:function(e){var t=e.target,r=e.key,i=e.keyCode;this.isInput&&t!==this.element&&this.shown&&("Tab"===r||9===i)&&this.hide()},touchstart:function(t){var r=t.target;this.isInput&&r!==this.element&&!e.contains(this.$picker[0],r)&&(this.hide(),this.element.blur())}},F={render:function(){this.renderYears(),this.renderMonths(),this.renderDays()},renderWeek:function(){var t=this,r=[],i=this.options,n=i.weekStart,s=i.daysMin;n=parseInt(n,10)%7,s=s.slice(n).concat(s.slice(0,n)),e.each(s,(function(e,i){r.push(t.createItem({text:i}))})),this.$week.html(r.join(""))},renderYears:function(){var e,t=this.options,r=this.startDate,i=this.endDate,n=t.disabledClass,s=t.filter,o=t.yearSuffix,a=this.viewDate.getFullYear(),l=(new Date).getFullYear(),c=this.date.getFullYear(),u=[],h=!1,d=!1;for(e=-5;e<=6;e+=1){var p=new Date(a+e,1,1),f=!1;r&&(f=p.getFullYear()<r.getFullYear(),-5===e&&(h=f)),!f&&i&&(f=p.getFullYear()>i.getFullYear(),6===e&&(d=f)),!f&&s&&(f=!1===s.call(this.$element,p,"year"));var g=a+e===c,_=g?"year picked":"year";u.push(this.createItem({picked:g,disabled:f,text:a+e,view:f?"year disabled":_,highlighted:p.getFullYear()===l}))}this.$yearsPrev.toggleClass(n,h),this.$yearsNext.toggleClass(n,d),this.$yearsCurrent.toggleClass(n,!0).html("".concat(a+-5+o," - ").concat(a+6).concat(o)),this.$years.html(u.join(""))},renderMonths:function(){var t,r=this.options,i=this.startDate,n=this.endDate,s=this.viewDate,o=r.disabledClass||"",a=r.monthsShort,l=e.isFunction(r.filter)&&r.filter,c=s.getFullYear(),u=new Date,h=u.getFullYear(),d=u.getMonth(),p=this.date.getFullYear(),f=this.date.getMonth(),g=[],_=!1,m=!1;for(t=0;t<=11;t+=1){var y=new Date(c,t,1),v=!1;i&&(v=(_=y.getFullYear()===i.getFullYear())&&y.getMonth()<i.getMonth()),!v&&n&&(v=(m=y.getFullYear()===n.getFullYear())&&y.getMonth()>n.getMonth()),!v&&l&&(v=!1===l.call(this.$element,y,"month"));var b=c===p&&t===f,w=b?"month picked":"month";g.push(this.createItem({disabled:v,picked:b,highlighted:c===h&&y.getMonth()===d,index:t,text:a[t],view:v?"month disabled":w}))}this.$yearPrev.toggleClass(o,_),this.$yearNext.toggleClass(o,m),this.$yearCurrent.toggleClass(o,_&&m).html(c+r.yearSuffix||""),this.$months.html(g.join(""))},renderDays:function(){var e,t,r,i=this.$element,n=this.options,s=this.startDate,o=this.endDate,a=this.viewDate,l=this.date,c=n.disabledClass,u=n.filter,h=n.months,d=n.weekStart,p=n.yearSuffix,f=a.getFullYear(),g=a.getMonth(),_=new Date,m=_.getFullYear(),y=_.getMonth(),v=_.getDate(),b=l.getFullYear(),w=l.getMonth(),E=l.getDate(),x=[],T=f,S=g,L=!1;0===g?(T-=1,S=11):S-=1,e=A(T,S);var C=new Date(f,g,1);for((r=C.getDay()-parseInt(d,10)%7)<=0&&(r+=7),s&&(L=C.getTime()<=s.getTime()),t=e-(r-1);t<=e;t+=1){var k=new Date(T,S,t),P=!1;s&&(P=k.getTime()<s.getTime()),!P&&u&&(P=!1===u.call(i,k,"day")),x.push(this.createItem({disabled:P,highlighted:T===m&&S===y&&k.getDate()===v,muted:!0,picked:T===b&&S===w&&t===E,text:t,view:"day prev"}))}var R=[],O=f,I=g,N=!1;11===g?(O+=1,I=0):I+=1,e=A(f,g),r=42-(x.length+e);var M=new Date(f,g,e);for(o&&(N=M.getTime()>=o.getTime()),t=1;t<=r;t+=1){var D=new Date(O,I,t),j=O===b&&I===w&&t===E,B=!1;o&&(B=D.getTime()>o.getTime()),!B&&u&&(B=!1===u.call(i,D,"day")),R.push(this.createItem({disabled:B,picked:j,highlighted:O===m&&I===y&&D.getDate()===v,muted:!0,text:t,view:"day next"}))}var F=[];for(t=1;t<=e;t+=1){var q=new Date(f,g,t),U=!1;s&&(U=q.getTime()<s.getTime()),!U&&o&&(U=q.getTime()>o.getTime()),!U&&u&&(U=!1===u.call(i,q,"day"));var $=f===b&&g===w&&t===E,H=$?"day picked":"day";F.push(this.createItem({disabled:U,picked:$,highlighted:f===m&&g===y&&q.getDate()===v,text:t,view:U?"day disabled":H}))}this.$monthPrev.toggleClass(c,L),this.$monthNext.toggleClass(c,N),this.$monthCurrent.toggleClass(c,L&&N).html(n.yearFirst?"".concat(f+p," ").concat(h[g]):"".concat(h[g]," ").concat(f).concat(p)),this.$days.html(x.join("")+F.join("")+R.join(""))}},q="".concat(a,"-top-left"),U="".concat(a,"-top-right"),$="".concat(a,"-bottom-left"),H="".concat(a,"-bottom-right"),V=[q,U,$,H].join(" "),z=function(){function n(r){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,n),this.$element=e(r),this.element=r,this.options=e.extend({},i,y[s.language],e.isPlainObject(s)&&s),this.$scrollParent=N(r,!0),this.built=!1,this.shown=!1,this.isInput=!1,this.inline=!1,this.initialValue="",this.initialDate=null,this.startDate=null,this.endDate=null,this.init()}return s=n,o=[{key:"init",value:function(){var t=this.$element,r=this.options,i=r.startDate,n=r.endDate,s=r.date;this.$trigger=e(r.trigger),this.isInput=t.is("input")||t.is("textarea"),this.inline=r.inline&&(r.container||!this.isInput),this.format=function(t){var r=String(t).toLowerCase(),i=r.match(I);if(!i||0===i.length)throw new Error("Invalid date format.");return t={source:r,parts:i},e.each(i,(function(e,r){switch(r){case"dd":case"d":t.hasDay=!0;break;case"mm":case"m":t.hasMonth=!0;break;case"yyyy":case"yy":t.hasYear=!0}})),t}(r.format);var o=this.getValue();this.initialValue=o,this.oldValue=o,s=this.parseDate(s||o),i&&(i=this.parseDate(i),s.getTime()<i.getTime()&&(s=new Date(i)),this.startDate=i),n&&(n=this.parseDate(n),i&&n.getTime()<i.getTime()&&(n=new Date(i)),s.getTime()>n.getTime()&&(s=new Date(n)),this.endDate=n),this.date=s,this.viewDate=new Date(s),this.initialDate=new Date(this.date),this.bind(),(r.autoShow||this.inline)&&this.show(),r.autoPick&&this.pick()}},{key:"build",value:function(){if(!this.built){this.built=!0;var t=this.$element,r=this.options,i=e(r.template);this.$picker=i,this.$week=i.find(P("week")),this.$yearsPicker=i.find(P("years picker")),this.$yearsPrev=i.find(P("years prev")),this.$yearsNext=i.find(P("years next")),this.$yearsCurrent=i.find(P("years current")),this.$years=i.find(P("years")),this.$monthsPicker=i.find(P("months picker")),this.$yearPrev=i.find(P("year prev")),this.$yearNext=i.find(P("year next")),this.$yearCurrent=i.find(P("year current")),this.$months=i.find(P("months")),this.$daysPicker=i.find(P("days picker")),this.$monthPrev=i.find(P("month prev")),this.$monthNext=i.find(P("month next")),this.$monthCurrent=i.find(P("month current")),this.$days=i.find(P("days")),this.inline?e(r.container||t).append(i.addClass("".concat(a,"-inline"))):(e(document.body).append(i.addClass("".concat(a,"-dropdown"))),i.addClass(m).css({zIndex:parseInt(r.zIndex,10)})),this.renderWeek()}}},{key:"unbuild",value:function(){this.built&&(this.built=!1,this.$picker.remove())}},{key:"bind",value:function(){var t=this.options,r=this.$element;e.isFunction(t.show)&&r.on(g,t.show),e.isFunction(t.hide)&&r.on(u,t.hide),e.isFunction(t.pick)&&r.on(d,t.pick),this.isInput&&r.on(h,e.proxy(this.keyup,this)),this.inline||(t.trigger?this.$trigger.on(l,e.proxy(this.toggle,this)):this.isInput?r.on(c,e.proxy(this.show,this)):r.on(l,e.proxy(this.show,this)))}},{key:"unbind",value:function(){var t=this.$element,r=this.options;e.isFunction(r.show)&&t.off(g,r.show),e.isFunction(r.hide)&&t.off(u,r.hide),e.isFunction(r.pick)&&t.off(d,r.pick),this.isInput&&t.off(h,this.keyup),this.inline||(r.trigger?this.$trigger.off(l,this.toggle):this.isInput?t.off(c,this.show):t.off(l,this.show))}},{key:"showView",value:function(e){var t=this.$yearsPicker,r=this.$monthsPicker,i=this.$daysPicker,n=this.format;if(n.hasYear||n.hasMonth||n.hasDay)switch(Number(e)){case w:r.addClass(m),i.addClass(m),n.hasYear?(this.renderYears(),t.removeClass(m),this.place()):this.showView(v);break;case b:t.addClass(m),i.addClass(m),n.hasMonth?(this.renderMonths(),r.removeClass(m),this.place()):this.showView(w);break;default:t.addClass(m),r.addClass(m),n.hasDay?(this.renderDays(),i.removeClass(m),this.place()):this.showView(b)}}},{key:"hideView",value:function(){!this.inline&&this.options.autoHide&&this.hide()}},{key:"place",value:function(){if(!this.inline){var t=this.$element,r=this.options,i=this.$picker,n=e(document).outerWidth(),s=e(document).outerHeight(),o=t.outerWidth(),a=t.outerHeight(),l=i.width(),c=i.height(),u=t.offset(),h=u.left,d=u.top,p=parseFloat(r.offset),f=q;T(p)&&(p=10),d>c&&d+a+c>s?(d-=c+p,f=$):d+=a+p,h+l>n&&(h+=o-l,f=f.replace("left","right")),i.removeClass(V).addClass(f).css({top:d,left:h})}}},{key:"trigger",value:function(t,r){var i=e.Event(t,r);return this.$element.trigger(i),i}},{key:"createItem",value:function(t){var r=this.options,i=r.itemTag,n={text:"",view:"",muted:!1,picked:!1,disabled:!1,highlighted:!1},s=[];return e.extend(n,t),n.muted&&s.push(r.mutedClass),n.highlighted&&s.push(r.highlightedClass),n.picked&&s.push(r.pickedClass),n.disabled&&s.push(r.disabledClass),"<".concat(i,' class="').concat(s.join(" "),'" data-view="').concat(n.view,'">').concat(n.text,"</").concat(i,">")}},{key:"getValue",value:function(){var e=this.$element;return this.isInput?e.val():e.text()}},{key:"setValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.$element;this.isInput?t.val(e):this.inline&&!this.options.container||t.text(e)}}],p=[{key:"setDefaults",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.extend(i,y[t.language],e.isPlainObject(t)&&t)}}],o&&r(s.prototype,o),p&&r(s,p),n;var s,o,p}();if(e.extend&&e.extend(z.prototype,F,B,j),e.fn){var G=e.fn.datepicker;e.fn.datepicker=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];var s;return this.each((function(r,n){var o=e(n),l="destroy"===t,c=o.data(a);if(!c){if(l)return;var u=e.extend({},o.data(),e.isPlainObject(t)&&t);c=new z(n,u),o.data(a,c)}if(x(t)){var h=c[t];e.isFunction(h)&&(s=h.apply(c,i),l&&o.removeData(a))}})),L(s)?this:s},e.fn.datepicker.Constructor=z,e.fn.datepicker.languages=y,e.fn.datepicker.setDefaults=z.setDefaults,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=G,this}}}(r(9755))},6527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractMediaTyped=void 0;const i=r(1890);class n extends i.Actor{constructor(e){super(e)}async run(e){if("handle"in e){const t=e;return{handle:await this.runHandle(t.handle,t.handleMediaType,e.context)}}if("mediaTypes"in e)return{mediaTypes:await this.getMediaTypes(e.context)};if("mediaTypeFormats"in e)return{mediaTypeFormats:await this.getMediaTypeFormats(e.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}async test(e){if("handle"in e){const t=e;return{handle:await this.testHandle(t.handle,t.handleMediaType,e.context)}}if("mediaTypes"in e)return{mediaTypes:await this.testMediaType(e.context)};if("mediaTypeFormats"in e)return{mediaTypeFormats:await this.testMediaTypeFormats(e.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}}t.ActorAbstractMediaTyped=n},1775:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractMediaTypedFixed=void 0;const i=r(6527);class n extends i.ActorAbstractMediaTyped{constructor(e){super(e);const t=this.priorityScale||0===this.priorityScale?this.priorityScale:1;this.mediaTypePriorities&&Object.entries(this.mediaTypePriorities).forEach((([e,r],i)=>{this.mediaTypePriorities[e]=t*r})),this.mediaTypePriorities=Object.freeze(this.mediaTypePriorities),this.mediaTypeFormats=Object.freeze(this.mediaTypeFormats)}async testHandle(e,t,r){if(!(t in this.mediaTypePriorities))throw new Error(`Unrecognized media type: ${t}`);return await this.testHandleChecked(e,r)}async testMediaType(e){return!0}async getMediaTypes(e){return this.mediaTypePriorities}async testMediaTypeFormats(e){return!0}async getMediaTypeFormats(e){return this.mediaTypeFormats}}t.ActorAbstractMediaTypedFixed=n},9737:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(6527),t),n(r(1775),t)},5634:(e,t,r)=>{"use strict";var i=r(4155);Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpFetch=void 0;const n=r(2319),s=r(8199);r(1905);const o=r(9612);class a extends n.ActorHttp{constructor(e){super(e),this.userAgent=a.createUserAgent(),this.fetchInitPreprocessor=new o.FetchInitPreprocessor(e.agentOptions)}static createUserAgent(){return`Comunica/actor-http-fetch (${void 0===r.g.navigator?`Node.js ${i.version}; ${i.platform}`:`Browser-${r.g.navigator.userAgent}`})`}async test(e){return{time:Number.POSITIVE_INFINITY}}static async getResponse(e,t,r,i,n,s){let o,a=i+1;for(;a-- >0;)try{const i=await e(t,r);if(s&&i.status>=500&&i.status<600)throw new Error(`Server replied with response code ${i.status}: ${i.statusText}`);return i}catch(e){if(o=e,r.signal?.aborted)throw e;a>0&&await new Promise(((e,t)=>{setTimeout(e,n),r.signal?.addEventListener("abort",(()=>{t(new Error("Fetch aborted by timeout."))}))}))}throw i>0?new Error(`Number of fetch retries (${i}) exceeded. Last error: ${String(o)}`):o}async run(e){const t=e.init?.headers??{};e.init=e.init??{},e.init.headers=new Headers(t),e.init.headers.has("user-agent")||e.init.headers.append("user-agent",this.userAgent);const r=e.context.get(s.KeysHttp.auth);r&&e.init.headers.append("Authorization",`Basic ${Buffer.from(r).toString("base64")}`),this.logInfo(e.context,`Requesting ${"string"==typeof e.input?e.input:e.input.url}`,(()=>({headers:n.ActorHttp.headersToHash(new Headers(e.init.headers)),method:e.init.method||"GET"}))),e.init?.headers&&"append"in e.init.headers&&e.context.has(s.KeysHttp.fetch)&&(e.init.headers=n.ActorHttp.headersToHash(e.init.headers));let i={...e.init};e.context.get(s.KeysHttp.includeCredentials)&&(i.credentials="include");const o=e.context?.get(s.KeysHttp.httpTimeout);let l,c;if(void 0!==o){const e=await this.fetchInitPreprocessor.createAbortController();i.signal=e.signal,c=()=>e.abort(),l=setTimeout((()=>c()),o)}try{i=await this.fetchInitPreprocessor.handle(i);const t=e.context?.get(s.KeysHttp.httpRetryCount)??0,r=e.context?.get(s.KeysHttp.httpRetryDelay)??0,n=e.context?.get(s.KeysHttp.httpRetryOnServerError)??!1,o=e.context?.get(s.KeysHttp.fetch),u=await a.getResponse(o||fetch,e.input,i,t,r,n);return void 0!==l&&(e.context?.get(s.KeysHttp.httpBodyTimeout)&&u.body?(c=()=>u.body?.cancel(new Error(`HTTP timeout when reading the body of ${u.url}.\nThis error can be disabled by modifying the 'httpBodyTimeout' and/or 'httpTimeout' options.`)),u.body.on("close",(()=>{clearTimeout(l)}))):clearTimeout(l)),u.body&&!u.body.cancel&&(u.body.cancel=async e=>{u.body.destroy(e),void 0!==l&&clearTimeout(l)}),u}catch(e){throw void 0!==l&&clearTimeout(l),e}}}t.ActorHttpFetch=a},9612:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchInitPreprocessor=void 0;const i=r(2319);t.FetchInitPreprocessor=class{async handle(e){if(e.headers){const t=new Headers(e.headers);t.has("user-agent")&&t.delete("user-agent"),e.headers=t}if(e?.headers&&"append"in e.headers&&(e.headers=i.ActorHttp.headersToHash(e.headers)),e.body&&"string"!=typeof e.body&&"getReader"in e.body){const t=e.body.getReader(),r=[];for(;;){const{done:e,value:i}=await t.read();if(e)break;r.push(i)}e.body=r.join("")}return{keepalive:!e.body,...e}}async createAbortController(){return new AbortController}}},6845:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5634),t)},7862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpProxy=void 0;const i=r(2319),n=r(8199);class s extends i.ActorHttp{constructor(e){super(e)}async test(e){const t=e.context.get(n.KeysHttpProxy.httpProxyHandler);if(!t)throw new Error(`Actor ${this.name} could not find a proxy handler in the context.`);if(!await t.getProxy(e))throw new Error(`Actor ${this.name} could not determine a proxy for the given request.`);return{time:Number.POSITIVE_INFINITY}}async run(e){const t="string"==typeof e.input?e.input:e.input.url,r=e.context.get(n.KeysHttpProxy.httpProxyHandler),i=await this.mediatorHttp.mediate({...await r.getProxy(e),context:e.context.delete(n.KeysHttpProxy.httpProxyHandler)});return Object.defineProperty(i,"url",{configurable:!0,enumerable:!0,get:()=>i.headers.get("x-final-url")??t}),i}}t.ActorHttpProxy=s},1270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyHandlerStatic=void 0,t.ProxyHandlerStatic=class{constructor(e){this.prefixUrl=e}async getProxy(e){return{init:e.init,input:this.modifyInput(e.input)}}modifyInput(e){return"string"==typeof e?this.prefixUrl+e:new Request(this.prefixUrl+e.url,e)}}},4020:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7862),t),n(r(1270),t)},4292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlMicrodata=void 0;const i=r(3942),n=r(8793);class s extends i.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=(e.headers?e.headers.get("content-type"):null)?.includes("xml"),r=new n.MicrodataRdfParser({baseIRI:e.baseIRI,xmlMode:t});r.on("error",e.error),r.on("data",e.emit);const i=r.onEnd;return r.onEnd=()=>{i.call(r),e.end()},{htmlParseListener:r}}}t.ActorRdfParseHtmlMicrodata=s},4252:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4292),t)},8561:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlRdfa=void 0;const i=r(3942),n=r(494);class s extends i.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.headers?e.headers.get("content-type"):null,r=(e.headers&&e.headers.get("content-language"))??void 0,i=t&&t.includes("xml")?"xhtml":"html",s=new n.RdfaParser({baseIRI:e.baseIRI,profile:i,language:r});s.on("error",e.error),s.on("data",e.emit);const o=s.onEnd;return s.onEnd=()=>{o.call(s),e.end()},{htmlParseListener:s}}}t.ActorRdfParseHtmlRdfa=s},9118:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8561),t)},6104:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlScript=void 0;const i=r(3942),n=r(5084);class s extends i.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=(await this.mediatorRdfParseMediatypes.mediate({context:e.context,mediaTypes:!0})).mediaTypes;return{htmlParseListener:new n.HtmlScriptListener(this.mediatorRdfParseHandle,e.emit,e.error,e.end,t,e.context,e.baseIRI,e.headers)}}}t.ActorRdfParseHtmlScript=s},5084:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlScriptListener=void 0;const i=r(8199),n=r(9827),s=r(8912);class o{constructor(e,t,r,n,s,o,a,l){this.textChunksJsonLd=[],this.endBarrier=1,this.passedScripts=0,this.isFinalJsonLdProcessing=!1,this.mediatorRdfParseHandle=e,this.cbQuad=t,this.cbError=r,this.cbEnd=n,this.supportedTypes=s,this.context=o.set(i.KeysRdfParseHtmlScript.processingHtmlScript,!0),this.baseIRI=a,this.headers=l,this.onlyFirstScript=!1===o.get(i.KeysRdfParseHtmlScript.extractAllScripts);const c=this.baseIRI.indexOf("#");this.targetScriptId=c>0?this.baseIRI.slice(c+1,this.baseIRI.length):null}static newErrorCoded(e,t){const r=new Error(e);return r.code=t,r}onEnd(){0==--this.endBarrier&&(this.textChunksJsonLd.length>0?(this.handleMediaType="application/ld+json",this.textChunks=this.textChunksJsonLd,this.textChunks.push("]"),this.textChunksJsonLd=[],this.isFinalJsonLdProcessing=!0,this.endBarrier++,this.onTagClose()):(0===this.passedScripts&&this.targetScriptId&&this.cbError(o.newErrorCoded(`Failed to find targeted script id "${this.targetScriptId}"`,"loading document failed")),this.cbEnd()),this.isFinalJsonLdProcessing=!1)}onTagClose(){if(this.handleMediaType)if(this.requiresCustomJsonLdHandling(this.handleMediaType)&&!this.isFinalJsonLdProcessing)this.handleMediaType=void 0,this.textChunks=void 0,this.onEnd();else{const e=new n.Readable({objectMode:!0});e._read=()=>{};const t=this.textChunks,r={context:this.context,handle:{metadata:{baseIRI:this.baseIRI},data:e,headers:this.headers,context:this.context},handleMediaType:this.handleMediaType};this.mediatorRdfParseHandle.mediate(r).then((({handle:r})=>{r.data.on("error",(e=>this.cbError(o.newErrorCoded(e.message,"invalid script element")))).on("data",this.cbQuad).on("end",(()=>this.onEnd()));for(const r of t)e.push(r);e.push(null)})).catch((e=>{this.targetScriptId?this.cbError(o.newErrorCoded(e.message,"loading document failed")):this.onEnd()})),this.handleMediaType=void 0,this.textChunks=void 0}}onTagOpen(e,t){"base"===e&&t.href&&(this.baseIRI=(0,s.resolve)(t.href,this.baseIRI)),"script"!==e||this.targetScriptId&&t.id!==this.targetScriptId?this.handleMediaType=void 0:this.supportedTypes[t.type]?this.onlyFirstScript&&this.passedScripts>0?this.handleMediaType=void 0:(this.passedScripts++,this.handleMediaType=t.type,this.endBarrier++,this.requiresCustomJsonLdHandling(this.handleMediaType)?(this.textChunks=this.textChunksJsonLd,this.textChunks.push(0===this.textChunks.length?"[":",")):this.textChunks=[]):this.targetScriptId&&this.cbError(o.newErrorCoded(`Targeted script "${this.targetScriptId}" does not have a supported type`,"loading document failed"))}onText(e){this.handleMediaType&&this.textChunks.push(e)}requiresCustomJsonLdHandling(e){return!this.onlyFirstScript&&!this.targetScriptId&&"application/ld+json"===e}}t.HtmlScriptListener=o},6886:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(6104),t)},9552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtml=void 0;const i=r(254),n=r(3719),s=r(9827);class o extends i.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const i=new s.Readable({objectMode:!0});return i._read=async()=>{i._read=()=>{};let t=1;function s(e){i.emit("error",e)}function o(){0==--t&&i.push(null)}const a={baseIRI:e.metadata?.baseIRI??"",context:r,emit:function(e){i.emit("data",e)},end:o,error:s,headers:e.headers};Promise.all(this.busRdfParseHtml.publish(a)).then((async r=>{t+=r.length;const i=[];for(const e of r){const{htmlParseListener:t}=await e.actor.run(a);i.push(t)}const l=new n.Parser({onclosetag(){try{for(const e of i)e.onTagClose()}catch(e){s(e)}},onend(){try{for(const e of i)e.onEnd()}catch(e){s(e)}o()},onopentag(e,t){try{for(const r of i)r.onTagOpen(e,t)}catch(e){s(e)}},ontext(e){try{for(const t of i)t.onText(e)}catch(e){s(e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:!1});e.data.on("error",s).on("data",(e=>l.write(e.toString()))).on("end",(()=>l.end()))})).catch(s)},{data:i}}}t.ActorRdfParseHtml=o},6915:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9552),t)},5967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseJsonLd=void 0;const i=r(254),n=r(8199),s=r(5758),o=r(2005);class a extends i.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async testHandle(e,t,r){if(r.has(n.KeysRdfParseHtmlScript.processingHtmlScript)&&"application/ld+json"!==t)throw new Error("JSON-LD in script tags can only have media type 'application/ld+json'");if(!(t in this.mediaTypePriorities)&&!t.endsWith("+json"))throw new Error(`Unrecognized media type: ${t}`);return await this.testHandleChecked(e)}async runHandle(e,t,r){return{data:s.JsonLdParser.fromHttpResponse(e.metadata?.baseIRI??"",t,e.headers,{documentLoader:r.get(n.KeysRdfParseJsonLd.documentLoader)||new o.DocumentLoaderMediated(this.mediatorHttp,r),strictValues:r.get(n.KeysRdfParseJsonLd.strictValues),...r.get(n.KeysRdfParseJsonLd.parserOptions)}).import(e.data)}}}t.ActorRdfParseJsonLd=a},2005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLoaderMediated=void 0;const i=r(2319),n=r(1288),s=r(3858);class o extends n.FetchDocumentLoader{constructor(e,t){super(o.createFetcher(e,t)),this.mediatorHttp=e,this.context=t}static createFetcher(e,t){return async(r,n)=>{const o=await e.mediate({input:r,init:n,context:t});return o.json=async()=>JSON.parse(await s(i.ActorHttp.toNodeReadable(o.body))),o}}}t.DocumentLoaderMediated=o},5745:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5967),t),n(r(2005),t)},8043:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseN3=void 0;const i=r(254),n=r(1657);class s extends i.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){e.data.on("error",(e=>i.emit("error",e)));const i=e.data.pipe(new n.StreamParser({baseIRI:e.metadata?.baseIRI,format:t}));return{data:i,metadata:{triples:"text/turtle"===t||"application/n-triples"===t||"text/n3"===t}}}}t.ActorRdfParseN3=s},9241:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8043),t)},8717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseRdfXml=void 0;const i=r(254),n=r(5787);class s extends i.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){e.data.on("error",(e=>i.emit("error",e)));const i=e.data.pipe(new n.RdfXmlParser({baseIRI:e.metadata?.baseIRI}));return{data:i,metadata:{triples:!0}}}}t.ActorRdfParseRdfXml=s},9076:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8717),t)},3273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseXmlRdfa=void 0;const i=r(254),n=r(494);class s extends i.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const i=(e.headers&&e.headers.get("content-language"))??void 0;e.data.on("error",(e=>s.emit("error",e)));const s=e.data.pipe(new n.RdfaParser({baseIRI:e.metadata?.baseIRI,profile:"xml",language:i}));return{data:s,metadata:{triples:!0}}}}t.ActorRdfParseXmlRdfa=s},438:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3273),t)},6483:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttp=void 0;const i=r(1890),n=r(8090);r.g.ReadableStream=r.g.ReadableStream||r(8568).ReadableStream;const s=r(4970),o=r(1742);class a extends i.Actor{constructor(e){super(e)}static toNodeReadable(e){return s(e)||null===e?e:new n.ReadableWebToNodeStream(e)}static toWebReadableStream(e){return o(e)}static headersToHash(e){const t={};return e.forEach(((e,r)=>{t[r]=e})),t}}t.ActorHttp=a},2319:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(6483),t)},5168:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtml=void 0;const i=r(1890);class n extends i.Actor{constructor(e){super(e)}}t.ActorRdfParseHtml=n},3942:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5168),t)},1638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParse=void 0;const i=r(9737);class n extends i.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorRdfParse=n},4589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseFixedMediaTypes=void 0;const i=r(9737);class n extends i.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e){return!0}}t.ActorRdfParseFixedMediaTypes=n},254:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1638),t),n(r(4589),t)},9419:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeysRdfUpdateQuads=t.KeysRdfResolveQuadPattern=t.KeysRdfParseHtmlScript=t.KeysRdfParseJsonLd=t.KeysQueryOperation=t.KeysInitQuery=t.KeysHttpProxy=t.KeysHttpMemento=t.KeysHttpWayback=t.KeysHttp=t.KeysCore=void 0;const i=r(1890);t.KeysCore={log:i.CONTEXT_KEY_LOGGER},t.KeysHttp={includeCredentials:new i.ActionContextKey("@comunica/bus-http:include-credentials"),auth:new i.ActionContextKey("@comunica/bus-http:auth"),fetch:new i.ActionContextKey("@comunica/bus-http:fetch"),httpTimeout:new i.ActionContextKey("@comunica/bus-http:http-timeout"),httpBodyTimeout:new i.ActionContextKey("@comunica/bus-http:http-body-timeout"),httpRetryCount:new i.ActionContextKey("@comunica/bus-http:http-retry-count"),httpRetryDelay:new i.ActionContextKey("@comunica/bus-http:http-retry-delay"),httpRetryOnServerError:new i.ActionContextKey("@comunica/bus-http:http-retry-on-server-error")},t.KeysHttpWayback={recoverBrokenLinks:new i.ActionContextKey("@comunica/bus-http:recover-broken-links")},t.KeysHttpMemento={datetime:new i.ActionContextKey("@comunica/actor-http-memento:datetime")},t.KeysHttpProxy={httpProxyHandler:new i.ActionContextKey("@comunica/actor-http-proxy:httpProxyHandler")},t.KeysInitQuery={initialBindings:new i.ActionContextKey("@comunica/actor-init-query:initialBindings"),queryFormat:new i.ActionContextKey("@comunica/actor-init-query:queryFormat"),graphqlSingularizeVariables:new i.ActionContextKey("@comunica/actor-init-query:singularizeVariables"),lenient:new i.ActionContextKey("@comunica/actor-init-query:lenient"),queryString:new i.ActionContextKey("@comunica/actor-init-query:queryString"),query:new i.ActionContextKey("@comunica/actor-init-query:query"),baseIRI:new i.ActionContextKey("@comunica/actor-init-query:baseIRI"),queryTimestamp:new i.ActionContextKey("@comunica/actor-init-query:queryTimestamp"),extensionFunctionCreator:new i.ActionContextKey("@comunica/actor-init-query:extensionFunctionCreator"),extensionFunctions:new i.ActionContextKey("@comunica/actor-init-query:extensionFunctions"),cliArgsHandlers:new i.ActionContextKey("@comunica/actor-init-query:cliArgsHandlers"),explain:new i.ActionContextKey("@comunica/actor-init-query:explain"),physicalQueryPlanLogger:new i.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanLogger"),physicalQueryPlanNode:new i.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanNode"),jsonLdContext:new i.ActionContextKey("@context")},t.KeysQueryOperation={operation:new i.ActionContextKey("@comunica/bus-query-operation:operation"),joinLeftMetadata:new i.ActionContextKey("@comunica/bus-query-operation:joinLeftMetadata"),joinRightMetadatas:new i.ActionContextKey("@comunica/bus-query-operation:joinRightMetadatas"),joinBindings:new i.ActionContextKey("@comunica/bus-query-operation:joinBindings"),readOnly:new i.ActionContextKey("@comunica/bus-query-operation:readOnly"),isPathArbitraryLengthDistinctKey:new i.ActionContextKey("@comunica/bus-query-operation:isPathArbitraryLengthDistinct"),limitIndicator:new i.ActionContextKey("@comunica/bus-query-operation:limitIndicator"),unionDefaultGraph:new i.ActionContextKey("@comunica/bus-query-operation:unionDefaultGraph"),localizeBlankNodes:new i.ActionContextKey("@comunica/actor-query-operation:localizeBlankNodes")},t.KeysRdfParseJsonLd={documentLoader:new i.ActionContextKey("@comunica/actor-rdf-parse-jsonld:documentLoader"),strictValues:new i.ActionContextKey("@comunica/actor-rdf-parse-jsonld:strictValues"),parserOptions:new i.ActionContextKey("@comunica/actor-rdf-parse-jsonld:parserOptions")},t.KeysRdfParseHtmlScript={processingHtmlScript:new i.ActionContextKey("@comunica/actor-rdf-parse-html-script:processingHtmlScript"),extractAllScripts:new i.ActionContextKey("extractAllScripts")},t.KeysRdfResolveQuadPattern={sources:new i.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:sources"),source:new i.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:source"),sourceIds:new i.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:sourceIds")},t.KeysRdfUpdateQuads={destination:new i.ActionContextKey("@comunica/bus-rdf-update-quads:destination")}},8199:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9419),t)},8168:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionContextKey=t.ActionContext=void 0;const i=r(5369);class n{constructor(e={}){this.map=(0,i.Map)(e)}setDefault(e,t){return this.has(e)?this:this.set(e,t)}set(e,t){return this.setRaw(e.name,t)}setRaw(e,t){return new n(this.map.set(e,t))}delete(e){return new n(this.map.delete(e.name))}get(e){return this.getRaw(e.name)}getRaw(e){return this.map.get(e)}getSafe(e){if(!this.has(e))throw new Error(`Context entry ${e.name} is required but not available`);return this.get(e)}has(e){return this.hasRaw(e.name)}hasRaw(e){return this.map.has(e)}merge(...e){let t=this;for(const r of e)for(const e of r.keys())t=t.set(e,r.get(e));return t}keys(){return[...this.map.keys()].map((e=>new s(e)))}toJS(){return this.map.toJS()}toString(){return`ActionContext(${JSON.stringify(this.map.toJS())})`}[Symbol.for("nodejs.util.inspect.custom")](){return`ActionContext(${JSON.stringify(this.map.toJS(),null," ")})`}static ensureActionContext(e){return e instanceof n?e:new n((0,i.Map)(e||{}))}}t.ActionContext=n;class s{constructor(e){this.name=e}}t.ActionContextKey=s},6195:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserver=void 0,t.ActionObserver=class{constructor(e){Object.assign(this,e)}}},1863:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Actor=void 0;const i=r(6325);class n{constructor(e){this.beforeActors=[],Object.assign(this,e),this.bus.subscribe(this),this.beforeActors.length>0&&this.bus.addDependencies(this,this.beforeActors)}static getContextLogger(e){return e.get(i.CONTEXT_KEY_LOGGER)}runObservable(e){const t=this.run(e);return this.bus.onRun(this,e,t),t}async initialize(){return!0}async deinitialize(){return!0}getDefaultLogData(e,t){const r=t?t():{};return r.actor=this.name,r}logTrace(e,t,r){const i=n.getContextLogger(e);i&&i.trace(t,this.getDefaultLogData(e,r))}logDebug(e,t,r){const i=n.getContextLogger(e);i&&i.debug(t,this.getDefaultLogData(e,r))}logInfo(e,t,r){const i=n.getContextLogger(e);i&&i.info(t,this.getDefaultLogData(e,r))}logWarn(e,t,r){const i=n.getContextLogger(e);i&&i.warn(t,this.getDefaultLogData(e,r))}logError(e,t,r){const i=n.getContextLogger(e);i&&i.error(t,this.getDefaultLogData(e,r))}logFatal(e,t,r){const i=n.getContextLogger(e);i&&i.fatal(t,this.getDefaultLogData(e,r))}}t.Actor=n},5090:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bus=void 0,t.Bus=class{constructor(e){this.actors=[],this.observers=[],this.dependencyLinks=new Map,Object.assign(this,e)}subscribe(e){this.actors.push(e),this.reorderForDependencies()}subscribeObserver(e){this.observers.push(e)}unsubscribe(e){const t=this.actors.indexOf(e);return t>=0&&(this.actors.splice(t,1),!0)}unsubscribeObserver(e){const t=this.observers.indexOf(e);return t>=0&&(this.observers.splice(t,1),!0)}publish(e){return this.actors.map((t=>({actor:t,reply:t.test(e)})))}onRun(e,t,r){for(const i of this.observers)i.onRun(e,t,r)}addDependencies(e,t){for(const r of t){let t=this.dependencyLinks.get(r);t||(t=[],this.dependencyLinks.set(r,t)),t.push(e)}this.reorderForDependencies()}reorderForDependencies(){if(this.dependencyLinks.size>0){const e=[];for(const t of this.dependencyLinks.keys()){const r=this.actors.indexOf(t);r>=0&&(this.actors.splice(