import jQuery from"jquery";import"jquery-ui/version.js";let define=null;
/*!
 * jQuery UI Position 1.13.2
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/position/
 */!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){"use strict";return function(){var i,e=Math.max,o=Math.abs,n=/left|center|right/,l=/top|center|bottom/,f=/[\+\-]\d+(\.[\d]+)?%?/,s=/^\w+/,h=/%$/,r=t.fn.position;function p(t,i,e){return[parseFloat(t[0])*(h.test(t[0])?i/100:1),parseFloat(t[1])*(h.test(t[1])?e/100:1)]}function c(i,e){return parseInt(t.css(i,e),10)||0}function a(t){return null!=t&&t===t.window}t.position={scrollbarWidth:function(){if(void 0!==i)return i;var e,o,n=t("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"),l=n.children()[0];return t("body").append(n),e=l.offsetWidth,n.css("overflow","scroll"),e===(o=l.offsetWidth)&&(o=n[0].clientWidth),n.remove(),i=e-o},getScrollInfo:function(i){var e=i.isWindow||i.isDocument?"":i.element.css("overflow-x"),o=i.isWindow||i.isDocument?"":i.element.css("overflow-y"),n="scroll"===e||"auto"===e&&i.width<i.element[0].scrollWidth;return{width:"scroll"===o||"auto"===o&&i.height<i.element[0].scrollHeight?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(i){var e=t(i||window),o=a(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:o,isDocument:n,offset:!o&&!n?t(i).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},t.fn.position=function(i){if(!i||!i.of)return r.apply(this,arguments);var h,d,g,u,m,w,W,y,v="string"==typeof(i=t.extend({},i)).of?t(document).find(i.of):t(i.of),H=t.position.getWithinInfo(i.within),b=t.position.getScrollInfo(H),x=(i.collision||"flip").split(" "),T={};return w=9===(y=(W=v)[0]).nodeType?{width:W.width(),height:W.height(),offset:{top:0,left:0}}:a(y)?{width:W.width(),height:W.height(),offset:{top:W.scrollTop(),left:W.scrollLeft()}}:y.preventDefault?{width:0,height:0,offset:{top:y.pageY,left:y.pageX}}:{width:W.outerWidth(),height:W.outerHeight(),offset:W.offset()},v[0].preventDefault&&(i.at="left top"),d=w.width,g=w.height,u=w.offset,m=t.extend({},u),t.each(["my","at"],(function(){var t,e,o=(i[this]||"").split(" ");1===o.length&&(o=n.test(o[0])?o.concat(["center"]):l.test(o[0])?["center"].concat(o):["center","center"]),o[0]=n.test(o[0])?o[0]:"center",o[1]=l.test(o[1])?o[1]:"center",t=f.exec(o[0]),e=f.exec(o[1]),T[this]=[t?t[0]:0,e?e[0]:0],i[this]=[s.exec(o[0])[0],s.exec(o[1])[0]]})),1===x.length&&(x[1]=x[0]),"right"===i.at[0]?m.left+=d:"center"===i.at[0]&&(m.left+=d/2),"bottom"===i.at[1]?m.top+=g:"center"===i.at[1]&&(m.top+=g/2),h=p(T.at,d,g),m.left+=h[0],m.top+=h[1],this.each((function(){var n,l,f=t(this),s=f.outerWidth(),r=f.outerHeight(),a=c(this,"marginLeft"),w=c(this,"marginTop"),W=s+a+c(this,"marginRight")+b.width,y=r+w+c(this,"marginBottom")+b.height,L=t.extend({},m),P=p(T.my,f.outerWidth(),f.outerHeight());"right"===i.my[0]?L.left-=s:"center"===i.my[0]&&(L.left-=s/2),"bottom"===i.my[1]?L.top-=r:"center"===i.my[1]&&(L.top-=r/2),L.left+=P[0],L.top+=P[1],n={marginLeft:a,marginTop:w},t.each(["left","top"],(function(e,o){t.ui.position[x[e]]&&t.ui.position[x[e]][o](L,{targetWidth:d,targetHeight:g,elemWidth:s,elemHeight:r,collisionPosition:n,collisionWidth:W,collisionHeight:y,offset:[h[0]+P[0],h[1]+P[1]],my:i.my,at:i.at,within:H,elem:f})})),i.using&&(l=function(t){var n=u.left-L.left,l=n+d-s,h=u.top-L.top,p=h+g-r,c={target:{element:v,left:u.left,top:u.top,width:d,height:g},element:{element:f,left:L.left,top:L.top,width:s,height:r},horizontal:l<0?"left":n>0?"right":"center",vertical:p<0?"top":h>0?"bottom":"middle"};d<s&&o(n+l)<d&&(c.horizontal="center"),g<r&&o(h+p)<g&&(c.vertical="middle"),e(o(n),o(l))>e(o(h),o(p))?c.important="horizontal":c.important="vertical",i.using.call(this,t,c)}),f.offset(t.extend(L,{using:l}))}))},t.ui.position={fit:{left:function(t,i){var o,n=i.within,l=n.isWindow?n.scrollLeft:n.offset.left,f=n.width,s=t.left-i.collisionPosition.marginLeft,h=l-s,r=s+i.collisionWidth-f-l;i.collisionWidth>f?h>0&&r<=0?(o=t.left+h+i.collisionWidth-f-l,t.left+=h-o):t.left=r>0&&h<=0?l:h>r?l+f-i.collisionWidth:l:h>0?t.left+=h:r>0?t.left-=r:t.left=e(t.left-s,t.left)},top:function(t,i){var o,n=i.within,l=n.isWindow?n.scrollTop:n.offset.top,f=i.within.height,s=t.top-i.collisionPosition.marginTop,h=l-s,r=s+i.collisionHeight-f-l;i.collisionHeight>f?h>0&&r<=0?(o=t.top+h+i.collisionHeight-f-l,t.top+=h-o):t.top=r>0&&h<=0?l:h>r?l+f-i.collisionHeight:l:h>0?t.top+=h:r>0?t.top-=r:t.top=e(t.top-s,t.top)}},flip:{left:function(t,i){var e,n,l=i.within,f=l.offset.left+l.scrollLeft,s=l.width,h=l.isWindow?l.scrollLeft:l.offset.left,r=t.left-i.collisionPosition.marginLeft,p=r-h,c=r+i.collisionWidth-s-h,a="left"===i.my[0]?-i.elemWidth:"right"===i.my[0]?i.elemWidth:0,d="left"===i.at[0]?i.targetWidth:"right"===i.at[0]?-i.targetWidth:0,g=-2*i.offset[0];p<0?((e=t.left+a+d+g+i.collisionWidth-s-f)<0||e<o(p))&&(t.left+=a+d+g):c>0&&((n=t.left-i.collisionPosition.marginLeft+a+d+g-h)>0||o(n)<c)&&(t.left+=a+d+g)},top:function(t,i){var e,n,l=i.within,f=l.offset.top+l.scrollTop,s=l.height,h=l.isWindow?l.scrollTop:l.offset.top,r=t.top-i.collisionPosition.marginTop,p=r-h,c=r+i.collisionHeight-s-h,a="top"===i.my[1]?-i.elemHeight:"bottom"===i.my[1]?i.elemHeight:0,d="top"===i.at[1]?i.targetHeight:"bottom"===i.at[1]?-i.targetHeight:0,g=-2*i.offset[1];p<0?((n=t.top+a+d+g+i.collisionHeight-s-f)<0||n<o(p))&&(t.top+=a+d+g):c>0&&((e=t.top-i.collisionPosition.marginTop+a+d+g-h)>0||o(e)<c)&&(t.top+=a+d+g)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position}));