/*! For license information please see LICENSES */ (window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1485:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=h(n(40)),o=h(n(23)),l=h(n(17)),c=h(n(20)),f=h(n(31)),d=h(n(32));function h(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function e(){return(0,l.default)(this,e),(0,f.default)(this,(e.__proto__||(0,o.default)(e)).apply(this,arguments))}return(0,d.default)(e,t),(0,c.default)(e,[{key:"init",value:function(){}},{key:"find",value:function(code){return this.send({domainKey:"pigsy",contentType:"form",url:"/supply-mono-data/api/area/list/by/parent",data:{parentId:code||0}})}},{key:"getCurrentLocation",value:function(t){var e=t.lat,n=void 0===e?28.1972:e,r=t.lng,o=void 0===r?112.971159:r;return this.get({isToastError:!1,domainKey:"pigsy",url:"/paradise/api/lbs/getLocation?lat="+n+"&lng="+o}).then((function(t){if(t&&t.result){var e=t.result.address_component,n=e.district,r=e.areaId,o=e.city,l=e.cityId,c=e.province,f=e.provinceId;return{name:[c,o,n].join(""),area:[{id:f,areaName:c},{id:l,areaName:o},{id:r,areaName:n}]}}}))}},{key:"formatterChinaLatLng",value:function(t){if(t&&t.length>1){var e=Number(t[0]),n=Number(t[1]),r=e>60;return{lat:r?n:e,lng:r?e:n}}return{}}},{key:"getLocation",value:function(t){if(this.$env.inApp){var e=this.$context.installManager.$app.settings,n=void 0===e?{}:e;if(t||n.location){var o=this.formatterChinaLatLng((t||n.location).split(/\,|\|/g));return this.getCurrentLocation(o)}}return r.default.resolve()}}]),e}(n(1).Service);m.prototype.$eid="AreaService",e.default=m},1501:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=v(n(1502)),o=v(n(1505)),l=v(n(23)),c=v(n(17)),f=v(n(20)),d=v(n(31)),h=v(n(32)),m=n(1);function v(t){return t&&t.__esModule?t:{default:t}}var y=["mp3","mp4"],w=function(t){var e=t.split("/");return e[e.length-1]},_=function(t){return-1!=y.indexOf(w(t).toLowerCase())},x=function(t){function e(){return(0,c.default)(this,e),(0,d.default)(this,(e.__proto__||(0,l.default)(e)).apply(this,arguments))}var n,v,y;return(0,h.default)(e,t),(0,f.default)(e,[{key:"init",value:function(){}},{key:"putBase64",value:(y=(0,o.default)(r.default.mark((function t(e,content){return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.putAllBase64(e,content));case 1:case"end":return t.stop()}}),t,this)}))),function(t,e){return y.apply(this,arguments)})},{key:"putHswwBase64",value:(v=(0,o.default)(r.default.mark((function t(e,content){return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.putAllBase64(e,content,!0));case 1:case"end":return t.stop()}}),t,this)}))),function(t,e){return v.apply(this,arguments)})},{key:"putAllBase64",value:(n=(0,o.default)(r.default.mark((function t(e,content,n){var o,l,c,f,d,h,v;return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.type,l=void 0===o?"":o,e.size,c=w(l),!n){t.next=8;break}return t.next=5,this.getHswwQiniuKey(c);case 5:t.t0=t.sent,t.next=11;break;case 8:return t.next=10,this.getQiniuKey(c);case 10:t.t0=t.sent;case 11:return f=t.t0,d=f.key,h=f.token,v="http://up-z2.qbox.me/putb64/-1/key/"+m.Core.base64.encode(d),content=content||e.content,t.abrupt("return",this.send({url:v,headers:{"content-type":"application/octet-stream",Authorization:"UpToken "+h},data:content.substring(content.indexOf(",")+1)}).then((function(){return m.Core._.pathJoin(_(d)?"http://www.lianlianny.com/agricprod/lib/video/transcode":"http://image.www.lianlianny.com/agricprod",d)})));case 17:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return n.apply(this,arguments)})},{key:"getQiniuKey",value:function(t,e){return this.send({url:"/paradise/api/transform/file/getUploadToken",domainKey:"pigsy",data:{fname:["*",t].join("."),submitType:0,customFileName:e,busType:6}})}},{key:"getHswwQiniuKey",value:function(t,e){return this.send({url:"/paradise/hsww/file/getUploadToken",domainKey:"hsww",data:{fname:["*",t].join("."),submitType:0,customFileName:e,busType:6}})}}]),e}(m.Service);x.prototype.$eid="UploadService",e.default=x},1513:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(4);var l=((r=o)&&r.__esModule?r:{default:r}).default.prototype.$isServer,c=["transcode/","image/","file/"],f=function(){return-1!==navigator.userAgent.indexOf("cnhnb_iOS")},d=function(){return-1!==navigator.userAgent.indexOf("cnhnb_Android_")},h=function(){return f()||d()},m=!l&&document.addEventListener?function(element,t,e){element&&t&&e&&element.addEventListener(t,e,!1)}:function(element,t,e){element&&t&&e&&element.attachEvent("on"+t,e)},v=!l&&document.removeEventListener?function(element,t,e){element&&t&&element.removeEventListener(t,e,!1)}:function(element,t,e){element&&t&&element.detachEvent("on"+t,e)};e.default={concatQiniuURL:function(t){if(t){var e=t.indexOf(".mp4")>-1;-1!==t.indexOf("http")||(t=(e?"http://video.www.lianlianny.com/agricprod":function(t){return c.find((function(e){return-1!==t.indexOf(e)}))}(t)?"http://image.www.lianlianny.com/agricprod":"http://img.www.lianlianny.com/agricprod")+function(t,e){return e&&(t=t.replace(".mp4",".jpg")),0==t.indexOf("/")?t:"/"+t}(t,e))}return t},on:m,off:v,isServer:l,isIos:f,isAndroid:d,isApp:h,isQQ:function(){return!h()&&!!navigator.userAgent.toLowerCase().match(/mqqbrowser|qzone|qqbrowser/i)},isWechat:function(){return-1!==navigator.userAgent.toLowerCase().indexOf("micromessenger")}}},1529:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=f(n(164)),o=f(n(17)),l=f(n(20)),c=f(n(712));function f(t){return t&&t.__esModule?t:{default:t}}var d=function(){function t(e){if((0,o.default)(this,t),this._ticket=null,this._id=null,this._info=null,"undefined"!=typeof window){var n=e.$env,r=n.inApp,l=n.inWeex;this.inApp=r,this.inWeex=l,this.context=e,this.init()}}return(0,l.default)(t,[{key:"init",value:function(){if("undefined"!=typeof window){if(this.inApp){var t=this.context.installManager.$app;this._ticket=t.settings.hnUserTicket,this._id=t.settings.hnUserId}else if(this.inWeex){var e=this.context.ctx.$weex;this._id=e.getUserTicket(),this._ticket=e.getUserId()}else this._id=c.default.get("hnUserId"),this._ticket=c.default.get("hnUserTicket");var n=sessionStorage.getItem("HN_USER_INFO");n&&(this._info=JSON.parse(n))}}},{key:"getTicket",value:function(){return this._ticket}},{key:"getId",value:function(){return this._id}},{key:"setLoginInfo",value:function(data){if(!this.inApp&&!this.inWeex){this._id=data.hnUserId,this._ticket=data.ticket;var t=new Date;t.setTime(t.getTime()+76896e5),c.default.set("hnUserTicket",data.ticket,{expires:t}),c.default.set("hnUserId",data.hnUserId,{expires:t})}this._removeInfo()}},{key:"setInfo",value:function(data){this._info=data,sessionStorage.setItem("HN_USER_INFO",(0,r.default)(data))}},{key:"_removeInfo",value:function(){this._info=void 0,sessionStorage.removeItem("HN_USER_INFO")}},{key:"getInfo",value:function(){return this._info}},{key:"clear",value:function(){this.inApp||this.inWeex||(this._ticket=void 0,this._id=void 0,c.default.remove("hnUserTicket"),c.default.remove("hnUserId"),this._removeInfo())}},{key:"isEmpty",value:function(){return!this.getTicket()||!this.getId()||0==this.getId()}}]),t}();e.default=d},1530:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=w(n(1531)),o=w(n(23)),l=w(n(17)),c=w(n(20)),f=w(n(31)),d=w(n(32)),h=w(n(713)),m=w(n(714)),v=w(n(4)),y=w(n(363));function w(t){return t&&t.__esModule?t:{default:t}}var _=function(t){function e(){var t,n,c,d,h;(0,l.default)(this,e);for(var m=arguments.length,v=Array(m),w=0;w0&&void 0!==arguments[0]?arguments[0]:"buyer";return this.send({domainKey:"banana",login:!0,url:"/payment/access/order/state/count",method:"post",data:{flag:t}})}},{key:"doPayment",value:function(t){var e="http://"+location.host+"/order/detail?orderNo="+t.orderCode;window.open(this.$config.cashier+"?orderNo="+t.orderCode+"&ticket="+this.$service.user.getTicket()+"&redirect_url="+encodeURIComponent(e))}},{key:"doDeleteOrder",value:function(t){var e=this;return v.default.prototype.$dialog.confirm({title:"提示",message:"确认删除订单?"}).then((function(){return e.send({domainKey:"banana",login:!0,url:"/order/operate/delete",data:{orderNo:t.orderCode}}).then((function(){e._triggerOrderUpdate(t,"doDeleteOrder")}))}))}},{key:"doExtendConfirm",value:function(t){var e=this;return v.default.prototype.$dialog.confirm({title:"提示",message:"自动收货时间将延长3天,你还有"+(3-t.delayNum)+"次延长收货的机会"}).then((function(){return e.send({domainKey:"banana",login:!0,url:"/order/operate/delay/goods",data:{flag:"buyer",orderNo:t.orderCode}}).then((function(){v.default.prototype.$toast?v.default.prototype.$toast("自动收货时间已延长3天").then((function(){e._triggerOrderUpdate(t,"extendConfirm")})):e._triggerOrderUpdate(t,"extendConfirm")}))}))}},{key:"doConfirmDelivery",value:function(t){this.$context.eventManager.fire(y.default.EVENT_ORDER_CONFIRM,[{order:t}])}},{key:"_sendConfirmDelivery",value:function(t){var e=this,n=t.order,r=t.params;return this.send({domainKey:"banana",login:!0,url:"/order/access/confirm",data:r}).then((function(){e._triggerOrderUpdate(n,"confirmDelivery")}))}},{key:"_sendCancelOrder",value:function(t){var e=this,n=t.order,r=t.reason;return this.send({domainKey:"banana",login:!0,url:"/order/operate/cancel",data:{reason:r,orderNo:n.orderCode}}).then((function(){e._triggerOrderUpdate(n,"doCancelOrder")}))}},{key:"doCancelOrder",value:function(t){this.$context.eventManager.fire(y.default.EVENT_ORDER_CANCEL,[{order:t}])}},{key:"_triggerOrderUpdate",value:function(t,e){this.$context.eventManager.fire(y.default.EVENT_ORDER_UPDATE,[{order:t,action:e}])}}]),e}(h.default);_.prototype.$eid="OrderService",e.default=_},1532:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=m(n(23)),o=m(n(17)),l=m(n(20)),c=m(n(31)),f=m(n(32)),d=n(1),h=m(n(362));function m(t){return t&&t.__esModule?t:{default:t}}var v=function(t){function e(){var t,n,l,f;(0,o.default)(this,e);for(var d=arguments.length,m=Array(d),v=0;v0&&0===x.container.parents("."+x.params.slideActiveClass).length)return;var s={left:window.pageXOffset,top:window.pageYOffset},i=window.innerWidth,n=window.innerHeight,r=x.container.offset();x.rtl&&(r.left=r.left-x.container[0].scrollLeft);for(var o=[[r.left,r.top],[r.left+x.width,r.top],[r.left,r.top+x.height],[r.left+x.width,r.top+x.height]],l=0;l=s.left&&p[0]<=s.left+i&&p[1]>=s.top&&p[1]<=s.top+n&&(e=!0)}if(!e)return}x.isHorizontal()?(37!==a&&39!==a||(t.preventDefault?t.preventDefault():t.returnValue=!1),(39===a&&!x.rtl||37===a&&x.rtl)&&x.slideNext(),(37===a&&!x.rtl||39===a&&x.rtl)&&x.slidePrev()):(38!==a&&40!==a||(t.preventDefault?t.preventDefault():t.returnValue=!1),40===a&&x.slideNext(),38===a&&x.slidePrev()),x.emit("onKeyPress",x,a)}}function u(t){t.originalEvent&&(t=t.originalEvent);var a=0,e=x.rtl?-1:1,s=function(t){var a=0,e=0,s=0,i=0;return"detail"in t&&(e=t.detail),"wheelDelta"in t&&(e=-t.wheelDelta/120),"wheelDeltaY"in t&&(e=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(a=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(a=e,e=0),s=10*a,i=10*e,"deltaY"in t&&(i=t.deltaY),"deltaX"in t&&(s=t.deltaX),(s||i)&&t.deltaMode&&(1===t.deltaMode?(s*=40,i*=40):(s*=800,i*=800)),s&&!a&&(a=s<1?-1:1),i&&!e&&(e=i<1?-1:1),{spinX:a,spinY:e,pixelX:s,pixelY:i}}(t);if(x.params.mousewheelForceToAxis)if(x.isHorizontal()){if(!(Math.abs(s.pixelX)>Math.abs(s.pixelY)))return;a=s.pixelX*e}else{if(!(Math.abs(s.pixelY)>Math.abs(s.pixelX)))return;a=s.pixelY}else a=Math.abs(s.pixelX)>Math.abs(s.pixelY)?-s.pixelX*e:-s.pixelY;if(0!==a){if(x.params.mousewheelInvert&&(a=-a),x.params.freeMode){var i=x.getWrapperTranslate()+a*x.params.mousewheelSensitivity,n=x.isBeginning,r=x.isEnd;if(i>=x.minTranslate()&&(i=x.minTranslate()),i<=x.maxTranslate()&&(i=x.maxTranslate()),x.setWrapperTransition(0),x.setWrapperTranslate(i),x.updateProgress(),x.updateActiveIndex(),(!n&&x.isBeginning||!r&&x.isEnd)&&x.updateClasses(),x.params.freeModeSticky?(clearTimeout(x.mousewheel.timeout),x.mousewheel.timeout=setTimeout((function(){x.slideReset()}),300)):x.params.lazyLoading&&x.lazy&&x.lazy.load(),x.emit("onScroll",x,t),x.params.autoplay&&x.params.autoplayDisableOnInteraction&&x.stopAutoplay(),0===i||i===x.maxTranslate())return}else{if((new window.Date).getTime()-x.mousewheel.lastScrollTime>60)if(a<0)if(x.isEnd&&!x.params.loop||x.animating){if(x.params.mousewheelReleaseOnEdges)return!0}else x.slideNext(),x.emit("onScroll",x,t);else if(x.isBeginning&&!x.params.loop||x.animating){if(x.params.mousewheelReleaseOnEdges)return!0}else x.slidePrev(),x.emit("onScroll",x,t);x.mousewheel.lastScrollTime=(new window.Date).getTime()}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1}}function f(a,e){a=t(a);var s,i,n,r=x.rtl?-1:1;s=a.attr("data-swiper-parallax")||"0",i=a.attr("data-swiper-parallax-x"),n=a.attr("data-swiper-parallax-y"),i||n?(i=i||"0",n=n||"0"):x.isHorizontal()?(i=s,n="0"):(n=s,i="0"),i=i.indexOf("%")>=0?parseInt(i,10)*e*r+"%":i*e*r+"px",n=n.indexOf("%")>=0?parseInt(n,10)*e+"%":n*e+"px",a.transform("translate3d("+i+", "+n+",0px)")}function d(t){return 0!==t.indexOf("on")&&(t=t[0]!==t[0].toUpperCase()?"on"+t[0].toUpperCase()+t.substring(1):"on"+t),t}if(!(this instanceof a))return new a(s,i);var h={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},g=i&&i.virtualTranslate;i=i||{};var m={};for(var v in i)if("object"!=r(i[v])||null===i[v]||i[v].nodeType||i[v]===window||i[v]===document||void 0!==n&&i[v]instanceof n||"undefined"!=typeof jQuery&&i[v]instanceof jQuery)m[v]=i[v];else for(var y in m[v]={},i[v])m[v][y]=i[v][y];for(var w in h)if(void 0===i[w])i[w]=h[w];else if("object"==r(i[w]))for(var _ in h[w])void 0===i[w][_]&&(i[w][_]=h[w][_]);var x=this;if(x.params=i,x.originalParams=m,x.classNames=[],void 0!==t&&void 0!==n&&(t=n),(void 0!==t||(t=void 0===n?window.Dom7||window.Zepto||window.jQuery:n))&&(x.$=t,x.currentBreakpoint=void 0,x.getActiveBreakpoint=function(){if(!x.params.breakpoints)return!1;var t,a=!1,e=[];for(t in x.params.breakpoints)x.params.breakpoints.hasOwnProperty(t)&&e.push(t);e.sort((function(t,a){return parseInt(t,10)>parseInt(a,10)}));for(var s=0;s=window.innerWidth&&!a&&(a=t);return a||"max"},x.setBreakpoint=function(){var t=x.getActiveBreakpoint();if(t&&x.currentBreakpoint!==t){var a=t in x.params.breakpoints?x.params.breakpoints[t]:x.originalParams,e=x.params.loop&&a.slidesPerView!==x.params.slidesPerView;for(var s in a)x.params[s]=a[s];x.currentBreakpoint=t,e&&x.destroyLoop&&x.reLoop(!0)}},x.params.breakpoints&&x.setBreakpoint(),x.container=t(s),0!==x.container.length)){if(x.container.length>1){var b=[];return x.container.each((function(){b.push(new a(this,i))})),b}x.container[0].swiper=x,x.container.data("swiper",x),x.classNames.push(x.params.containerModifierClass+x.params.direction),x.params.freeMode&&x.classNames.push(x.params.containerModifierClass+"free-mode"),x.support.flexbox||(x.classNames.push(x.params.containerModifierClass+"no-flexbox"),x.params.slidesPerColumn=1),x.params.autoHeight&&x.classNames.push(x.params.containerModifierClass+"autoheight"),(x.params.parallax||x.params.watchSlidesVisibility)&&(x.params.watchSlidesProgress=!0),x.params.touchReleaseOnEdges&&(x.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(x.params.effect)>=0&&(x.support.transforms3d?(x.params.watchSlidesProgress=!0,x.classNames.push(x.params.containerModifierClass+"3d")):x.params.effect="slide"),"slide"!==x.params.effect&&x.classNames.push(x.params.containerModifierClass+x.params.effect),"cube"===x.params.effect&&(x.params.resistanceRatio=0,x.params.slidesPerView=1,x.params.slidesPerColumn=1,x.params.slidesPerGroup=1,x.params.centeredSlides=!1,x.params.spaceBetween=0,x.params.virtualTranslate=!0),"fade"!==x.params.effect&&"flip"!==x.params.effect||(x.params.slidesPerView=1,x.params.slidesPerColumn=1,x.params.slidesPerGroup=1,x.params.watchSlidesProgress=!0,x.params.spaceBetween=0,void 0===g&&(x.params.virtualTranslate=!0)),x.params.grabCursor&&x.support.touch&&(x.params.grabCursor=!1),x.wrapper=x.container.children("."+x.params.wrapperClass),x.params.pagination&&(x.paginationContainer=t(x.params.pagination),x.params.uniqueNavElements&&"string"==typeof x.params.pagination&&x.paginationContainer.length>1&&1===x.container.find(x.params.pagination).length&&(x.paginationContainer=x.container.find(x.params.pagination)),"bullets"===x.params.paginationType&&x.params.paginationClickable?x.paginationContainer.addClass(x.params.paginationModifierClass+"clickable"):x.params.paginationClickable=!1,x.paginationContainer.addClass(x.params.paginationModifierClass+x.params.paginationType)),(x.params.nextButton||x.params.prevButton)&&(x.params.nextButton&&(x.nextButton=t(x.params.nextButton),x.params.uniqueNavElements&&"string"==typeof x.params.nextButton&&x.nextButton.length>1&&1===x.container.find(x.params.nextButton).length&&(x.nextButton=x.container.find(x.params.nextButton))),x.params.prevButton&&(x.prevButton=t(x.params.prevButton),x.params.uniqueNavElements&&"string"==typeof x.params.prevButton&&x.prevButton.length>1&&1===x.container.find(x.params.prevButton).length&&(x.prevButton=x.container.find(x.params.prevButton)))),x.isHorizontal=function(){return"horizontal"===x.params.direction},x.rtl=x.isHorizontal()&&("rtl"===x.container[0].dir.toLowerCase()||"rtl"===x.container.css("direction")),x.rtl&&x.classNames.push(x.params.containerModifierClass+"rtl"),x.rtl&&(x.wrongRTL="-webkit-box"===x.wrapper.css("display")),x.params.slidesPerColumn>1&&x.classNames.push(x.params.containerModifierClass+"multirow"),x.device.android&&x.classNames.push(x.params.containerModifierClass+"android"),x.container.addClass(x.classNames.join(" ")),x.translate=0,x.progress=0,x.velocity=0,x.lockSwipeToNext=function(){x.params.allowSwipeToNext=!1,!1===x.params.allowSwipeToPrev&&x.params.grabCursor&&x.unsetGrabCursor()},x.lockSwipeToPrev=function(){x.params.allowSwipeToPrev=!1,!1===x.params.allowSwipeToNext&&x.params.grabCursor&&x.unsetGrabCursor()},x.lockSwipes=function(){x.params.allowSwipeToNext=x.params.allowSwipeToPrev=!1,x.params.grabCursor&&x.unsetGrabCursor()},x.unlockSwipeToNext=function(){x.params.allowSwipeToNext=!0,!0===x.params.allowSwipeToPrev&&x.params.grabCursor&&x.setGrabCursor()},x.unlockSwipeToPrev=function(){x.params.allowSwipeToPrev=!0,!0===x.params.allowSwipeToNext&&x.params.grabCursor&&x.setGrabCursor()},x.unlockSwipes=function(){x.params.allowSwipeToNext=x.params.allowSwipeToPrev=!0,x.params.grabCursor&&x.setGrabCursor()},x.setGrabCursor=function(t){x.container[0].style.cursor="move",x.container[0].style.cursor=t?"-webkit-grabbing":"-webkit-grab",x.container[0].style.cursor=t?"-moz-grabbin":"-moz-grab",x.container[0].style.cursor=t?"grabbing":"grab"},x.unsetGrabCursor=function(){x.container[0].style.cursor=""},x.params.grabCursor&&x.setGrabCursor(),x.imagesToLoad=[],x.imagesLoaded=0,x.loadImage=function(t,a,e,s,i,n){function r(){n&&n()}var o;t.complete&&i?r():a?((o=new window.Image).onload=r,o.onerror=r,s&&(o.sizes=s),e&&(o.srcset=e),a&&(o.src=a)):r()},x.preloadImages=function(){function t(){null!=x&&x&&(void 0!==x.imagesLoaded&&x.imagesLoaded++,x.imagesLoaded===x.imagesToLoad.length&&(x.params.updateOnImagesReady&&x.update(),x.emit("onImagesReady",x)))}x.imagesToLoad=x.container.find("img");for(var a=0;a1)for(t=0;tx.slides.length)break;a.push(x.slides.eq(s)[0])}else a.push(x.slides.eq(x.activeIndex)[0]);for(t=0;te?i:e}e&&x.wrapper.css("height",e+"px")},x.updateContainerSize=function(){var t,a;t=void 0!==x.params.width?x.params.width:x.container[0].clientWidth,a=void 0!==x.params.height?x.params.height:x.container[0].clientHeight,0===t&&x.isHorizontal()||0===a&&!x.isHorizontal()||(t=t-parseInt(x.container.css("padding-left"),10)-parseInt(x.container.css("padding-right"),10),a=a-parseInt(x.container.css("padding-top"),10)-parseInt(x.container.css("padding-bottom"),10),x.width=t,x.height=a,x.size=x.isHorizontal()?x.width:x.height)},x.updateSlidesSize=function(){x.slides=x.wrapper.children("."+x.params.slideClass),x.snapGrid=[],x.slidesGrid=[],x.slidesSizesGrid=[];var t,a=x.params.spaceBetween,n=-x.params.slidesOffsetBefore,s=0,i=0;if(void 0!==x.size){var r;"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*x.size),x.virtualSize=-a,x.rtl?x.slides.css({marginLeft:"",marginTop:""}):x.slides.css({marginRight:"",marginBottom:""}),x.params.slidesPerColumn>1&&(r=Math.floor(x.slides.length/x.params.slidesPerColumn)===x.slides.length/x.params.slidesPerColumn?x.slides.length:Math.ceil(x.slides.length/x.params.slidesPerColumn)*x.params.slidesPerColumn,"auto"!==x.params.slidesPerView&&"row"===x.params.slidesPerColumnFill&&(r=Math.max(r,x.params.slidesPerView*x.params.slidesPerColumn)));var o,g,l=x.params.slidesPerColumn,p=r/l,c=p-(x.params.slidesPerColumn*p-x.slides.length);for(t=0;t1)"column"===x.params.slidesPerColumnFill?(h=t-(d=Math.floor(t/l))*l,(d>c||d===c&&h===l-1)&&++h>=l&&(h=0,d++),f=d+h*r/l,u.css({"-webkit-box-ordinal-group":f,"-moz-box-ordinal-group":f,"-ms-flex-order":f,"-webkit-order":f,order:f})):d=t-(h=Math.floor(t/p))*p,u.css("margin-"+(x.isHorizontal()?"top":"left"),0!==h&&x.params.spaceBetween&&x.params.spaceBetween+"px").attr("data-swiper-column",d).attr("data-swiper-row",h);"none"!==u.css("display")&&("auto"===x.params.slidesPerView?(o=x.isHorizontal()?u.outerWidth(!0):u.outerHeight(!0),x.params.roundLengths&&(o=e(o))):(o=(x.size-(x.params.slidesPerView-1)*a)/x.params.slidesPerView,x.params.roundLengths&&(o=e(o)),x.isHorizontal()?x.slides[t].style.width=o+"px":x.slides[t].style.height=o+"px"),x.slides[t].swiperSlideSize=o,x.slidesSizesGrid.push(o),x.params.centeredSlides?(n=n+o/2+s/2+a,0===s&&0!==t&&(n=n-x.size/2-a),0===t&&(n=n-x.size/2-a),Math.abs(n)<.001&&(n=0),i%x.params.slidesPerGroup==0&&x.snapGrid.push(n),x.slidesGrid.push(n)):(i%x.params.slidesPerGroup==0&&x.snapGrid.push(n),x.slidesGrid.push(n),n=n+o+a),x.virtualSize+=o+a,s=o,i++)}if(x.virtualSize=Math.max(x.virtualSize,x.size)+x.params.slidesOffsetAfter,x.rtl&&x.wrongRTL&&("slide"===x.params.effect||"coverflow"===x.params.effect)&&x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}),x.support.flexbox&&!x.params.setWrapperSize||(x.isHorizontal()?x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}):x.wrapper.css({height:x.virtualSize+x.params.spaceBetween+"px"})),x.params.slidesPerColumn>1&&(x.virtualSize=(o+x.params.spaceBetween)*r,x.virtualSize=Math.ceil(x.virtualSize/x.params.slidesPerColumn)-x.params.spaceBetween,x.isHorizontal()?x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}):x.wrapper.css({height:x.virtualSize+x.params.spaceBetween+"px"}),x.params.centeredSlides)){for(g=[],t=0;t1&&x.snapGrid.push(x.virtualSize-x.size)}0===x.snapGrid.length&&(x.snapGrid=[0]),0!==x.params.spaceBetween&&(x.isHorizontal()?x.rtl?x.slides.css({marginLeft:a+"px"}):x.slides.css({marginRight:a+"px"}):x.slides.css({marginBottom:a+"px"})),x.params.watchSlidesProgress&&x.updateSlidesOffset()}},x.updateSlidesOffset=function(){for(var t=0;tx.size&&(s=!0));for(a=x.activeIndex-1;a>=0;a--)x.slides[a]&&!s&&(e++,(i+=x.slides[a].swiperSlideSize)>x.size&&(s=!0))}else for(t=x.activeIndex+1;t=0&&n0&&r<=x.size||n<=0&&r>=x.size)&&x.slides.eq(e).addClass(x.params.slideVisibleClass)}s.progress=x.rtl?-i:i}}},x.updateProgress=function(t){void 0===t&&(t=x.translate||0);var a=x.maxTranslate()-x.minTranslate(),e=x.isBeginning,s=x.isEnd;0===a?(x.progress=0,x.isBeginning=x.isEnd=!0):(x.progress=(t-x.minTranslate())/a,x.isBeginning=x.progress<=0,x.isEnd=x.progress>=1),x.isBeginning&&!e&&x.emit("onReachBeginning",x),x.isEnd&&!s&&x.emit("onReachEnd",x),x.params.watchSlidesProgress&&x.updateSlidesProgress(t),x.emit("onProgress",x,x.progress)},x.updateActiveIndex=function(){var t,a,e,s=x.rtl?x.translate:-x.translate;for(a=0;a=x.slidesGrid[a]&&s=x.slidesGrid[a]&&s=x.slidesGrid[a]&&(t=a);x.params.normalizeSlideIndex&&(t<0||void 0===t)&&(t=0),(e=Math.floor(t/x.params.slidesPerGroup))>=x.snapGrid.length&&(e=x.snapGrid.length-1),t!==x.activeIndex&&(x.snapIndex=e,x.previousIndex=x.activeIndex,x.activeIndex=t,x.updateClasses(),x.updateRealIndex())},x.updateRealIndex=function(){x.realIndex=parseInt(x.slides.eq(x.activeIndex).attr("data-swiper-slide-index")||x.activeIndex,10)},x.updateClasses=function(){x.slides.removeClass(x.params.slideActiveClass+" "+x.params.slideNextClass+" "+x.params.slidePrevClass+" "+x.params.slideDuplicateActiveClass+" "+x.params.slideDuplicateNextClass+" "+x.params.slideDuplicatePrevClass);var a=x.slides.eq(x.activeIndex);a.addClass(x.params.slideActiveClass),i.loop&&(a.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+x.realIndex+'"]').addClass(x.params.slideDuplicateActiveClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+x.realIndex+'"]').addClass(x.params.slideDuplicateActiveClass));var e=a.next("."+x.params.slideClass).addClass(x.params.slideNextClass);x.params.loop&&0===e.length&&(e=x.slides.eq(0)).addClass(x.params.slideNextClass);var s=a.prev("."+x.params.slideClass).addClass(x.params.slidePrevClass);if(x.params.loop&&0===s.length&&(s=x.slides.eq(-1)).addClass(x.params.slidePrevClass),i.loop&&(e.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+e.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicateNextClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+e.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicateNextClass),s.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+s.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicatePrevClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+s.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicatePrevClass)),x.paginationContainer&&x.paginationContainer.length>0){var n,r=x.params.loop?Math.ceil((x.slides.length-2*x.loopedSlides)/x.params.slidesPerGroup):x.snapGrid.length;if(x.params.loop?((n=Math.ceil((x.activeIndex-x.loopedSlides)/x.params.slidesPerGroup))>x.slides.length-1-2*x.loopedSlides&&(n-=x.slides.length-2*x.loopedSlides),n>r-1&&(n-=r),n<0&&"bullets"!==x.params.paginationType&&(n=r+n)):n=void 0!==x.snapIndex?x.snapIndex:x.activeIndex||0,"bullets"===x.params.paginationType&&x.bullets&&x.bullets.length>0&&(x.bullets.removeClass(x.params.bulletActiveClass),x.paginationContainer.length>1?x.bullets.each((function(){t(this).index()===n&&t(this).addClass(x.params.bulletActiveClass)})):x.bullets.eq(n).addClass(x.params.bulletActiveClass)),"fraction"===x.params.paginationType&&(x.paginationContainer.find("."+x.params.paginationCurrentClass).text(n+1),x.paginationContainer.find("."+x.params.paginationTotalClass).text(r)),"progress"===x.params.paginationType){var o=(n+1)/r,l=o,p=1;x.isHorizontal()||(p=o,l=1),x.paginationContainer.find("."+x.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+l+") scaleY("+p+")").transition(x.params.speed)}"custom"===x.params.paginationType&&x.params.paginationCustomRender&&(x.paginationContainer.html(x.params.paginationCustomRender(x,n+1,r)),x.emit("onPaginationRendered",x,x.paginationContainer[0]))}x.params.loop||(x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.isBeginning?(x.prevButton.addClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.disable(x.prevButton)):(x.prevButton.removeClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.enable(x.prevButton))),x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.isEnd?(x.nextButton.addClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.disable(x.nextButton)):(x.nextButton.removeClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.enable(x.nextButton))))},x.updatePagination=function(){if(x.params.pagination&&x.paginationContainer&&x.paginationContainer.length>0){var t="";if("bullets"===x.params.paginationType){for(var a=x.params.loop?Math.ceil((x.slides.length-2*x.loopedSlides)/x.params.slidesPerGroup):x.snapGrid.length,e=0;e";x.paginationContainer.html(t),x.bullets=x.paginationContainer.find("."+x.params.bulletClass),x.params.paginationClickable&&x.params.a11y&&x.a11y&&x.a11y.initPagination()}"fraction"===x.params.paginationType&&(t=x.params.paginationFractionRender?x.params.paginationFractionRender(x,x.params.paginationCurrentClass,x.params.paginationTotalClass):' / ',x.paginationContainer.html(t)),"progress"===x.params.paginationType&&(t=x.params.paginationProgressRender?x.params.paginationProgressRender(x,x.params.paginationProgressbarClass):'',x.paginationContainer.html(t)),"custom"!==x.params.paginationType&&x.emit("onPaginationRendered",x,x.paginationContainer[0])}},x.update=function(t){function a(){x.rtl,x.translate,e=Math.min(Math.max(x.translate,x.maxTranslate()),x.minTranslate()),x.setWrapperTranslate(e),x.updateActiveIndex(),x.updateClasses()}var e;x&&(x.updateContainerSize(),x.updateSlidesSize(),x.updateProgress(),x.updatePagination(),x.updateClasses(),x.params.scrollbar&&x.scrollbar&&x.scrollbar.set(),t?(x.controller&&x.controller.spline&&(x.controller.spline=void 0),x.params.freeMode?(a(),x.params.autoHeight&&x.updateAutoHeight()):(("auto"===x.params.slidesPerView||x.params.slidesPerView>1)&&x.isEnd&&!x.params.centeredSlides?x.slideTo(x.slides.length-1,0,!1,!0):x.slideTo(x.activeIndex,0,!1,!0))||a()):x.params.autoHeight&&x.updateAutoHeight())},x.onResize=function(t){x.params.onBeforeResize&&x.params.onBeforeResize(x),x.params.breakpoints&&x.setBreakpoint();var a=x.params.allowSwipeToPrev,e=x.params.allowSwipeToNext;x.params.allowSwipeToPrev=x.params.allowSwipeToNext=!0,x.updateContainerSize(),x.updateSlidesSize(),("auto"===x.params.slidesPerView||x.params.freeMode||t)&&x.updatePagination(),x.params.scrollbar&&x.scrollbar&&x.scrollbar.set(),x.controller&&x.controller.spline&&(x.controller.spline=void 0);var s=!1;if(x.params.freeMode){var i=Math.min(Math.max(x.translate,x.maxTranslate()),x.minTranslate());x.setWrapperTranslate(i),x.updateActiveIndex(),x.updateClasses(),x.params.autoHeight&&x.updateAutoHeight()}else x.updateClasses(),s=("auto"===x.params.slidesPerView||x.params.slidesPerView>1)&&x.isEnd&&!x.params.centeredSlides?x.slideTo(x.slides.length-1,0,!1,!0):x.slideTo(x.activeIndex,0,!1,!0);x.params.lazyLoading&&!s&&x.lazy&&x.lazy.load(),x.params.allowSwipeToPrev=a,x.params.allowSwipeToNext=e,x.params.onAfterResize&&x.params.onAfterResize(x)},x.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?x.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(x.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),x.touchEvents={start:x.support.touch||!x.params.simulateTouch?"touchstart":x.touchEventsDesktop.start,move:x.support.touch||!x.params.simulateTouch?"touchmove":x.touchEventsDesktop.move,end:x.support.touch||!x.params.simulateTouch?"touchend":x.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===x.params.touchEventsTarget?x.container:x.wrapper).addClass("swiper-wp8-"+x.params.direction),x.initEvents=function(t){var a=t?"off":"on",e=t?"removeEventListener":"addEventListener",s="container"===x.params.touchEventsTarget?x.container[0]:x.wrapper[0],n=x.support.touch?s:document,r=!!x.params.nested;if(x.browser.ie)s[e](x.touchEvents.start,x.onTouchStart,!1),n[e](x.touchEvents.move,x.onTouchMove,r),n[e](x.touchEvents.end,x.onTouchEnd,!1);else{if(x.support.touch){var o=!("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1};s[e](x.touchEvents.start,x.onTouchStart,o),s[e](x.touchEvents.move,x.onTouchMove,r),s[e](x.touchEvents.end,x.onTouchEnd,o)}(i.simulateTouch&&!x.device.ios&&!x.device.android||i.simulateTouch&&!x.support.touch&&x.device.ios)&&(s[e]("mousedown",x.onTouchStart,!1),document[e]("mousemove",x.onTouchMove,r),document[e]("mouseup",x.onTouchEnd,!1))}window[e]("resize",x.onResize),x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.nextButton[a]("click",x.onClickNext),x.params.a11y&&x.a11y&&x.nextButton[a]("keydown",x.a11y.onEnterKey)),x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.prevButton[a]("click",x.onClickPrev),x.params.a11y&&x.a11y&&x.prevButton[a]("keydown",x.a11y.onEnterKey)),x.params.pagination&&x.params.paginationClickable&&(x.paginationContainer[a]("click","."+x.params.bulletClass,x.onClickIndex),x.params.a11y&&x.a11y&&x.paginationContainer[a]("keydown","."+x.params.bulletClass,x.a11y.onEnterKey)),(x.params.preventClicks||x.params.preventClicksPropagation)&&s[e]("click",x.preventClicks,!0)},x.attachEvents=function(){x.initEvents()},x.detachEvents=function(){x.initEvents(!0)},x.allowClick=!0,x.preventClicks=function(t){x.allowClick||(x.params.preventClicks&&t.preventDefault(),x.params.preventClicksPropagation&&x.animating&&(t.stopPropagation(),t.stopImmediatePropagation()))},x.onClickNext=function(t){t.preventDefault(),x.isEnd&&!x.params.loop||x.slideNext()},x.onClickPrev=function(t){t.preventDefault(),x.isBeginning&&!x.params.loop||x.slidePrev()},x.onClickIndex=function(a){a.preventDefault();var e=t(this).index()*x.params.slidesPerGroup;x.params.loop&&(e+=x.loopedSlides),x.slideTo(e)},x.updateClickedSlide=function(a){var e=l(a,"."+x.params.slideClass),s=!1;if(e)for(var i=0;ix.slides.length-x.loopedSlides+o/2?(x.fixLoop(),r=x.wrapper.children("."+x.params.slideClass+'[data-swiper-slide-index="'+n+'"]:not(.'+x.params.slideDuplicateClass+")").eq(0).index(),setTimeout((function(){x.slideTo(r)}),0)):x.slideTo(r):r>x.slides.length-o?(x.fixLoop(),r=x.wrapper.children("."+x.params.slideClass+'[data-swiper-slide-index="'+n+'"]:not(.'+x.params.slideDuplicateClass+")").eq(0).index(),setTimeout((function(){x.slideTo(r)}),0)):x.slideTo(r)}else x.slideTo(r)}};var k,O,S,C,E,T,j,P,N,L,A,M,I="input, select, textarea, button, video",B=Date.now(),D=[];for(var z in x.animating=!1,x.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0},x.onTouchStart=function(a){if(a.originalEvent&&(a=a.originalEvent),(A="touchstart"===a.type)||!("which"in a)||3!==a.which){if(x.params.noSwiping&&l(a,"."+x.params.noSwipingClass))return void(x.allowClick=!0);if(!x.params.swipeHandler||l(a,x.params.swipeHandler)){var e=x.touches.currentX="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,s=x.touches.currentY="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY;if(!(x.device.ios&&x.params.iOSEdgeSwipeDetection&&e<=x.params.iOSEdgeSwipeThreshold)){if(k=!0,O=!1,S=!0,E=void 0,M=void 0,x.touches.startX=e,x.touches.startY=s,C=Date.now(),x.allowClick=!0,x.updateContainerSize(),x.swipeDirection=void 0,x.params.threshold>0&&(P=!1),"touchstart"!==a.type){var i=!0;t(a.target).is(I)&&(i=!1),document.activeElement&&t(document.activeElement).is(I)&&document.activeElement.blur(),i&&a.preventDefault()}x.emit("onTouchStart",x,a)}}}},x.onTouchMove=function(a){if(a.originalEvent&&(a=a.originalEvent),!A||"mousemove"!==a.type){if(a.preventedByNestedSwiper)return x.touches.startX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,void(x.touches.startY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY);if(x.params.onlyExternal)return x.allowClick=!1,void(k&&(x.touches.startX=x.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,x.touches.startY=x.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,C=Date.now()));if(A&&x.params.touchReleaseOnEdges&&!x.params.loop)if(x.isHorizontal()){if(x.touches.currentXx.touches.startX&&x.translate>=x.minTranslate())return}else if(x.touches.currentYx.touches.startY&&x.translate>=x.minTranslate())return;if(A&&document.activeElement&&a.target===document.activeElement&&t(a.target).is(I))return O=!0,void(x.allowClick=!1);if(S&&x.emit("onTouchMove",x,a),!(a.targetTouches&&a.targetTouches.length>1)){var e;if(x.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,x.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,void 0===E)x.isHorizontal()&&x.touches.currentY===x.touches.startY||!x.isHorizontal()&&x.touches.currentX===x.touches.startX?E=!1:(e=180*Math.atan2(Math.abs(x.touches.currentY-x.touches.startY),Math.abs(x.touches.currentX-x.touches.startX))/Math.PI,E=x.isHorizontal()?e>x.params.touchAngle:90-e>x.params.touchAngle);if(E&&x.emit("onTouchMoveOpposite",x,a),void 0===M&&(x.touches.currentX===x.touches.startX&&x.touches.currentY===x.touches.startY||(M=!0)),k){if(E)return void(k=!1);if(M){x.allowClick=!1,x.emit("onSliderMove",x,a),a.preventDefault(),x.params.touchMoveStopPropagation&&!x.params.nested&&a.stopPropagation(),O||(i.loop&&x.fixLoop(),j=x.getWrapperTranslate(),x.setWrapperTransition(0),x.animating&&x.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),x.params.autoplay&&x.autoplaying&&(x.params.autoplayDisableOnInteraction?x.stopAutoplay():x.pauseAutoplay()),L=!1,!x.params.grabCursor||!0!==x.params.allowSwipeToNext&&!0!==x.params.allowSwipeToPrev||x.setGrabCursor(!0)),O=!0;var s=x.touches.diff=x.isHorizontal()?x.touches.currentX-x.touches.startX:x.touches.currentY-x.touches.startY;s*=x.params.touchRatio,x.rtl&&(s=-s),x.swipeDirection=s>0?"prev":"next",T=s+j;var n=!0;if(s>0&&T>x.minTranslate()?(n=!1,x.params.resistance&&(T=x.minTranslate()-1+Math.pow(-x.minTranslate()+j+s,x.params.resistanceRatio))):s<0&&Tj&&(T=j),x.params.threshold>0){if(!(Math.abs(s)>x.params.threshold||P))return void(T=j);if(!P)return P=!0,x.touches.startX=x.touches.currentX,x.touches.startY=x.touches.currentY,T=j,void(x.touches.diff=x.isHorizontal()?x.touches.currentX-x.touches.startX:x.touches.currentY-x.touches.startY)}x.params.followFinger&&((x.params.freeMode||x.params.watchSlidesProgress)&&x.updateActiveIndex(),x.params.freeMode&&(0===D.length&&D.push({position:x.touches[x.isHorizontal()?"startX":"startY"],time:C}),D.push({position:x.touches[x.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),x.updateProgress(T),x.setWrapperTranslate(T))}}}}},x.onTouchEnd=function(a){if(a.originalEvent&&(a=a.originalEvent),S&&x.emit("onTouchEnd",x,a),S=!1,k){x.params.grabCursor&&O&&k&&(!0===x.params.allowSwipeToNext||!0===x.params.allowSwipeToPrev)&&x.setGrabCursor(!1);var i,e=Date.now(),s=e-C;if(x.allowClick&&(x.updateClickedSlide(a),x.emit("onTap",x,a),s<300&&e-B>300&&(N&&clearTimeout(N),N=setTimeout((function(){x&&(x.params.paginationHide&&x.paginationContainer.length>0&&!t(a.target).hasClass(x.params.bulletClass)&&x.paginationContainer.toggleClass(x.params.paginationHiddenClass),x.emit("onClick",x,a))}),300)),s<300&&e-B<300&&(N&&clearTimeout(N),x.emit("onDoubleTap",x,a))),B=Date.now(),setTimeout((function(){x&&(x.allowClick=!0)}),0),!k||!O||!x.swipeDirection||0===x.touches.diff||T===j)return void(k=O=!1);if(k=O=!1,i=x.params.followFinger?x.rtl?x.translate:-x.translate:-T,x.params.freeMode){if(i<-x.minTranslate())return void x.slideTo(x.activeIndex);if(i>-x.maxTranslate())return void(x.slides.length1){var n=D.pop(),r=D.pop(),o=n.position-r.position,l=n.time-r.time;x.velocity=o/l,x.velocity=x.velocity/2,Math.abs(x.velocity)150||(new window.Date).getTime()-n.time>300)&&(x.velocity=0)}else x.velocity=0;x.velocity=x.velocity*x.params.freeModeMomentumVelocityRatio,D.length=0;var p=1e3*x.params.freeModeMomentumRatio,c=x.velocity*p,u=x.translate+c;x.rtl&&(u=-u);var f,d=!1,h=20*Math.abs(x.velocity)*x.params.freeModeMomentumBounceRatio;if(ux.minTranslate())x.params.freeModeMomentumBounce?(u-x.minTranslate()>h&&(u=x.minTranslate()+h),f=x.minTranslate(),d=!0,L=!0):u=x.minTranslate();else if(x.params.freeModeSticky){var g,m=0;for(m=0;m-u){g=m;break}u=Math.abs(x.snapGrid[g]-u)=x.params.longSwipesMs)&&(x.updateProgress(),x.updateActiveIndex()))}var v,y=0,w=x.slidesSizesGrid[0];for(v=0;v=x.slidesGrid[v]&&i=x.slidesGrid[v]&&(y=v,w=x.slidesGrid[x.slidesGrid.length-1]-x.slidesGrid[x.slidesGrid.length-2]);var _=(i-x.slidesGrid[y])/w;if(s>x.params.longSwipesMs){if(!x.params.longSwipes)return void x.slideTo(x.activeIndex);"next"===x.swipeDirection&&(_>=x.params.longSwipesRatio?x.slideTo(y+x.params.slidesPerGroup):x.slideTo(y)),"prev"===x.swipeDirection&&(_>1-x.params.longSwipesRatio?x.slideTo(y+x.params.slidesPerGroup):x.slideTo(y))}else{if(!x.params.shortSwipes)return void x.slideTo(x.activeIndex);"next"===x.swipeDirection&&x.slideTo(y+x.params.slidesPerGroup),"prev"===x.swipeDirection&&x.slideTo(y)}}},x._slideTo=function(t,a){return x.slideTo(t,a,!0,!0)},x.slideTo=function(t,a,e,s){void 0===e&&(e=!0),void 0===t&&(t=0),t<0&&(t=0),x.snapIndex=Math.floor(t/x.params.slidesPerGroup),x.snapIndex>=x.snapGrid.length&&(x.snapIndex=x.snapGrid.length-1);var i=-x.snapGrid[x.snapIndex];if(x.params.autoplay&&x.autoplaying&&(s||!x.params.autoplayDisableOnInteraction?x.pauseAutoplay(a):x.stopAutoplay()),x.updateProgress(i),x.params.normalizeSlideIndex)for(var n=0;n=Math.floor(100*x.slidesGrid[n])&&(t=n);return!(!x.params.allowSwipeToNext&&ix.translate&&i>x.maxTranslate()&&(x.activeIndex||0)!==t||(void 0===a&&(a=x.params.speed),x.previousIndex=x.activeIndex||0,x.activeIndex=t,x.updateRealIndex(),x.rtl&&-i===x.translate||!x.rtl&&i===x.translate?(x.params.autoHeight&&x.updateAutoHeight(),x.updateClasses(),"slide"!==x.params.effect&&x.setWrapperTranslate(i),1):(x.updateClasses(),x.onTransitionStart(e),0===a||x.browser.lteIE9?(x.setWrapperTranslate(i),x.setWrapperTransition(0),x.onTransitionEnd(e)):(x.setWrapperTranslate(i),x.setWrapperTransition(a),x.animating||(x.animating=!0,x.wrapper.transitionEnd((function(){x&&x.onTransitionEnd(e)})))),0)))},x.onTransitionStart=function(t){void 0===t&&(t=!0),x.params.autoHeight&&x.updateAutoHeight(),x.lazy&&x.lazy.onTransitionStart(),t&&(x.emit("onTransitionStart",x),x.activeIndex!==x.previousIndex&&(x.emit("onSlideChangeStart",x),x.activeIndex>x.previousIndex?x.emit("onSlideNextStart",x):x.emit("onSlidePrevStart",x)))},x.onTransitionEnd=function(t){x.animating=!1,x.setWrapperTransition(0),void 0===t&&(t=!0),x.lazy&&x.lazy.onTransitionEnd(),t&&(x.emit("onTransitionEnd",x),x.activeIndex!==x.previousIndex&&(x.emit("onSlideChangeEnd",x),x.activeIndex>x.previousIndex?x.emit("onSlideNextEnd",x):x.emit("onSlidePrevEnd",x))),x.params.history&&x.history&&x.history.setHistory(x.params.history,x.activeIndex),x.params.hashnav&&x.hashnav&&x.hashnav.setHash()},x.slideNext=function(t,a,e){return x.params.loop?!x.animating&&(x.fixLoop(),x.container[0].clientLeft,x.slideTo(x.activeIndex+x.params.slidesPerGroup,a,t,e)):x.slideTo(x.activeIndex+x.params.slidesPerGroup,a,t,e)},x._slideNext=function(t){return x.slideNext(!0,t,!0)},x.slidePrev=function(t,a,e){return x.params.loop?!x.animating&&(x.fixLoop(),x.container[0].clientLeft,x.slideTo(x.activeIndex-1,a,t,e)):x.slideTo(x.activeIndex-1,a,t,e)},x._slidePrev=function(t){return x.slidePrev(!0,t,!0)},x.slideReset=function(t,a,e){return x.slideTo(x.activeIndex,a,t)},x.disableTouchControl=function(){return x.params.onlyExternal=!0,!0},x.enableTouchControl=function(){return x.params.onlyExternal=!1,!0},x.setWrapperTransition=function(t,a){x.wrapper.transition(t),"slide"!==x.params.effect&&x.effects[x.params.effect]&&x.effects[x.params.effect].setTransition(t),x.params.parallax&&x.parallax&&x.parallax.setTransition(t),x.params.scrollbar&&x.scrollbar&&x.scrollbar.setTransition(t),x.params.control&&x.controller&&x.controller.setTransition(t,a),x.emit("onSetTransition",x,t)},x.setWrapperTranslate=function(t,a,n){var s=0,i=0;x.isHorizontal()?s=x.rtl?-t:t:i=t,x.params.roundLengths&&(s=e(s),i=e(i)),x.params.virtualTranslate||(x.support.transforms3d?x.wrapper.transform("translate3d("+s+"px, "+i+"px, 0px)"):x.wrapper.transform("translate("+s+"px, "+i+"px)")),x.translate=x.isHorizontal()?s:i;var r=x.maxTranslate()-x.minTranslate();(0===r?0:(t-x.minTranslate())/r)!==x.progress&&x.updateProgress(t),a&&x.updateActiveIndex(),"slide"!==x.params.effect&&x.effects[x.params.effect]&&x.effects[x.params.effect].setTranslate(x.translate),x.params.parallax&&x.parallax&&x.parallax.setTranslate(x.translate),x.params.scrollbar&&x.scrollbar&&x.scrollbar.setTranslate(x.translate),x.params.control&&x.controller&&x.controller.setTranslate(x.translate,n),x.emit("onSetTranslate",x,x.translate)},x.getTranslate=function(t,a){var e,s,i,n;return void 0===a&&(a="x"),x.params.virtualTranslate?x.rtl?-x.translate:x.translate:(i=window.getComputedStyle(t,null),window.WebKitCSSMatrix?((s=i.transform||i.webkitTransform).split(",").length>6&&(s=s.split(", ").map((function(t){return t.replace(",",".")})).join(", ")),n=new window.WebKitCSSMatrix("none"===s?"":s)):e=(n=i.MozTransform||i.OTransform||i.MsTransform||i.msTransform||i.transform||i.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===a&&(s=window.WebKitCSSMatrix?n.m41:16===e.length?parseFloat(e[12]):parseFloat(e[4])),"y"===a&&(s=window.WebKitCSSMatrix?n.m42:16===e.length?parseFloat(e[13]):parseFloat(e[5])),x.rtl&&s&&(s=-s),s||0)},x.getWrapperTranslate=function(t){return void 0===t&&(t=x.isHorizontal()?"x":"y"),x.getTranslate(x.wrapper[0],t)},x.observers=[],x.initObservers=function(){if(x.params.observeParents)for(var t=x.container.parents(),a=0;aa.length&&(x.loopedSlides=a.length);var e,s=[],i=[];for(a.each((function(e,n){var r=t(this);e=a.length-x.loopedSlides&&s.push(n),r.attr("data-swiper-slide-index",e)})),e=0;e=0;e--)x.wrapper.prepend(t(s[e].cloneNode(!0)).addClass(x.params.slideDuplicateClass))},x.destroyLoop=function(){x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass).remove(),x.slides.removeAttr("data-swiper-slide-index")},x.reLoop=function(t){var a=x.activeIndex-x.loopedSlides;x.destroyLoop(),x.createLoop(),x.updateSlidesSize(),t&&x.slideTo(a+x.loopedSlides,0,!1)},x.fixLoop=function(){var t;x.activeIndex=2*x.loopedSlides||x.activeIndex>x.slides.length-2*x.params.slidesPerView)&&(t=-x.slides.length+x.activeIndex+x.loopedSlides,t+=x.loopedSlides,x.slideTo(t,0,!1,!0))},x.appendSlide=function(t){if(x.params.loop&&x.destroyLoop(),"object"==r(t)&&t.length)for(var a=0;a'),e.append(l)),0===u.length&&(u=t('
'),e.append(u)),l.length&&(l[0].style.opacity=Math.max(-s,0)),u.length&&(u[0].style.opacity=Math.max(s,0))}e.transform("translate3d("+o+"px, "+p+"px, 0px) rotateX("+r+"deg) rotateY("+n+"deg)")}},setTransition:function(a){if(x.slides.transition(a).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(a),x.params.virtualTranslate&&0!==a){var e=!1;x.slides.eq(x.activeIndex).transitionEnd((function(){if(!e&&x&&t(this).hasClass(x.params.slideActiveClass)){e=!0,x.animating=!1;for(var a=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],s=0;s'),x.wrapper.append(a)),a.css({height:x.width+"px"})):0===(a=x.container.find(".swiper-cube-shadow")).length&&(a=t('
'),x.container.append(a)));for(var s=0;s-1&&(e=90*s+90*o,x.rtl&&(e=90*-s-90*o)),i.transform(u),x.params.cube.slideShadows){var f=x.isHorizontal()?i.find(".swiper-slide-shadow-left"):i.find(".swiper-slide-shadow-top"),d=x.isHorizontal()?i.find(".swiper-slide-shadow-right"):i.find(".swiper-slide-shadow-bottom");0===f.length&&(f=t('
'),i.append(f)),0===d.length&&(d=t('
'),i.append(d)),f.length&&(f[0].style.opacity=Math.max(-o,0)),d.length&&(d[0].style.opacity=Math.max(o,0))}}if(x.wrapper.css({"-webkit-transform-origin":"50% 50% -"+x.size/2+"px","-moz-transform-origin":"50% 50% -"+x.size/2+"px","-ms-transform-origin":"50% 50% -"+x.size/2+"px","transform-origin":"50% 50% -"+x.size/2+"px"}),x.params.cube.shadow)if(x.isHorizontal())a.transform("translate3d(0px, "+(x.width/2+x.params.cube.shadowOffset)+"px, "+-x.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+x.params.cube.shadowScale+")");else{var h=Math.abs(e)-90*Math.floor(Math.abs(e)/90),g=1.5-(Math.sin(2*h*Math.PI/360)/2+Math.cos(2*h*Math.PI/360)/2),m=x.params.cube.shadowScale,v=x.params.cube.shadowScale/g,y=x.params.cube.shadowOffset;a.transform("scale3d("+m+", 1, "+v+") translate3d(0px, "+(x.height/2+y)+"px, "+-x.height/2/v+"px) rotateX(-90deg)")}var w=x.isSafari||x.isUiWebView?-x.size/2:0;x.wrapper.transform("translate3d(0px,0,"+w+"px) rotateX("+(x.isHorizontal()?0:e)+"deg) rotateY("+(x.isHorizontal()?-e:0)+"deg)")},setTransition:function(t){x.slides.transition(t).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(t),x.params.cube.shadow&&!x.isHorizontal()&&x.container.find(".swiper-cube-shadow").transition(t)}},coverflow:{setTranslate:function(){for(var a=x.translate,e=x.isHorizontal()?-a+x.width/2:-a+x.height/2,s=x.isHorizontal()?x.params.coverflow.rotate:-x.params.coverflow.rotate,i=x.params.coverflow.depth,n=0,r=x.slides.length;n'),o.append(v)),0===y.length&&(y=t('
'),o.append(y)),v.length&&(v[0].style.opacity=c>0?c:0),y.length&&(y[0].style.opacity=-c>0?-c:0)}}x.browser.ie&&(x.wrapper[0].style.perspectiveOrigin=e+"px 50%")},setTransition:function(t){x.slides.transition(t).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(t)}}},x.lazy={initialImageLoaded:!1,loadImageInSlide:function(a,e){if(void 0!==a&&(void 0===e&&(e=!0),0!==x.slides.length)){var s=x.slides.eq(a),i=s.find("."+x.params.lazyLoadingClass+":not(."+x.params.lazyStatusLoadedClass+"):not(."+x.params.lazyStatusLoadingClass+")");!s.hasClass(x.params.lazyLoadingClass)||s.hasClass(x.params.lazyStatusLoadedClass)||s.hasClass(x.params.lazyStatusLoadingClass)||(i=i.add(s[0])),0!==i.length&&i.each((function(){var a=t(this);a.addClass(x.params.lazyStatusLoadingClass);var i=a.attr("data-background"),n=a.attr("data-src"),r=a.attr("data-srcset"),o=a.attr("data-sizes");x.loadImage(a[0],n||i,r,o,!1,(function(){if(null!=x&&x){if(i?(a.css("background-image",'url("'+i+'")'),a.removeAttr("data-background")):(r&&(a.attr("srcset",r),a.removeAttr("data-srcset")),o&&(a.attr("sizes",o),a.removeAttr("data-sizes")),n&&(a.attr("src",n),a.removeAttr("data-src"))),a.addClass(x.params.lazyStatusLoadedClass).removeClass(x.params.lazyStatusLoadingClass),s.find("."+x.params.lazyPreloaderClass+", ."+x.params.preloaderClass).remove(),x.params.loop&&e){var t=s.attr("data-swiper-slide-index");if(s.hasClass(x.params.slideDuplicateClass)){var l=x.wrapper.children('[data-swiper-slide-index="'+t+'"]:not(.'+x.params.slideDuplicateClass+")");x.lazy.loadImageInSlide(l.index(),!1)}else{var p=x.wrapper.children("."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+t+'"]');x.lazy.loadImageInSlide(p.index(),!1)}}x.emit("onLazyImageReady",x,s[0],a[0])}})),x.emit("onLazyImageLoad",x,s[0],a[0])}))}},load:function(){var a,e=x.params.slidesPerView;if("auto"===e&&(e=0),x.lazy.initialImageLoaded||(x.lazy.initialImageLoaded=!0),x.params.watchSlidesVisibility)x.wrapper.children("."+x.params.slideVisibleClass).each((function(){x.lazy.loadImageInSlide(t(this).index())}));else if(e>1)for(a=x.activeIndex;a1||x.params.lazyLoadingInPrevNextAmount&&x.params.lazyLoadingInPrevNextAmount>1){var s=x.params.lazyLoadingInPrevNextAmount,i=e,n=Math.min(x.activeIndex+i+Math.max(s,i),x.slides.length),r=Math.max(x.activeIndex-Math.max(i,s),0);for(a=x.activeIndex+e;a0&&x.lazy.loadImageInSlide(o.index());var l=x.wrapper.children("."+x.params.slidePrevClass);l.length>0&&x.lazy.loadImageInSlide(l.index())}},onTransitionStart:function(){x.params.lazyLoading&&(x.params.lazyLoadingOnTransitionStart||!x.params.lazyLoadingOnTransitionStart&&!x.lazy.initialImageLoaded)&&x.lazy.load()},onTransitionEnd:function(){x.params.lazyLoading&&!x.params.lazyLoadingOnTransitionStart&&x.lazy.load()}},x.scrollbar={isTouched:!1,setDragPosition:function(t){var a=x.scrollbar,s=(x.isHorizontal()?"touchstart"===t.type||"touchmove"===t.type?t.targetTouches[0].pageX:t.pageX||t.clientX:"touchstart"===t.type||"touchmove"===t.type?t.targetTouches[0].pageY:t.pageY||t.clientY)-a.track.offset()[x.isHorizontal()?"left":"top"]-a.dragSize/2,i=-x.minTranslate()*a.moveDivider,e=-x.maxTranslate()*a.moveDivider;se&&(s=e),s=-s/a.moveDivider,x.updateProgress(s),x.setWrapperTranslate(s,!0)},dragStart:function(t){var a=x.scrollbar;a.isTouched=!0,t.preventDefault(),t.stopPropagation(),a.setDragPosition(t),clearTimeout(a.dragTimeout),a.track.transition(0),x.params.scrollbarHide&&a.track.css("opacity",1),x.wrapper.transition(100),a.drag.transition(100),x.emit("onScrollbarDragStart",x)},dragMove:function(t){var a=x.scrollbar;a.isTouched&&(t.preventDefault?t.preventDefault():t.returnValue=!1,a.setDragPosition(t),x.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),x.emit("onScrollbarDragMove",x))},dragEnd:function(t){var a=x.scrollbar;a.isTouched&&(a.isTouched=!1,x.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout((function(){a.track.css("opacity",0),a.track.transition(400)}),1e3)),x.emit("onScrollbarDragEnd",x),x.params.scrollbarSnapOnRelease&&x.slideReset())},draggableEvents:!1!==x.params.simulateTouch||x.support.touch?x.touchEvents:x.touchEventsDesktop,enableDraggable:function(){var a=x.scrollbar,e=x.support.touch?a.track:document;t(a.track).on(a.draggableEvents.start,a.dragStart),t(e).on(a.draggableEvents.move,a.dragMove),t(e).on(a.draggableEvents.end,a.dragEnd)},disableDraggable:function(){var a=x.scrollbar,e=x.support.touch?a.track:document;t(a.track).off(a.draggableEvents.start,a.dragStart),t(e).off(a.draggableEvents.move,a.dragMove),t(e).off(a.draggableEvents.end,a.dragEnd)},set:function(){if(x.params.scrollbar){var a=x.scrollbar;a.track=t(x.params.scrollbar),x.params.uniqueNavElements&&"string"==typeof x.params.scrollbar&&a.track.length>1&&1===x.container.find(x.params.scrollbar).length&&(a.track=x.container.find(x.params.scrollbar)),a.drag=a.track.find(".swiper-scrollbar-drag"),0===a.drag.length&&(a.drag=t('
'),a.track.append(a.drag)),a.drag[0].style.width="",a.drag[0].style.height="",a.trackSize=x.isHorizontal()?a.track[0].offsetWidth:a.track[0].offsetHeight,a.divider=x.size/x.virtualSize,a.moveDivider=a.divider*(a.trackSize/x.size),a.dragSize=a.trackSize*a.divider,x.isHorizontal()?a.drag[0].style.width=a.dragSize+"px":a.drag[0].style.height=a.dragSize+"px",a.divider>=1?a.track[0].style.display="none":a.track[0].style.display="",x.params.scrollbarHide&&(a.track[0].style.opacity=0)}},setTranslate:function(){if(x.params.scrollbar){var t,a=x.scrollbar,e=(x.translate,a.dragSize);t=(a.trackSize-a.dragSize)*x.progress,x.rtl&&x.isHorizontal()?(t=-t)>0?(e=a.dragSize-t,t=0):-t+a.dragSize>a.trackSize&&(e=a.trackSize+t):t<0?(e=a.dragSize+t,t=0):t+a.dragSize>a.trackSize&&(e=a.trackSize-t),x.isHorizontal()?(x.support.transforms3d?a.drag.transform("translate3d("+t+"px, 0, 0)"):a.drag.transform("translateX("+t+"px)"),a.drag[0].style.width=e+"px"):(x.support.transforms3d?a.drag.transform("translate3d(0px, "+t+"px, 0)"):a.drag.transform("translateY("+t+"px)"),a.drag[0].style.height=e+"px"),x.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout((function(){a.track[0].style.opacity=0,a.track.transition(400)}),1e3))}},setTransition:function(t){x.params.scrollbar&&x.scrollbar.drag.transition(t)}},x.controller={LinearSpline:function(t,a){var s,i,e=function(){var t,a,e;return function(s,i){for(a=-1,t=s.length;t-a>1;)s[e=t+a>>1]<=i?a=e:t=e;return t}}();this.x=t,this.y=a,this.lastIndex=t.length-1,this.x.length,this.interpolate=function(t){return t?(i=e(this.x,t),s=i-1,(t-this.x[s])*(this.y[i]-this.y[s])/(this.x[i]-this.x[s])+this.y[s]):0}},getInterpolateFunction:function(t){x.controller.spline||(x.controller.spline=x.params.loop?new x.controller.LinearSpline(x.slidesGrid,t.slidesGrid):new x.controller.LinearSpline(x.snapGrid,t.snapGrid))},setTranslate:function(t,e){function s(a){t=a.rtl&&"horizontal"===a.params.direction?-x.translate:x.translate,"slide"===x.params.controlBy&&(x.controller.getInterpolateFunction(a),n=-x.controller.spline.interpolate(-t)),n&&"container"!==x.params.controlBy||(i=(a.maxTranslate()-a.minTranslate())/(x.maxTranslate()-x.minTranslate()),n=(t-x.minTranslate())*i+a.minTranslate()),x.params.controlInverse&&(n=a.maxTranslate()-n),a.updateProgress(n),a.setWrapperTranslate(n,!1,x),a.updateActiveIndex()}var i,n,r=x.params.control;if(Array.isArray(r))for(var o=0;o-1?"DOMMouseScroll":function(){var t="onwheel"in document;if(!t){var a=document.createElement("div");a.setAttribute("onwheel","return;"),t="function"==typeof a.onwheel}return!t&&document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")&&(t=document.implementation.hasFeature("Events.wheel","3.0")),t}()?"wheel":"mousewheel"),x.disableMousewheelControl=function(){if(!x.mousewheel.event)return!1;var a=x.container;return"container"!==x.params.mousewheelEventsTarged&&(a=t(x.params.mousewheelEventsTarged)),a.off(x.mousewheel.event,u),x.params.mousewheelControl=!1,!0},x.enableMousewheelControl=function(){if(!x.mousewheel.event)return!1;var a=x.container;return"container"!==x.params.mousewheelEventsTarged&&(a=t(x.params.mousewheelEventsTarged)),a.on(x.mousewheel.event,u),x.params.mousewheelControl=!0,!0},x.parallax={setTranslate:function(){x.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each((function(){f(this,x.progress)})),x.slides.each((function(){var a=t(this);a.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each((function(){f(this,Math.min(Math.max(a[0].progress,-1),1))}))}))},setTransition:function(a){void 0===a&&(a=x.params.speed),x.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each((function(){var e=t(this),s=parseInt(e.attr("data-swiper-parallax-duration"),10)||a;0===a&&(s=0),e.transition(s)}))}},x.zoom={scale:1,currentScale:1,isScaling:!1,gesture:{slide:void 0,slideWidth:void 0,slideHeight:void 0,image:void 0,imageWrap:void 0,zoomMax:x.params.zoomMax},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},getDistanceBetweenTouches:function(t){if(t.targetTouches.length<2)return 1;var a=t.targetTouches[0].pageX,e=t.targetTouches[0].pageY,s=t.targetTouches[1].pageX,i=t.targetTouches[1].pageY;return Math.sqrt(Math.pow(s-a,2)+Math.pow(i-e,2))},onGestureStart:function(a){var e=x.zoom;if(!x.support.gestures){if("touchstart"!==a.type||"touchstart"===a.type&&a.targetTouches.length<2)return;e.gesture.scaleStart=e.getDistanceBetweenTouches(a)}e.gesture.slide&&e.gesture.slide.length||(e.gesture.slide=t(this),0===e.gesture.slide.length&&(e.gesture.slide=x.slides.eq(x.activeIndex)),e.gesture.image=e.gesture.slide.find("img, svg, canvas"),e.gesture.imageWrap=e.gesture.image.parent("."+x.params.zoomContainerClass),e.gesture.zoomMax=e.gesture.imageWrap.attr("data-swiper-zoom")||x.params.zoomMax,0!==e.gesture.imageWrap.length)?(e.gesture.image.transition(0),e.isScaling=!0):e.gesture.image=void 0},onGestureChange:function(t){var a=x.zoom;if(!x.support.gestures){if("touchmove"!==t.type||"touchmove"===t.type&&t.targetTouches.length<2)return;a.gesture.scaleMove=a.getDistanceBetweenTouches(t)}a.gesture.image&&0!==a.gesture.image.length&&(x.support.gestures?a.scale=t.scale*a.currentScale:a.scale=a.gesture.scaleMove/a.gesture.scaleStart*a.currentScale,a.scale>a.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scalea.image.touchesStart.x)return void(a.image.isTouched=!1);if(!x.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.ya.image.touchesStart.y)return void(a.image.isTouched=!1)}t.preventDefault(),t.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentXa.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentYa.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(t,a){var e=t.zoom;if(e.gesture.image&&0!==e.gesture.image.length){if(!e.image.isTouched||!e.image.isMoved)return e.image.isTouched=!1,void(e.image.isMoved=!1);e.image.isTouched=!1,e.image.isMoved=!1;var s=300,i=300,n=e.velocity.x*s,r=e.image.currentX+n,o=e.velocity.y*i,l=e.image.currentY+o;0!==e.velocity.x&&(s=Math.abs((r-e.image.currentX)/e.velocity.x)),0!==e.velocity.y&&(i=Math.abs((l-e.image.currentY)/e.velocity.y));var p=Math.max(s,i);e.image.currentX=r,e.image.currentY=l;var c=e.image.width*e.scale,u=e.image.height*e.scale;e.image.minX=Math.min(e.gesture.slideWidth/2-c/2,0),e.image.maxX=-e.image.minX,e.image.minY=Math.min(e.gesture.slideHeight/2-u/2,0),e.image.maxY=-e.image.minY,e.image.currentX=Math.max(Math.min(e.image.currentX,e.image.maxX),e.image.minX),e.image.currentY=Math.max(Math.min(e.image.currentY,e.image.maxY),e.image.minY),e.gesture.imageWrap.transition(p).transform("translate3d("+e.image.currentX+"px, "+e.image.currentY+"px,0)")}},onTransitionEnd:function(t){var a=t.zoom;a.gesture.slide&&t.previousIndex!==t.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(a,e){var i,n,r,p,o,u,l,c,f,g,d,h,m,v,y,w,s=a.zoom;(s.gesture.slide||(s.gesture.slide=a.clickedSlide?t(a.clickedSlide):a.slides.eq(a.activeIndex),s.gesture.image=s.gesture.slide.find("img, svg, canvas"),s.gesture.imageWrap=s.gesture.image.parent("."+a.params.zoomContainerClass)),s.gesture.image&&0!==s.gesture.image.length)&&(void 0===s.image.touchesStart.x&&e?(i="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,n="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(i=s.image.touchesStart.x,n=s.image.touchesStart.y),s.scale&&1!==s.scale?(s.scale=s.currentScale=1,s.gesture.imageWrap.transition(300).transform("translate3d(0,0,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),s.gesture.slide=void 0):(s.scale=s.currentScale=s.gesture.imageWrap.attr("data-swiper-zoom")||a.params.zoomMax,e?(y=s.gesture.slide[0].offsetWidth,w=s.gesture.slide[0].offsetHeight,r=s.gesture.slide.offset().left+y/2-i,p=s.gesture.slide.offset().top+w/2-n,l=s.gesture.image[0].offsetWidth,c=s.gesture.image[0].offsetHeight,f=l*s.scale,g=c*s.scale,m=-(d=Math.min(y/2-f/2,0)),v=-(h=Math.min(w/2-g/2,0)),(o=r*s.scale)m&&(o=m),(u=p*s.scale)v&&(u=v)):(o=0,u=0),s.gesture.imageWrap.transition(300).transform("translate3d("+o+"px, "+u+"px,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+s.scale+")")))},attachEvents:function(a){var e=a?"off":"on";if(x.params.zoom){var s=(x.slides,!("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1});x.support.gestures?(x.slides[e]("gesturestart",x.zoom.onGestureStart,s),x.slides[e]("gesturechange",x.zoom.onGestureChange,s),x.slides[e]("gestureend",x.zoom.onGestureEnd,s)):"touchstart"===x.touchEvents.start&&(x.slides[e](x.touchEvents.start,x.zoom.onGestureStart,s),x.slides[e](x.touchEvents.move,x.zoom.onGestureChange,s),x.slides[e](x.touchEvents.end,x.zoom.onGestureEnd,s)),x[e]("touchStart",x.zoom.onTouchStart),x.slides.each((function(a,s){t(s).find("."+x.params.zoomContainerClass).length>0&&t(s)[e](x.touchEvents.move,x.zoom.onTouchMove)})),x[e]("touchEnd",x.zoom.onTouchEnd),x[e]("transitionEnd",x.zoom.onTransitionEnd),x.params.zoomToggle&&x.on("doubleTap",x.zoom.toggleZoom)}},init:function(){x.zoom.attachEvents()},destroy:function(){x.zoom.attachEvents(!0)}},x._plugins=[],x.plugins){var R=x.plugins[z](x,x.params[z]);R&&x._plugins.push(R)}return x.callPlugins=function(t){for(var a=0;a'),notify:function(t){var a=x.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(t))},init:function(){x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.a11y.makeFocusable(x.nextButton),x.a11y.addRole(x.nextButton,"button"),x.a11y.addLabel(x.nextButton,x.params.nextSlideMessage)),x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.a11y.makeFocusable(x.prevButton),x.a11y.addRole(x.prevButton,"button"),x.a11y.addLabel(x.prevButton,x.params.prevSlideMessage)),t(x.container).append(x.a11y.liveRegion)},initPagination:function(){x.params.pagination&&x.params.paginationClickable&&x.bullets&&x.bullets.length&&x.bullets.each((function(){var a=t(this);x.a11y.makeFocusable(a),x.a11y.addRole(a,"button"),x.a11y.addLabel(a,x.params.paginationBulletMessage.replace(/{{index}}/,a.index()+1))}))},destroy:function(){x.a11y.liveRegion&&x.a11y.liveRegion.length>0&&x.a11y.liveRegion.remove()}},x.init=function(){x.params.loop&&x.createLoop(),x.updateContainerSize(),x.updateSlidesSize(),x.updatePagination(),x.params.scrollbar&&x.scrollbar&&(x.scrollbar.set(),x.params.scrollbarDraggable&&x.scrollbar.enableDraggable()),"slide"!==x.params.effect&&x.effects[x.params.effect]&&(x.params.loop||x.updateProgress(),x.effects[x.params.effect].setTranslate()),x.params.loop?x.slideTo(x.params.initialSlide+x.loopedSlides,0,x.params.runCallbacksOnInit):(x.slideTo(x.params.initialSlide,0,x.params.runCallbacksOnInit),0===x.params.initialSlide&&(x.parallax&&x.params.parallax&&x.parallax.setTranslate(),x.lazy&&x.params.lazyLoading&&(x.lazy.load(),x.lazy.initialImageLoaded=!0))),x.attachEvents(),x.params.observer&&x.support.observer&&x.initObservers(),x.params.preloadImages&&!x.params.lazyLoading&&x.preloadImages(),x.params.zoom&&x.zoom&&x.zoom.init(),x.params.autoplay&&x.startAutoplay(),x.params.keyboardControl&&x.enableKeyboardControl&&x.enableKeyboardControl(),x.params.mousewheelControl&&x.enableMousewheelControl&&x.enableMousewheelControl(),x.params.hashnavReplaceState&&(x.params.replaceState=x.params.hashnavReplaceState),x.params.history&&x.history&&x.history.init(),x.params.hashnav&&x.hashnav&&x.hashnav.init(),x.params.a11y&&x.a11y&&x.a11y.init(),x.emit("onInit",x)},x.cleanupStyles=function(){x.container.removeClass(x.classNames.join(" ")).removeAttr("style"),x.wrapper.removeAttr("style"),x.slides&&x.slides.length&&x.slides.removeClass([x.params.slideVisibleClass,x.params.slideActiveClass,x.params.slideNextClass,x.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),x.paginationContainer&&x.paginationContainer.length&&x.paginationContainer.removeClass(x.params.paginationHiddenClass),x.bullets&&x.bullets.length&&x.bullets.removeClass(x.params.bulletActiveClass),x.params.prevButton&&t(x.params.prevButton).removeClass(x.params.buttonDisabledClass),x.params.nextButton&&t(x.params.nextButton).removeClass(x.params.buttonDisabledClass),x.params.scrollbar&&x.scrollbar&&(x.scrollbar.track&&x.scrollbar.track.length&&x.scrollbar.track.removeAttr("style"),x.scrollbar.drag&&x.scrollbar.drag.length&&x.scrollbar.drag.removeAttr("style"))},x.destroy=function(t,a){x.detachEvents(),x.stopAutoplay(),x.params.scrollbar&&x.scrollbar&&x.params.scrollbarDraggable&&x.scrollbar.disableDraggable(),x.params.loop&&x.destroyLoop(),a&&x.cleanupStyles(),x.disconnectObservers(),x.params.zoom&&x.zoom&&x.zoom.destroy(),x.params.keyboardControl&&x.disableKeyboardControl&&x.disableKeyboardControl(),x.params.mousewheelControl&&x.disableMousewheelControl&&x.disableMousewheelControl(),x.params.a11y&&x.a11y&&x.a11y.destroy(),x.params.history&&!x.params.replaceState&&window.removeEventListener("popstate",x.history.setHistoryPopState),x.params.hashnav&&x.hashnav&&x.hashnav.destroy(),x.emit("onDestroy"),!1!==t&&(x=null)},x.init(),x}};a.prototype={isSafari:function(){var t=window.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(t){return"[object Array]"===Object.prototype.toString.apply(t)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var t=document.createElement("div");return t.innerHTML="\x3c!--[if lte IE 9]>=0&&l.indexOf(">")>=0){var c="div";for(0===l.indexOf(":~]/)?(n||document).querySelectorAll(e):[document.getElementById(e.split("#")[1])],i=0;i0&&e[0].nodeType)for(i=0;i0?parseFloat(this.css("width")):null},outerWidth:function(t){return this.length>0?t?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null},height:function(){return this[0]===window?window.innerHeight:this.length>0?parseFloat(this.css("height")):null},outerHeight:function(t){return this.length>0?t?this[0].offsetHeight+parseFloat(this.css("margin-top"))+parseFloat(this.css("margin-bottom")):this[0].offsetHeight:null},offset:function(){if(this.length>0){var t=this[0],a=t.getBoundingClientRect(),e=document.body,s=t.clientTop||e.clientTop||0,i=t.clientLeft||e.clientLeft||0,n=window.pageYOffset||t.scrollTop,r=window.pageXOffset||t.scrollLeft;return{top:a.top+n-s,left:a.left+r-i}}return null},css:function(t,a){var e;if(1===arguments.length){if("string"!=typeof t){for(e=0;es-1?new t([]):a<0?new t((e=s+a)<0?[]:[this[e]]):new t([this[a]])},append:function(a){var e,s;for(e=0;e=0;s--)this[e].insertBefore(i.childNodes[s],this[e].childNodes[0])}else if(a instanceof t)for(s=0;s1)for(var i=0;i1)for(var i=0;i0?e?this[0].nextElementSibling&&a(this[0].nextElementSibling).is(e)?[this[0].nextElementSibling]:[]:this[0].nextElementSibling?[this[0].nextElementSibling]:[]:[])},nextAll:function(e){var s=[],i=this[0];if(!i)return new t([]);for(;i.nextElementSibling;){var n=i.nextElementSibling;e?a(n).is(e)&&s.push(n):s.push(n),i=n}return new t(s)},prev:function(e){return new t(this.length>0?e?this[0].previousElementSibling&&a(this[0].previousElementSibling).is(e)?[this[0].previousElementSibling]:[]:this[0].previousElementSibling?[this[0].previousElementSibling]:[]:[])},prevAll:function(e){var s=[],i=this[0];if(!i)return new t([]);for(;i.previousElementSibling;){var n=i.previousElementSibling;e?a(n).is(e)&&s.push(n):s.push(n),i=n}return new t(s)},parent:function(t){for(var e=[],s=0;s0?t?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null})),window.Swiper=a}(),t.exports=window.Swiper},1557:function(t,e,n){"use strict";n(731)},1558:function(t,e,n){"use strict";n(732)},234:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Constants=e.PaymentService=e.OrderDataService=e.OrderService=e.CategoryService=e.UserBaseService=e.UserService=e.SupplyService=void 0;var r=v(n(711)),o=v(n(360)),l=v(n(362)),c=v(n(713)),f=v(n(1530)),d=v(n(714)),h=v(n(1532)),m=v(n(363));function v(t){return t&&t.__esModule?t:{default:t}}e.SupplyService=r.default,e.UserService=l.default,e.UserBaseService=c.default,e.CategoryService=o.default,e.OrderService=f.default,e.OrderDataService=d.default,e.PaymentService=h.default,e.Constants=m.default},256:function(t,e,n){"use strict";var r=n(1),o=n(95),l=n(38);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(){f=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,desc){t[e]=desc.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",d=o.asyncIterator||"@@asyncIterator",h=o.toStringTag||"@@toStringTag";function m(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{m({},"")}catch(t){m=function(t,e,n){return t[e]=n}}function v(t,e,n,o){var l=e&&e.prototype instanceof _?e:_,c=Object.create(l.prototype),f=new M(o||[]);return r(c,"_invoke",{value:P(t,n,f)}),c}function y(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=v;var w={};function _(){}function x(){}function k(){}var O={};m(O,l,(function(){return this}));var S=Object.getPrototypeOf,C=S&&S(S(I([])));C&&C!==e&&n.call(C,l)&&(O=C);var E=k.prototype=_.prototype=Object.create(O);function T(t){["next","throw","return"].forEach((function(e){m(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){var o;r(this,"_invoke",{value:function(r,l){function f(){return new e((function(o,f){!function r(o,l,f,d){var h=y(t[o],t,l);if("throw"!==h.type){var m=h.arg,v=m.value;return v&&"object"==c(v)&&n.call(v,"__await")?e.resolve(v.__await).then((function(t){r("next",t,f,d)}),(function(t){r("throw",t,f,d)})):e.resolve(v).then((function(t){m.value=t,f(m)}),(function(t){return r("throw",t,f,d)}))}d(h.arg)}(r,l,o,f)}))}return o=o?o.then(f,f):f()}})}function P(t,e,n){var r="suspendedStart";return function(o,l){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw l;return B()}for(n.method=o,n.arg=l;;){var c=n.delegate;if(c){var f=N(c,n);if(f){if(f===w)continue;return f}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var d=y(t,e,n);if("normal"===d.type){if(r=n.done?"completed":"suspendedYield",d.arg===w)continue;return{value:d.arg,done:n.done}}"throw"===d.type&&(r="completed",n.method="throw",n.arg=d.arg)}}}function N(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,N(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),w;var o=y(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,w;var l=o.arg;return l?l.done?(e[t.resultName]=l.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,w):l:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,w)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function I(t){if(t){var e=t[l];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function e(){for(;++i=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),f=n.call(o,"finallyLoc");if(c&&f){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--i){var e=this.tryEntries[i];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),A(e),w}},catch:function(t){for(var i=this.tryEntries.length-1;i>=0;--i){var e=this.tryEntries[i];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var r=n.arg;A(e)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:I(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),w}},t}function d(t,e,n,r,o,l,c){try{var f=t[l](c),d=f.value}catch(t){return void n(t)}f.done?e(d):Promise.resolve(d).then(r,o)}function h(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var l=t.apply(e,n);function c(t){d(l,r,o,c,f,"next",t)}function f(t){d(l,r,o,c,f,"throw",t)}c(void 0)}))}}var m=Object(r.Create)({name:"HomeRightBar",services:[o.a],props:{hideCsButton:{type:Boolean,default:!0}},data:function(){return{showBackTop:!1,imSessions:[],hideImButton:!1,hnUser:{},ysfLoaded:!1}},computed:{unreadMsg:function(){if(this.imSessions&&this.imSessions.length){var t=0;return this.imSessions.forEach((function(e){return t+=e.unread})),t}return 0}},onInit:function(){var t=this;return h(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.ysfLoad(),t.$auth.ticket&&(l.a.init().then((function(e){t.hideImButton=!1===e.enter})),l.a.on("session",(function(e){t.imSessions=e})));case 2:case"end":return e.stop()}}),e)})))()},methods:{goBackTop:function(){window.scrollTo({top:0,behavior:"smooth"})},goIm:function(){this.$auth.ticket?window.open("".concat(this.$config.m,"/html/im/#/PcIm")):this.$auth.actionLogin().then((function(){location.reload()}))},goCs:function(){var t=this;return h(f().mark((function e(){var n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.$auth.ticket){e.next=11;break}if(!t.hnUser.hnUserId){e.next=4;break}return e.abrupt("return",t.ysfOpen());case 4:return e.next=6,t.$service.layoutHead.queryUserInfo();case 6:n=e.sent,t.hnUser=n,t.ysfOpen(),e.next=12;break;case 11:t.$auth.actionLogin().then((function(){location.reload()}));case 12:case"end":return e.stop()}}),e)})))()},ysfOpen:function(){var t=this.hnUser,e=t.linkMan,n=void 0===e?"":e,r=t.hnUserId;ysf("config",{uid:void 0===r?"":r,name:n,success:function(t){console.log("__success__",t)},error:function(t){console.log("__error__",t)}}),ysf("open")},ysfLoad:function(){var t,e,n,r=this;t=window,e=document,t.ysf=t.ysf||function(){(t.ysf.a=t.ysf.a||[]).push(arguments)},(n=e.createElement("script")).async=!1,n.src="http://qiyukf.com/script/4220f037ab100ce0b7188635f2bdb46c.js",e.body.appendChild(n),ysf("onready",(function(t){r.ysfLoaded=!0}))}}}),v=(n(1543),n(2)),component=Object(v.a)(m,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"fixed-bg"},[t.hideImButton?t._e():e("div",{staticClass:"IM-btn",on:{click:t.goIm}},[e("div",{staticStyle:{position:"relative"}},[t.unreadMsg?e("div",{staticClass:"r-num"},[t._v(t._s(t.unreadMsg))]):t._e(),t._v(" "),t._m(0),t._v("\n 聊生意\n ")])]),t._v(" "),t.hideCsButton&&t.ysfLoaded?e("div",{staticClass:"IM-btn CS-btn",on:{click:t.goCs}},[t._m(1)]):t._e(),t._v(" "),e("div",{staticClass:"back-btm",class:t.showBackTop?"back-btm-bg":"",on:{click:t.goBackTop,mouseleave:function(e){t.showBackTop=!1}}},[e("div",{staticClass:"flex-c"},[e("div",[t.showBackTop?e("span",{staticClass:"s1"},[t._v("返回顶部")]):t._e()]),t._v(" "),e("div",{on:{mouseover:function(e){t.showBackTop=!0}}},[e("i",{staticClass:"iconfont icon-pc-fanhuidingbu"})])])])])}),[function(){var t=this._self._c;this._self._setupProxy;return t("div",{staticClass:"lsy-icon"},[t("i",{staticClass:"iconfont icon-liaoshengyi"})])},function(){var t=this._self._c;this._self._setupProxy;return t("div",{staticStyle:{position:"relative"}},[t("div",{staticClass:"lsy-icon"},[t("i",{staticClass:"iconfont icon-kehufuwu"})]),this._v("\n 在线客服\n ")])}],!1,null,"0a464bc0",null);e.a=component.exports},264:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=y(n(40)),o=y(n(23)),l=y(n(17)),c=y(n(20)),f=y(n(31)),d=y(n(32)),h=n(1),m=y(n(712)),v=y(n(204));function y(t){return t&&t.__esModule?t:{default:t}}var w=function(t){function e(){return(0,l.default)(this,e),(0,f.default)(this,(e.__proto__||(0,o.default)(e)).apply(this,arguments))}return(0,d.default)(e,t),(0,c.default)(e,[{key:"isSupport",value:function(){return void 0!==window&&void 0!==window.hnSso}},{key:"onReady",value:function(){return this.get()}},{key:"get",value:function(){var t=this;return this.isSupport()?(this._checkLoginPromise||(this._checkLoginPromise=this._checkLocalAuth().then((function(e){return e||new r.default((function(e){window.hnSso.sendAction("checkLogin").then((function(n){e(t.set(n))})).catch((function(t){console.error(t),e()}))}))}))),this._checkLoginPromise):r.default.reject("请引入hnSso或不要在服务端使用auth组件")}},{key:"clear",value:function(){this.hnUserId=null,this.ticket=null}},{key:"set",value:function(t){var e=t||{},n=e.hnUserId,r=e.ticket;return this.hnUserId=n,this.ticket=r,{hnUserId:n,ticket:r}}},{key:"_checkLocalAuth",value:function(){var t=this;return new r.default((function(e,n){var r=t.$env,o=t.hnUserId,l=t.ticket;if(o&&l)return e({hnUserId:o,ticket:l});if(!r.inApp){if(-1!==location.search.indexOf("?")){var c=v.default.parse(location.search.substring(1)),f=c.hnUserId,d=c.ticket;if(f&&d)return e(t.set({hnUserId:f,ticket:d}))}var h=m.default.get("hnUserId"),y=m.default.get("hnUserTicket");return h&&y?e(t.set({hnUserId:h,ticket:y})):e()}var w=t.$context.installManager.$app;if(!w)return n("请引入app组件");w.onReady().then((function(){var n=w.settings,r=n.hnUserId,o=n.hnUserTicket;return t.set({hnUserId:r,ticket:o}),e({hnUserId:r,ticket:o})}))}))}},{key:"validateLogin",value:function(){var meta=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=meta.isLogin,e=meta.inApp;if(e&&e.link)this.$env.inApp||(window.location.href=e.link);else if(t)return this.actionLogin();return r.default.resolve()}},{key:"actionLogin",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"login";return this._checkLocalAuth().then((function(n){var o=n||{},l=o.hnUserId,c=o.ticket;return l&&c?{hnUserId:l,ticket:c}:t.$env.inApp&&t.$context.installManager.$app?void t.$context.installManager.$app.gotoNative("login"):(t._loginPromise||(t._loginPromise=window.hnSso.sendAction(e).then((function(e){return delete t._loginPromise,delete t._checkLoginPromise,t.set(e)})).catch((function(){return delete t._loginPromise,t.clear(),r.default.reject("")}))),t._loginPromise)}))}}]),e}(h.VueInstall);e.default=w},360:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=v(n(40)),o=v(n(423)),l=v(n(23)),c=v(n(17)),f=v(n(20)),d=v(n(31)),h=v(n(32)),m=n(1);function v(t){return t&&t.__esModule?t:{default:t}}var y=function(t){function e(){(0,c.default)(this,e);var t=(0,d.default)(this,(e.__proto__||(0,l.default)(e)).call(this));return t.categoryCache=new o.default,t.setDomainKey("banana"),t}return(0,h.default)(e,t),(0,f.default)(e,[{key:"find",value:function(code){var t=this,e=code||"ALL_CATEGORY_KEY",n=this.categoryCache.get(e);if(n)return r.default.resolve(n);var o=code?{cateId:code}:{parentId:0};return this.send({domainKey:"pigsy",contentType:"form",url:code?"/supply-mono-data/api/category/three/level/list/by/id":"/supply-mono-data/api/category/list/by/parent",data:o}).then((function(n){var r=n||[];return code&&(r=[],m.Core.array.sortGroupByFirstChar((m.Core._.isArray(n)?n:n.categorys)||[],"pinyin").map((function(t){r=r.concat({name:t.char,inLine:!0},t.list)}))),r.length&&t.categoryCache.set(e,r),r}))}},{key:"findHsww",value:function(code){var t=this,e=code||"ALL_CATEGORY_KEY",n=this.categoryCache.get(e);if(n)return r.default.resolve(n);var o=code?{parentId:code}:{level:0};return this.send({domainKey:"hsww",contentType:"form",url:code?"/supply-mono-data/hsww/category/list/by/parent":"/supply-mono-data/hsww/category/list/by/level",data:o}).then((function(n){var r=n||[];return code&&(r=[],m.Core.array.sortGroupByFirstChar((m.Core._.isArray(n)?n:n.categorys)||[],"pinyin").map((function(t){r=r.concat({name:t.char,inLine:!0},t.list)}))),r.length&&t.categoryCache.set(e,r),r}))}},{key:"findKeyword",value:function(t){return t?this.send({domainKey:"monk",url:"/recq/query/v488/searchSug",data:{count:30,keyword:t}}).then((function(t){return t})):r.default.resolve([])}},{key:"findBreeds",value:function(t){return this.send({domainKey:"pigsy",contentType:"form",url:"/pisces/api/get/breed/and/attr/by/cateid",data:{cateId:t}})}},{key:"getUnits",value:function(t){return this.send({domainKey:"pigsy",contentType:"form",url:"/supply-mono-data/api/category/unit/list/by/cate",data:{cateId:t}})}},{key:"autoCategoryComplete",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return this.send({domainKey:"monk",method:"get",url:"/autoComplete/v1/autoCompleteCate",params:{count:e,keyword:t}}).then((function(t){return t.forEach((function(t){t.text=[t.cateName1,t.cateName3].join("-")})),t}))}},{key:"findBreedSpecOrUnitList",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[this.findBreeds(t)];return e&&n.push(this.getUnits(t)),r.default.all(n).then((function(t){var n=t[0],r=n.breeds,o=n.specifications,l=n.cateName,c=r&&!!r.length,f=o&&!!o.length;return{breeds:r,specifications:o,units:e&&t.length>1?t[1]:[],showBreed:c,showSpec:f,cateName:l}}))}}]),e}(m.Service);y.prototype.$eid="CategoryService",e.default=y},362:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=x(n(40)),o=x(n(53)),l=x(n(23)),c=x(n(17)),f=x(n(20)),d=x(n(31)),h=x(n(1525)),m=x(n(32)),v=n(1),y=x(n(363)),w=x(n(1529)),_=x(n(4));function x(t){return t&&t.__esModule?t:{default:t}}var k=function(t){function e(){return(0,c.default)(this,e),(0,d.default)(this,(e.__proto__||(0,l.default)(e)).apply(this,arguments))}return(0,m.default)(e,t),(0,f.default)(e,[{key:"init",value:function(){this.user=new w.default(this.$context)}},{key:"getId",value:function(){return this.user.getId()}},{key:"getTicket",value:function(){return this.user.getTicket()}},{key:"send",value:function(t){var n=this;return this.checkLogin()&&(t.data=(0,o.default)(t.data||{},{ticket:this.user.getTicket()})),t.login?this.goToLogin().then((function(){return t.data=(0,o.default)(t.data||{},{ticket:n.user.getTicket()}),(0,h.default)(e.prototype.__proto__||(0,l.default)(e.prototype),"send",n).call(n,t).catch((function(t){if(500101===t.errorCode)n.doLogout(),n.goToLogin();else{if(711007!==t.errorCode)return r.default.reject(t);n.doLogout()}}))})):(0,h.default)(e.prototype.__proto__||(0,l.default)(e.prototype),"send",this).call(this,t)}},{key:"getUserInfo",value:function(){var t=this;return this.user.isEmpty()?r.default.resolve():this.user.getInfo()?r.default.resolve(this.user.getInfo()):this.send({login:!0,domainKey:"pigsy",method:"POST",url:"userbasic/api/auth/users/getLoginUserInfo"}).then((function(e){return t.user.setInfo(e),r.default.resolve(e)})).catch((function(t){return console.error("获取用户信息失败",t),r.default.resolve()}))}},{key:"sendCode",value:function(t){var e=this,n=t.mobile,r=t.captcha,o=t.deviceId,l=t.channel,c=t.isGateway,f=t.from;return this.send({domainKey:c?"banana":"",url:c?"/user/access/send/login/sms":"/api/code/get",data:{from:f||3,captcha:r,mobile:n,deviceNo:o,sourceChannel:l||3}}).then((function(t){return e.accountNotExist=!t.isExist,t}))}},{key:"loginOrRegister",value:function(t){var e=this,n=t.mobile,code=t.code,r=t.deviceId,o=t.from,l=t.channel;return this[this.accountNotExist?"register":"fastLogin"]({mobile:n,code:code,deviceId:r,from:o,channel:l}).then((function(t){return e.user.setLoginInfo(t)}))}},{key:"fastLogin",value:function(t){var e=t.mobile,code=t.code,n=t.deviceId,r=t.from;return this.send({domainKey:"banana",url:"/user/access/fast/login",data:{userAccount:e,from:r||3,deviceNo:n,smsCode:code}})}},{key:"register",value:function(t){var e=t.mobile,code=t.code,n=t.deviceId,r=t.from,o=t.channel;return this.send({domainKey:"banana",url:"/user/access/register",data:{mobile:e,regFrom:r||1,regChannel:o||2,smsCode:code,deviceId:n}})}},{key:"checkLogin",value:function(){return!this.user.isEmpty()}},{key:"goToLogin",value:function(){if(this.checkLogin())return r.default.resolve();if(this.$context.$env.inApp){this.$context.installManager.$app.gotoNative("login","")}else{if(_.default.prototype.$rm&&_.default.prototype.$rm.$router)return _.default.prototype.$rm.push("/login"),new r.default((function(t){window.resolveLoginPromise=t}));location.href="http://www.lianlianny.com/agricprod/lib/files/login"}}},{key:"doLogout",value:function(){this.checkLogin()&&(this.send({isToastError:!1,domainKey:"pigsy",contentType:"form",url:"/userbasic/api/loginout",data:{outtype:2}}),this.user.clear(),this.$context.eventManager.fire(y.default.EVENT_LOGOUT))}}]),e}(v.Service);k.prototype.$eid="UserService",e.default=k},363:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(72),l=(r=o)&&r.__esModule?r:{default:r};e.default=(0,l.default)({},{EVENT_LOGOUT:"$logout",EVENT_ORDER_UPDATE:"$order-update",EVENT_ORDER_CANCEL:"$order-cancel",EVENT_ORDER_DO_CANCEL:"$order-do-cancel",EVENT_ORDER_CONFIRM:"$order-confirm",EVENT_ORDER_DO_CONFIRM:"$order-do-confirm"})},38:function(t,e,n){"use strict";var r=n(1);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var i=0;i=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),f=n.call(o,"finallyLoc");if(c&&f){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--i){var e=this.tryEntries[i];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),A(e),v}},catch:function(t){for(var i=this.tryEntries.length-1;i>=0;--i){var e=this.tryEntries[i];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var r=n.arg;A(e)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:I(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),v}},t}function k(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function O(t){for(var i=1;i3?r.splice(3,r.length-1):[],void 0!==this.listeners[t]?this.listeners[t].push({scope:n,callback:e,args:r}):this.listeners[t]=[{scope:n,callback:e,args:r}]}},{key:"once",value:function(t,e,n){for(var r=[],o=arguments.length,i=0;i3?r.splice(3,r.length-1):[],void 0!==this.listeners[t]?this.listeners[t].push({scope:n,callback:e,args:r,once:!0}):this.listeners[t]=[{scope:n,callback:e,args:r,once:!0}]}},{key:"un",value:function(t,e,n){if(void 0!==this.listeners[t]){for(var r=this.listeners[t].length,o=[],i=0;i2?r.splice(2,r.length-1):[],r=[n].concat(r),void 0!==this.listeners[t])for(var l=this.listeners[t].slice(),c=l.length,f=0;f0&&void 0!==arguments[0]?arguments[0]:{},n=(0,r.default)(t)||[],o=n.length?t[n[0]].normal:{},l=[];return o.specs&&(l=o.specs.map((function(t){return t.prices.forEach((function(i,r){var o=e.supplySpecMap[n[0]];o&&(i.setting=o[t.specId+"_"+r]),i.setting||(i.setting={checked:!1,price:i.price,num:i.minimum||1})})),t}))),{activity:t.activity,normal:o,specs:l}}))}},{key:"setSupplySpecsMap",value:function(t,e){var n=this,r=!1;return(e=e||[]).forEach((function(e){e.prices.forEach((function(i,o){var l=(i.setting||{}).checked;r=r||l;var c=n.supplySpecMap[t];c||(c={},n.supplySpecMap[t]=c),n.supplySpecMap[t][e.specId+"_"+o]=i.setting}))})),r}},{key:"removeSupplySpecsMap",value:function(t){delete this.supplySpecMap[t]}},{key:"getSimpleDetail",value:function(t){return this.send({url:"/supply/v480/detail/for/zhuanti",data:{supplyId:t}}).then((function(t){var e=t||{},n=e.mainPicUrl400,title=e.title,desc=e.desc,r=e.fullAddress,o=e.minPrice,l=e.orgPrice,c=e.prices,f=void 0;(void 0===c?[]:c).forEach((function(t){(!f||f&&t&&f.price>t.price)&&(f=t)}));var d=f||{};return{mainPicUrl:n,title:title,desc:desc,fullAddress:r,minPrice:o,orgPrice:l,price:d.price,unit:d.unit,deletePrice:l||o}}))}},{key:"getOwnSupplyList",value:function(t){var e=t.ticket,n=void 0===e?"dacf76b8-563f-4b5d-8a82-49e00dde6c1f":e,r=t.states,o=void 0===r?"0":r,l=t.rkey;return this.send({domainKey:"banana",url:"/supply/query/own/list",contentType:"form",data:{ticket:n,states:o,rkey:l}})}},{key:"getShop",value:function(t){var e=t.hnUserId;return this.send({domainKey:"banana",url:"/supply/query/user/info",data:{hnUserId:e}})}},{key:"getOthers",value:function(t){var e=t.supplyId,n=t.hnUserId;return this.send({domainKey:"banana",url:"/supply/query/other/info",data:{supplyId:e,hnUserId:n}})}},{key:"getActivity",value:function(t){var e=t.supplyId;return this.send({domainKey:"banana",url:"/activitie/query/activitie/supplyid",data:{supplyId:e}})}},{key:"getCollect",value:function(t){var e=t.supplyId,n=t.ticket;return this.send({domainKey:"banana",url:"/user/collect/query/id",data:{productId:e,ticket:n}})}},{key:"getAssess",value:function(t){var e=t.supplyId,n=t.hnUserId;return this.send({domainKey:"banana",url:"/comment/query/comment/statistics",data:{supplyId:e,hnUserId:n}})}},{key:"getStatus",value:function(t){var e=t.supplyId,n=t.hnUserId,r=t.after,o=void 0===r?0:r,l=t.type,c=void 0===l?1:l;return this.send({headers:{v:2},url:"/zone/api/posts/related",data:{id:e,hnUserId:n,after:o,type:c}})}},{key:"getAskCount",value:function(t){var e=t.supplyId,n=t.hnUserId;return this.send({url:"/im/query/quickreply/list",data:{supplyId:e,hnUserId:n}})}},{key:"getRecommend",value:function(t){var e=t.supplyId;return this.send({domainKey:"banana",url:"/supply/query/other/list",data:{supplyId:e}})}}]),e}(n(1).Service);m.prototype.$eid="SupplyService",e.default=m},713:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=m(n(23)),o=m(n(17)),l=m(n(20)),c=m(n(31)),f=m(n(32)),d=n(1),h=m(n(362));function m(t){return t&&t.__esModule?t:{default:t}}var v=function(t){function e(){var t,n,l,f;(0,o.default)(this,e);for(var d=arguments.length,m=Array(d),v=0;v1)return e.map((function(e){return t(e)}));var c=e[0];if("string"!=typeof c.blotName&&"string"!=typeof c.attrName)throw new s("Invalid definition");if("abstract"===c.blotName)throw new s("Cannot register abstract class");if(l[c.blotName||c.attrName]=c,"string"==typeof c.keyName)u[c.keyName]=c;else if(null!=c.className&&(r[c.className]=c),null!=c.tagName){Array.isArray(c.tagName)?c.tagName=c.tagName.map((function(t){return t.toUpperCase()})):c.tagName=c.tagName.toUpperCase();var f=Array.isArray(c.tagName)?c.tagName:[c.tagName];f.forEach((function(t){null!=o[t]&&null!=c.className||(o[t]=c)}))}return c}},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},i=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var i,e=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!o)return!1;for(i in t);return void 0===i||n.call(t,i)};t.exports=function t(){var e,n,r,l,a,s,u=arguments[0],c=1,d=arguments.length,h=!1;for("boolean"==typeof u&&(h=u,u=arguments[1]||{},c=2),(null==u||"object"!=f(u)&&"function"!=typeof u)&&(u={});c1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,c.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:a(t.parent,e))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var s=function(){function t(t,e){for(var n=0;n0&&(t1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(d.default.Block);y.blotName="block",y.tagName="P",y.defaultChild="break",y.allowedChildren=[h.default,d.default.Embed,m.default],e.bubbleFormats=a,e.BlockEmbed=v,e.default=y},function(t,e,n){var r=n(54),o=n(12),i=n(2),l=n(20),a=String.fromCharCode(0),s=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};s.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==f(e)&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},s.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},s.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==f(e)&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},s.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=i(!0,{},t),"object"==f(n)){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=f(n=this.ops[e-1])))return this.ops.unshift(t),this;if(o(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==f(t.attributes)&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==f(t.attributes)&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},s.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},s.prototype.filter=function(t){return this.ops.filter(t)},s.prototype.forEach=function(t){this.ops.forEach(t)},s.prototype.map=function(t){return this.ops.map(t)},s.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(r){(t(r)?e:n).push(r)})),[e,n]},s.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},s.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+l.length(e):e.delete?t-e.delete:t}),0)},s.prototype.length=function(){return this.reduce((function(t,e){return t+l.length(e)}),0)},s.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=l.iterator(this.ops),o=0;o0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},s.prototype.diff=function(t,e){if(this.ops===t.ops)return new s;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),i=new s,u=r(n[0],n[1],e),c=l.iterator(this.ops),f=l.iterator(t.ops);return u.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(f.peekLength(),e),i.push(f.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var a=c.next(n),s=f.next(n);o(a.insert,s.insert)?i.retain(n,l.attributes.diff(a.attributes,s.attributes)):i.push(s).delete(n)}e-=n}})),i.chop()},s.prototype.eachLine=function(t,e){e=e||"\n";for(var n=l.iterator(this.ops),r=new s,o=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),a=l.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(e,a)-a:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===t(r,n.next(1).attributes||{},o))return;o+=1,r=new s}}r.length()>0&&t(r,{},o)},s.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=l.iterator(this.ops),r=l.iterator(t.ops),o=new s;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),a=n.next(i),u=r.next(i);if(a.delete)continue;u.delete?o.push(u):o.retain(i,l.attributes.transform(a.attributes,u.attributes,e))}else o.retain(l.length(n.next()));return o.chop()},s.prototype.transformPosition=function(t,e){e=!!e;for(var n=l.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),o=e.order.indexOf(n);return r>=0||o>=0?r-o:t===n?0:t0){var a,c,s=[g.default.events.TEXT_CHANGE,l,i,e];(a=this.emitter).emit.apply(a,[g.default.events.EDITOR_CHANGE].concat(s)),e!==g.default.sources.SILENT&&(c=this.emitter).emit.apply(c,s)}return l}function s(t,e,n,r,o){var i={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"===(void 0===n?"undefined":c(n))?(i=n,o=r):"string"==typeof n&&(null!=r?i[n]=r:o=n),[t,e,i,o=o||g.default.sources.API]}function u(t,e,n,r){if(null==t)return null;var o=void 0,i=void 0;if(e instanceof m.default){var l=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,r!==g.default.sources.USER)})),a=d(l,2);o=a[0],i=a[1]}else{var s=[t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),u=d(s,2);o=u[0],i=u[1]}return new _.Range(o,i-o)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var c="function"==typeof Symbol&&"symbol"==f(Symbol.iterator)?function(t){return f(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":f(t)},d=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},h=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,t),this.options=l(e,r),this.container=this.options.container,null==this.container)return C.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var o=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new g.default,this.scroll=w.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new v.default(this.scroll),this.selection=new x.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(g.default.events.EDITOR_CHANGE,(function(t){t===g.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(g.default.events.SCROLL_UPDATE,(function(t,e){var r=n.selection.lastRange,o=r&&0===r.length?r.index:void 0;a.call(n,(function(){return n.editor.update(null,e,o)}),t)}));var s=this.clipboard.convert("
"+o+"


");this.setContents(s),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return h(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),O.default.level(t)}},{key:"find",value:function(t){return t.__quill||w.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&C.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var o=t.attrName||t.blotName;"string"==typeof o?this.register("formats/"+o,t,e):Object.keys(t).forEach((function(r){n.register(r,t[r],e)}))}else null==this.imports[t]||r||C.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?w.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),h(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,o=s(t,e,n),i=d(o,4);return t=i[0],e=i[1],n=i[3],a.call(this,(function(){return r.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g.default.sources.API;return a.call(this,(function(){var r=n.getSelection(!0),i=new m.default;if(null==r)return i;if(w.default.query(t,w.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,o({},t,e));else{if(0===r.length)return n.selection.format(t,e),i;i=n.editor.formatText(r.index,r.length,o({},t,e))}return n.setSelection(r,g.default.sources.SILENT),i}),r)}},{key:"formatLine",value:function(t,e,n,r,o){var l,i=this,u=s(t,e,n,r,o),c=d(u,4);return t=c[0],e=c[1],l=c[2],o=c[3],a.call(this,(function(){return i.editor.formatLine(t,e,l)}),o,t,0)}},{key:"formatText",value:function(t,e,n,r,o){var l,i=this,u=s(t,e,n,r,o),c=d(u,4);return t=c[0],e=c[1],l=c[2],o=c[3],a.call(this,(function(){return i.editor.formatText(t,e,l)}),o,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=s(t,e),r=d(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=s(t,e),r=d(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return a.call(this,(function(){return o.editor.insertEmbed(e,n,r)}),i,e)}},{key:"insertText",value:function(t,e,n,r,o){var l,i=this,u=s(t,0,n,r,o),c=d(u,4);return t=c[0],l=c[2],o=c[3],a.call(this,(function(){return i.editor.insertText(t,e,l)}),o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,o=s(t,e,n),i=d(o,4);return t=i[0],e=i[1],n=i[3],a.call(this,(function(){return r.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API;return a.call(this,(function(){t=new m.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),o=e.editor.applyDelta(t),i=o.ops[o.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),o.delete(1)),r.compose(o)}),n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=s(e,n,r),i=d(o,4);e=i[0],n=i[1],r=i[3],this.selection.setRange(new _.Range(e,n),r),r!==g.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API,n=(new m.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.default.sources.API;return a.call(this,(function(){return t=new m.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();E.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},E.events=g.default.events,E.sources=g.default.sources,E.version="1.3.6",E.imports={delta:m.default,parchment:w.default,"core/module":y.default,"core/theme":S.default},e.expandConfig=l,e.overload=s,e.default=E},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.quill=e,this.options=n};o.DEFAULTS={},e.default=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+f(e));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(0)).default.Text);e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n1?e-1:0),r=1;r1?n-1:0),o=1;o-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=o},function(t,e,n){function r(t){return null==t}function o(t){return!(!t||"object"!=f(t)||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}var l=Array.prototype.slice,a=n(55),s=n(56),u=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=f(t)&&"object"!=f(e)?n.strict?t===e:t==e:function(t,e,n){var i,c;if(r(t)||r(e))return!1;if(t.prototype!==e.prototype)return!1;if(s(t))return!!s(e)&&(t=l.call(t),e=l.call(e),u(t,e,n));if(o(t)){if(!o(e))return!1;if(t.length!==e.length)return!1;for(i=0;i=0;i--)if(d[i]!=h[i])return!1;for(i=d.length-1;i>=0;i--)if(c=d[i],!u(t[c],e[c],n))return!1;return f(t)==f(e)}(t,e,n))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+f(e));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var a=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=function(){function t(t,e){for(var n=0;n=t+n)){var l=this.newlineIndex(t,!0)+1,a=i-l+1,s=this.isolate(l,a),u=s.next;s.format(r,o),u instanceof e&&u.formatAt(0,t-l+n-a,r,o)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(h.default,t),o=a(r,2),i=o[0],l=o[1];i.insertAt(l,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(p.default.create("text","\n")),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=p.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof p.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=u(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(d.default);v.blotName="code-block",v.tagName="PRE",v.TAB=" ",e.Code=m,e.default=v},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n-1}Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var a=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":o(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=p},function(t,e,n){"use strict";function r(t){var e=a.find(t);if(null==e)try{e=a.create(t)}catch(n){e=a.create(a.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(47),l=n(27),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return o(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.build=function(){var t=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){try{var n=r(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof a.ParchmentError)return;throw t}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){var r=this.children.find(n),o=r[0],i=r[1];return null==t.blotName&&t(o)||null!=t.blotName&&o instanceof t?[o,i]:o instanceof e?o.descendant(t,i):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var o=[],i=r;return this.children.forEachAt(n,r,(function(n,r,l){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&o.push(n),n instanceof e&&(o=o.concat(n.descendants(t,r,i))),i-=l})),o},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,(function(t,e,o){t.formatAt(e,o,n,r)}))},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),o=r[0],i=r[1];if(o)o.insertAt(i,e,n);else{var l=null==n?a.create("text",e):a.create(e,n);this.appendChild(l)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new a.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=a.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),o=r[0],i=r[1],l=[[this,t]];return o instanceof e?l.concat(o.path(i,n)):(null!=o&&l.push([o,i]),l)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),(function(t,r,o){t=t.split(r,e),n.appendChild(t)})),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,o=[],i=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(o.push.apply(o,t.addedNodes),i.push.apply(i,t.removedNodes))})),i.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=a.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),o.filter((function(t){return t.parentNode==n.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=a.find(t.nextSibling));var o=r(t);o.next==e&&null!=o.next||(null!=o.parent&&o.parent.removeChild(n),n.insertBefore(o,e||void 0))}))},e}(l.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(11),i=n(28),l=n(17),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new i.default(n.domNode),n}return r(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=a.query(t);n instanceof o.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===r.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,r){var o=t.prototype.wrap.call(this,n,r);return o instanceof e&&o.statics.scope===this.statics.scope&&this.attributes.move(o),o},e}(l.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(27),i=n(1),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t;var t},e.scope=i.Scope.INLINE_BLOT,e}(o.default);e.default=l},function(t,e,n){function r(t){this.ops=t,this.index=0,this.offset=0}var o=n(12),i=n(2),l={attributes:{compose:function(t,e,n){"object"!=f(t)&&(t={}),"object"!=f(e)&&(e={});var r=i(!0,{},e);for(var o in n||(r=Object.keys(r).reduce((function(t,e){return null!=r[e]&&(t[e]=r[e]),t}),{})),t)void 0!==t[o]&&void 0===e[o]&&(r[o]=t[o]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=f(t)&&(t={}),"object"!=f(e)&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,r){return o(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=f(t))return e;if("object"==f(e)){if(!n)return e;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new r(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=l.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},t.exports=l},function(e,n){var r=function(){"use strict";function e(t,e){return null!=e&&t instanceof e}function n(r,l,c,i,d){"object"==f(l)&&(c=l.depth,i=l.prototype,d=l.includeNonEnumerable,l=l.circular);var h=[],p=[],m=void 0!==t;return void 0===l&&(l=!0),void 0===c&&(c=1/0),function r(c,v){if(null===c)return null;if(0===v)return c;var y,w;if("object"!=f(c))return c;if(e(c,a))y=new a;else if(e(c,s))y=new s;else if(e(c,u))y=new u((function(t,e){c.then((function(e){t(r(e,v-1))}),(function(t){e(r(t,v-1))}))}));else if(n.__isArray(c))y=[];else if(n.__isRegExp(c))y=new RegExp(c.source,o(c)),c.lastIndex&&(y.lastIndex=c.lastIndex);else if(n.__isDate(c))y=new Date(c.getTime());else{if(m&&t.isBuffer(c))return y=new t(c.length),c.copy(y),y;e(c,Error)?y=Object.create(c):void 0===i?(w=Object.getPrototypeOf(c),y=Object.create(w)):(y=Object.create(i),w=i)}if(l){var b=h.indexOf(c);if(-1!=b)return p[b];h.push(c),p.push(y)}for(var g in e(c,a)&&c.forEach((function(t,e){var n=r(e,v-1),o=r(t,v-1);y.set(n,o)})),e(c,s)&&c.forEach((function(t){var e=r(t,v-1);y.add(e)})),c){var _;w&&(_=Object.getOwnPropertyDescriptor(w,g)),_&&null==_.set||(y[g]=r(c[g],v-1))}if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(c);for(g=0;g1&&void 0!==arguments[1]?arguments[1]:0;i(this,t),this.index=e,this.length=n},y=function(){function t(e,n){var r=this;i(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=c.default.create("cursor",this),this.lastRange=this.savedRange=new v(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,h.default.sources.USER),1)})),this.emitter.on(h.default.events.EDITOR_CHANGE,(function(t,e){t===h.default.events.TEXT_CHANGE&&e.length()>0&&r.update(h.default.sources.SILENT)})),this.emitter.on(h.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(h.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))}})),this.emitter.on(h.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,o=n.startNode,i=n.startOffset,l=n.endNode,a=n.endOffset;r.setNativeRange(o,i,l,a)}})),this.update(h.default.sources.SILENT)}return s(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(h.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!c.default.query(t,c.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=c.default.find(n.start.node,!1);if(null==r)return;if(r instanceof c.default.Leaf){var o=r.split(n.start.offset);r.parent.insertBefore(this.cursor,o)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,o=this.scroll.leaf(t),i=a(o,2),l=i[0],s=i[1];if(null==l)return null;var u=l.position(s,!0),c=a(u,2);r=c[0],s=c[1];var f=document.createRange();if(e>0){f.setStart(r,s);var d=this.scroll.leaf(t+e),p=a(d,2);if(l=p[0],s=p[1],null==l)return null;var h=l.position(s,!0),m=a(h,2);return r=m[0],s=m[1],f.setEnd(r,s),f.getBoundingClientRect()}var v="left",b=void 0;return r instanceof Text?(s0&&(v="right")),{bottom:b.top+b.height,height:b.height,left:b[v],right:b[v],top:b.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return m.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var r=n.map((function(t){var n=a(t,2),r=n[0],o=n[1],i=c.default.find(r,!0),l=i.offset(e.scroll);return 0===o?l:i instanceof c.default.Container?l+i.length():l+i.index(r,o)})),i=Math.min(Math.max.apply(Math,o(r)),this.scroll.length()-1),l=Math.min.apply(Math,[i].concat(o(r)));return new v(l,i-l)}},{key:"normalizeNative",value:function(t){if(!l(this.root,t.startContainer)||!t.collapsed&&!l(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],o=this.scroll.length();return n.forEach((function(t,n){t=Math.min(o-1,t);var i,l=e.scroll.leaf(t),s=a(l,2),u=s[0],c=s[1],f=u.position(c,0!==n),d=a(f,2);i=d[0],c=d[1],r.push(i,c)})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,o=this.scroll.line(Math.min(e.index,r)),l=a(o,1)[0],s=l;if(e.length>0){var u=this.scroll.line(Math.min(e.index+e.length,r));s=a(u,1)[0]}if(null!=l&&null!=s){var c=t.getBoundingClientRect();n.topc.bottom&&(t.scrollTop+=n.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(m.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=t){this.hasFocus()||this.root.focus();var l=(this.getNativeRange()||{}).native;if(null==l||o||t!==l.startContainer||e!==l.startOffset||n!==l.endContainer||r!==l.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(t,e),a.setEnd(n,r),i.removeAllRanges(),i.addRange(a)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.default.sources.API;if("string"==typeof e&&(n=e,e=!1),m.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,o(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.default.sources.USER,e=this.lastRange,n=this.getRange(),r=a(n,2),o=r[0],i=r[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,d.default)(e,this.lastRange)){var l;!this.composing&&null!=i&&i.native.collapsed&&i.start.node!==this.cursor.textNode&&this.cursor.restore();var u,s=[h.default.events.SELECTION_CHANGE,(0,f.default)(this.lastRange),(0,f.default)(e),t];(l=this.emitter).emit.apply(l,[h.default.events.EDITOR_CHANGE].concat(s)),t!==h.default.sources.SILENT&&(u=this.emitter).emit.apply(u,s)}}}]),t}();e.Range=v,e.default=y},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var s=r(n(0)),u=n(3),l=r(u),c=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+f(e));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(s.default.Container);c.allowedChildren=[l.default,u.BlockEmbed,c],e.default=c},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var l=function(){function t(t,e){for(var n=0;n1){var u=r.formats(),l=this.quill.getFormat(t.index-1,1);i=k.default.attributes.diff(u,l)||{}}}var c=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-c,c,S.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index-c,c,i,S.default.sources.USER),this.quill.focus()}}function l(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},o=0,i=this.quill.getLine(t.index),a=b(i,1)[0];if(e.offset>=a.length()-1){var s=this.quill.getLine(t.index+1),l=b(s,1)[0];if(l){var c=a.formats(),f=this.quill.getFormat(t.index,1);r=k.default.attributes.diff(c,f)||{},o=l.length()}}this.quill.deleteText(t.index,n,S.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+o-1,n,r,S.default.sources.USER)}}function c(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),o=e[e.length-1].formats();n=k.default.attributes.diff(o,r)||{}}this.quill.deleteText(t,S.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,S.default.sources.USER),this.quill.setSelection(t.index,S.default.sources.SILENT),this.quill.focus()}function d(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce((function(t,n){return O.default.query(n,O.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",r,S.default.sources.USER),this.quill.setSelection(t.index+1,S.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],S.default.sources.USER))}))}function p(t){return{key:P.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=O.default.query("code-block"),r=e.index,o=e.length,i=this.quill.scroll.descendant(n,r),l=b(i,2),a=l[0],s=l[1];if(null!=a){var u=this.quill.getIndex(a),c=a.newlineIndex(s,!0)+1,f=a.newlineIndex(u+s+o),d=a.domNode.textContent.slice(c,f).split("\n");s=0,d.forEach((function(e,i){t?(a.insertAt(c+s,n.TAB),s+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(a.deleteAt(c+s,n.TAB.length),s-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),s+=e.length+1})),this.quill.update(S.default.sources.USER),this.quill.setSelection(r,o,S.default.sources.SILENT)}}}}function h(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],S.default.sources.USER)}}}function m(t){if("string"==typeof t||"number"==typeof t)return m({key:t});if("object"===(void 0===t?"undefined":v(t))&&(t=(0,y.default)(t,!1)),"string"==typeof t.key)if(null!=P.keys[t.key.toUpperCase()])t.key=P.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[j]=t.shortKey,delete t.shortKey),t}Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var v="function"==typeof Symbol&&"symbol"==f(Symbol.iterator)?function(t){return f(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":f(t)},b=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},g=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=m(t);if(null==r||null==r.key)return T.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,_.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var r=n.which||n.keyCode,o=(t.bindings[r]||[]).filter((function(t){return e.match(n,t)}));if(0!==o.length){var i=t.quill.getSelection();if(null!=i&&t.quill.hasFocus()){var l=t.quill.getLine(i.index),a=b(l,2),s=a[0],u=a[1],c=t.quill.getLeaf(i.index),f=b(c,2),d=f[0],p=f[1],h=0===i.length?[d,p]:t.quill.getLeaf(i.index+i.length),m=b(h,2),g=m[0],y=m[1],_=d instanceof O.default.Text?d.value().slice(0,p):"",x=g instanceof O.default.Text?g.value().slice(y):"",k={collapsed:0===i.length,empty:0===i.length&&s.length()<=1,format:t.quill.getFormat(i),offset:u,prefix:_,suffix:x};o.some((function(e){if(null!=e.collapsed&&e.collapsed!==k.collapsed)return!1;if(null!=e.empty&&e.empty!==k.empty)return!1;if(null!=e.offset&&e.offset!==k.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==k.format[t]})))return!1}else if("object"===v(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=k.format[t]:!1===e.format[t]?null==k.format[t]:(0,w.default)(e.format[t],k.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(k.prefix)||null!=e.suffix&&!e.suffix.test(k.suffix)||!0===e.handler.call(t,i,k))}))&&n.preventDefault()}}}}))}}]),e}(E.default);P.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},P.DEFAULTS={bindings:{bold:h("bold"),italic:h("italic"),underline:h("underline"),indent:{key:P.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",S.default.sources.USER)}},outdent:{key:P.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",S.default.sources.USER)}},"outdent backspace":{key:P.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",S.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,S.default.sources.USER)}},"indent code-block":p(!0),"outdent code-block":p(!1),"remove tab":{key:P.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,S.default.sources.USER)}},tab:{key:P.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new x.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,S.default.sources.SILENT)}},"list empty enter":{key:P.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,S.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,S.default.sources.USER)}},"checklist enter":{key:P.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=b(e,2),r=n[0],o=n[1],i=(0,_.default)({},r.formats(),{list:"checked"}),l=(new x.default).retain(t.index).insert("\n",i).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(l,S.default.sources.USER),this.quill.setSelection(t.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:P.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),r=b(n,2),o=r[0],i=r[1],l=(new x.default).retain(t.index).insert("\n",e.format).retain(o.length()-i-1).retain(1,{header:null});this.quill.updateContents(l,S.default.sources.USER),this.quill.setSelection(t.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,r=this.quill.getLine(t.index),o=b(r,2),i=o[0],l=o[1];if(l>n)return!0;var a=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(t.index," ",S.default.sources.USER),this.quill.history.cutoff();var s=(new x.default).retain(t.index-l).delete(n+1).retain(i.length()-2-l).retain(1,{list:a});this.quill.updateContents(s,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,S.default.sources.SILENT)}},"code exit":{key:P.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=b(e,2),r=n[0],o=n[1],i=(new x.default).retain(t.index+r.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(i,S.default.sources.USER)}},"embed left":s(P.keys.LEFT,!1),"embed left shift":s(P.keys.LEFT,!0),"embed right":s(P.keys.RIGHT,!1),"embed right shift":s(P.keys.RIGHT,!0)}},e.default=P,e.SHORTKEY=j},function(t,e,n){"use strict";t.exports={align:{"":n(75),center:n(76),right:n(77),justify:n(78)},background:n(79),blockquote:n(80),bold:n(81),clean:n(82),code:n(40),"code-block":n(40),color:n(83),direction:{"":n(84),rtl:n(85)},float:{center:n(86),full:n(87),left:n(88),right:n(89)},formula:n(90),header:{1:n(91),2:n(92)},italic:n(93),image:n(94),indent:{"+1":n(95),"-1":n(96)},link:n(97),list:{ordered:n(98),bullet:n(99),check:n(100)},script:{sub:n(101),super:n(102)},strike:n(103),underline:n(104),video:n(105)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,o){var i=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var l=r.create(this.statics.scope);i.wrap(l),l.format(n,o)}},t.prototype.insertAt=function(t,e,n){var o=null==n?r.create("text",e):r.create(e,n),i=this.split(t);this.parent.insertBefore(o,i)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(11),o=n(29),i=n(30),l=n(1),a=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=o.default.keys(this.domNode),a=i.default.keys(this.domNode);e.concat(n).concat(a).forEach((function(e){var n=l.query(e,l.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=a},function(t,e,n){"use strict";function r(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){r(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(r(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(11).default);e.default=l},function(t,e,n){"use strict";function r(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[r(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[r(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[r(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(11).default);e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},u=function(){function t(t,e){for(var n=0;n '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;nr.right&&(i=r.right-o.right,this.root.style.left=e+i+"px"),o.leftr.bottom){var l=o.bottom-o.top,a=t.bottom-t.top+l;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+f(e));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var u=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,h.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,h.default.sources.USER)),this.quill.root.scrollTop=e;break;case"video":t=function(t){var e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t}(t);case"formula":if(!t)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,h.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",h.default.sources.USER),this.quill.setSelection(r+2,h.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(_.default);e.BaseTooltip=E,e.default=C},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(46)),o=n(34),a=n(36),s=n(62),l=r(n(63)),c=r(n(64)),p=n(65),f=r(p),d=n(35),h=n(24),b=n(37),g=n(38),m=r(n(39)),v=r(n(66)),y=r(n(15)),w=r(n(67)),_=r(n(68)),x=r(n(69)),k=r(n(70)),O=r(n(71)),S=n(13),C=r(S),E=r(n(72)),T=r(n(73)),j=r(n(74)),P=r(n(26)),N=r(n(16)),L=r(n(41)),A=r(n(42)),M=r(n(43)),I=r(n(107)),B=r(n(108));i.default.register({"attributors/attribute/direction":a.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":h.ColorClass,"attributors/class/direction":a.DirectionClass,"attributors/class/font":b.FontClass,"attributors/class/size":g.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":h.ColorStyle,"attributors/style/direction":a.DirectionStyle,"attributors/style/font":b.FontStyle,"attributors/style/size":g.SizeStyle},!0),i.default.register({"formats/align":o.AlignClass,"formats/direction":a.DirectionClass,"formats/indent":s.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":h.ColorStyle,"formats/font":b.FontClass,"formats/size":g.SizeClass,"formats/blockquote":l.default,"formats/code-block":C.default,"formats/header":c.default,"formats/list":f.default,"formats/bold":m.default,"formats/code":S.Code,"formats/italic":v.default,"formats/link":y.default,"formats/script":w.default,"formats/strike":_.default,"formats/underline":x.default,"formats/image":k.default,"formats/video":O.default,"formats/list/item":p.ListItem,"modules/formula":E.default,"modules/syntax":T.default,"modules/toolbar":j.default,"themes/bubble":I.default,"themes/snow":B.default,"ui/icons":P.default,"ui/picker":N.default,"ui/icon-picker":A.default,"ui/color-picker":L.default,"ui/tooltip":M.default},!0),e.default=i.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(0)),a=r(n(6)),s=n(3),u=r(s),o=r(n(14)),p=r(n(23)),l=r(n(31)),b=r(n(33)),c=r(n(5)),f=r(n(59)),d=r(n(8)),h=r(n(60)),m=r(n(61)),q=r(n(25));a.default.register({"blots/block":u.default,"blots/block/embed":s.BlockEmbed,"blots/break":o.default,"blots/container":p.default,"blots/cursor":l.default,"blots/embed":b.default,"blots/inline":c.default,"blots/scroll":f.default,"blots/text":d.default,"modules/clipboard":h.default,"modules/history":m.default,"modules/keyboard":q.default}),i.default.register(u.default,o.default,l.default,c.default,f.default,d.default),e.default=a.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var o=n.length();if(ta?n(r,t-a,Math.min(e,a+u-t)):n(r,0,Math.min(u,t+e-a)),a+=u}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),i=n(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},a=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,l),n.attach(),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,o){this.update(),t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var l=[].slice.call(this.observer.takeRecords());l.length>0;)e.push(l.pop());for(var a=function a(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[i.DATA_KEY].mutations&&(t.domNode[i.DATA_KEY].mutations=[]),e&&a(t.parent))},s=function s(t){null!=t.domNode[i.DATA_KEY]&&null!=t.domNode[i.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(s),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=i.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(a(i.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=i.find(t,!1);a(e,!1),e instanceof o.default&&e.children.forEach((function(t){a(t,!1)}))}))):"attributes"===t.type&&a(e.prev)),a(e))})),this.children.forEach(s),l=(u=[].slice.call(this.observer.takeRecords())).slice();l.length>0;)e.push(l.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=i.find(t.target,!0);return null==e?null:null==e.domNode[i.DATA_KEY].mutations?(e.domNode[i.DATA_KEY].mutations=[t],e):(e.domNode[i.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==r&&null!=t.domNode[i.DATA_KEY]&&t.update(t.domNode[i.DATA_KEY].mutations||[],n)})),null!=this.domNode[i.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[i.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=i.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),o=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach((function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,r,l){null!=this.formats()[r]||o.query(r,o.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,l):t.prototype.formatAt.call(this,e,n,r,l)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=o.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),i=n(1),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var r=i.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=i.query(n,i.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,o){null!=i.query(r,i.Scope.BLOCK)?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=i.query(n,i.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var o=this.split(e),l=i.create(n,r);o.parent.insertBefore(l,o)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=i.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,o){0===e&&n===this.length()?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=i},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),i=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=i.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=i.Scope.INLINE_BLOT,e}(o.default);e.default=l},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:o.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;i1?(0!==r&&0!==o&&(0!==(e=l(s,i))&&(n-r-o>0&&t[n-r-o-1][0]==h?t[n-r-o-1][1]+=s.substring(0,e):(t.splice(0,0,[h,s.substring(0,e)]),n++),s=s.substring(e),i=i.substring(e)),0!==(e=a(s,i))&&(t[n][1]=s.substring(s.length-e)+t[n][1],s=s.substring(0,s.length-e),i=i.substring(0,i.length-e))),0===r?t.splice(n-o,r+o,[d,s]):0===o?t.splice(n-r,r+o,[f,i]):t.splice(n-r-o,r+o,[f,i],[d,s]),n=n-r-o+(r?1:0)+(o?1:0)+1):0!==n&&t[n-1][0]==h?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,o=0,r=0,i="",s=""}""===t[t.length-1][1]&&t.pop();var c=!1;for(n=1;n=56320&&t.charCodeAt(0)<=57343},r=2;r=55296&&t.charCodeAt(t.length-1)<=56319}(t[r-2][1])&&t[r-1][0]===f&&n(t[r-1][1])&&t[r][0]===d&&n(t[r][1])&&(e=!0,t[r-1][1]=t[r-2][1].slice(-1)+t[r-1][1],t[r][1]=t[r-2][1].slice(-1)+t[r][1],t[r-2][1]=t[r-2][1].slice(0,-1));if(!e)return t;var o=[];for(r=0;r0&&o.push(t[r]);return o}(m)}function r(t,e){var r;if(!t)return[[d,e]];if(!e)return[[f,t]];var i=t.length>e.length?t:e,l=t.length>e.length?e:t,a=i.indexOf(l);if(-1!=a)return r=[[d,i.substring(0,a)],[h,l],[d,i.substring(a+l.length)]],t.length>e.length&&(r[0][0]=r[2][0]=f),r;if(1==l.length)return[[f,t],[d,e]];var u=s(t,e);if(u){var c=u[0],m=u[1],v=u[2],p=u[3],b=u[4],g=n(c,v),y=n(m,p);return g.concat([[h,b]],y)}return o(t,e)}function o(t,e){for(var n=t.length,r=e.length,o=Math.ceil((n+r)/2),l=o,a=2*o,s=new Array(a),u=new Array(a),c=0;cn)v+=2;else if(x>r)p+=2;else if(m&&(S=l+h-w)>=0&&S=(O=n-u[S]))return i(t,e,E,x)}for(var k=-y+b;k<=y-g;k+=2){for(var O,S=l+k,C=(O=k==-y||k!=y&&u[S-1]n)g+=2;else if(C>r)b+=2;else if(!m){var E;if((_=l+h-k)>=0&&_=(O=n-O))return i(t,e,E,x)}}}return[[f,t],[d,e]]}function i(t,e,r,o){var i=t.substring(0,r),l=e.substring(0,o),a=t.substring(r),s=e.substring(o),u=n(i,l),c=n(a,s);return u.concat(c)}function l(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n=t.length?[r,o,i,s,f]:null}var r=t.length>e.length?t:e,o=t.length>e.length?e:t;if(r.length<4||2*o.lengthu[4].length?s:u:s,t.length>e.length?(c=i[0],f=i[1],d=i[2],p=i[3]):(d=i[0],p=i[1],c=i[2],f=i[3]),[c,f,d,p,i[4]]):null}function c(t,e){var n=function(t,e){if(0===e)return[h,t];for(var n=0,r=0;r0&&r.splice(o+2,0,[l[0],a]),p(r,o,3)}return t}function p(t,e,n){for(var r=e+n-1;r>=0&&r>=e-1;r--)if(r+1=r&&!a.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,a);var c=e.scroll.line(t),f=u(c,2),m=f[0],p=f[1],w=(0,k.default)({},(0,v.bubbleFormats)(m));if(m instanceof y.default){var b=m.descendant(h.default.Leaf,p),_=u(b,1)[0];w=(0,k.default)(w,(0,v.bubbleFormats)(_))}l=d.default.attributes.diff(w,l)||{}}else if("object"===s(o.insert)){var x=Object.keys(o.insert)[0];if(null==x)return t;e.scroll.insertAt(t,x,o.insert[x])}r+=i}return Object.keys(l).forEach((function(n){e.scroll.formatAt(t,i,n,l[n])})),t+i}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new c.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(o){if(null==n.scroll.whitelist||n.scroll.whitelist[o]){var i=n.scroll.lines(t,Math.max(e,1)),l=e;i.forEach((function(e){var i=e.length();if(e instanceof g.default){var a=t-e.offset(n.scroll),s=e.newlineIndex(a+l)-a+1;e.formatAt(a,s,o,r[o])}else e.format(o,r[o]);l-=i}))}})),this.scroll.optimize(),this.update((new c.default).retain(t).retain(e,(0,_.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(o){n.scroll.formatAt(t,e,o,r[o])})),this.update((new c.default).retain(t).retain(e,(0,_.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new c.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((function(t){var e=u(t,1)[0];e instanceof y.default?n.push(e):e instanceof h.default.Leaf&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(h.default.Leaf,t,e));var l=[n,r].map((function(t){if(0===t.length)return{};for(var e=(0,v.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=o((0,v.bubbleFormats)(n),e)}return e}));return k.default.apply(k.default,l)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new c.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((function(o){n.scroll.formatAt(t,e.length,o,r[o])})),this.update((new c.default).retain(t).insert(e,(0,_.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===y.default.blotName&&!(t.children.length>1)&&t.children.head instanceof w.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),o=u(r,2),i=o[0],l=o[1],a=0,s=new c.default;null!=i&&(a=i instanceof g.default?i.newlineIndex(l)-l+1:i.length()-l,s=i.delta().slice(l,l+a-1).insert("\n"));var f=this.getContents(t,e+a).diff((new c.default).insert(n).concat(s)),p=(new c.default).retain(t).concat(f);return this.applyDelta(p)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(O)&&h.default.find(e[0].target)){var o=h.default.find(e[0].target),i=(0,v.bubbleFormats)(o),l=o.offset(this.scroll),a=e[0].oldValue.replace(m.default.CONTENTS,""),s=(new c.default).insert(a),u=(new c.default).insert(o.value());t=(new c.default).retain(l).concat(s.diff(u,n)).reduce((function(t,e){return e.insert?t.insert(e.insert,i):t.push(e)}),new c.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,x.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();e.default=S},function(t,e){"use strict";function n(){}function r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(){this._events=new n,this._eventsCount=0}var i=Object.prototype.hasOwnProperty,l="~";Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(l=!1)),o.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(l?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t,e){var n=l?l+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o0){if(i instanceof d.BlockEmbed||f instanceof d.BlockEmbed)return void this.optimize();if(i instanceof m.default){var h=i.newlineIndex(i.length(),!0);if(h>-1&&(i=i.split(h+1))===f)return void this.optimize()}else if(f instanceof m.default){var p=f.newlineIndex(0);p>-1&&f.split(p+1)}var v=f.children.head instanceof g.default?null:f.children.head;i.moveChildren(f,v),i.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,l){(null==this.whitelist||this.whitelist[r])&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,l),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==l.default.query(n,l.default.Scope.BLOCK)){var c=l.default.create(this.statics.defaultChild);this.appendChild(c),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),c.insertAt(0,n,r)}else{var i=l.default.create(n,r);this.appendChild(i)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===l.default.Scope.INLINE_BLOT){var r=l.default.create(this.statics.defaultChild);r.appendChild(t),t=r}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(a,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return function t(e,n,r){var o=[],i=r;return e.children.forEachAt(n,r,(function(e,n,r){a(e)?o.push(e):e instanceof l.default.Container&&(o=o.concat(t(e,n,i))),i-=r})),o}(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(c.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=c.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(c.default.events.SCROLL_BEFORE_UPDATE,n,t),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(c.default.events.SCROLL_UPDATE,n,t)}}}]),e}(l.default.Scroll);y.blotName="scroll",y.className="ql-editor",y.tagName="DIV",y.defaultChild="block",y.allowedChildren=[h.default,d.BlockEmbed,v.default],e.default=y},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e,n){return"object"===(void 0===e?"undefined":w(e))?Object.keys(e).reduce((function(t,n){return s(t,n,e[n])}),t):t.reduce((function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,k.default)({},o({},e,n),r.attributes))}),new q.default)}function u(t){return t.nodeType!==Node.ELEMENT_NODE?{}:t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function l(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length-1}function p(t,e,n){return s(n,t,!0)}function d(t,e){var n=O.default.Attributor.Attribute.keys(t),r=O.default.Attributor.Class.keys(t),o=O.default.Attributor.Style.keys(t),i={};return n.concat(r).concat(o).forEach((function(e){var n=O.default.query(e,O.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(t),i[n.attrName])||(null==(n=z[e])||n.attrName!==e&&n.keyName!==e||(i[n.attrName]=n.value(t)||void 0),null==(n=R[e])||n.attrName!==e&&n.keyName!==e||(n=R[e],i[n.attrName]=n.value(t)||void 0))})),Object.keys(i).length>0&&(e=s(e,i)),e}function h(t,e){var n=O.default.query(t);if(null==n)return e;if(n.prototype instanceof O.default.Embed){var r={},o=n.value(t);null!=o&&(r[n.blotName]=o,e=(new q.default).insert(r,n.formats(t)))}else"function"==typeof n.formats&&(e=s(e,n.blotName,n.formats(t)));return e}function m(t,e){return l(e,"\n")||(c(t)||e.length()>0&&t.nextSibling&&c(t.nextSibling))&&e.insert("\n"),e}function v(t,e){if(c(t)&&null!=t.nextElementSibling&&!l(e,"\n\n")){var n=t.offsetHeight+parseFloat(u(t).marginTop)+parseFloat(u(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function y(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!u(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&c(t.parentNode)||null!=t.previousSibling&&c(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&c(t.parentNode)||null!=t.nextSibling&&c(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var w="function"==typeof Symbol&&"symbol"==f(Symbol.iterator)?function(t){return f(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":f(t)},_=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},x=function(){function t(t,e){for(var n=0;n=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=s(e,n)),parseFloat(r.textIndent||0)>0&&(e=(new q.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=O.default.query(t);if(null==n||"list-item"!==n.blotName||!l(e,"\n"))return e;for(var r=-1,o=t.parentNode;!o.classList.contains("ql-clipboard");)"list"===(O.default.query(o)||{}).blotName&&(r+=1),o=o.parentNode;return r<=0?e:e.compose((new q.default).retain(e.length()-1).retain(1,{indent:r}))}],["b",p.bind(p,"bold")],["i",p.bind(p,"italic")],["style",function(){return new q.default}]],z=[T.AlignAttribute,L.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),R=[T.AlignStyle,j.BackgroundStyle,N.ColorStyle,L.DirectionStyle,A.FontStyle,M.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),H=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],D.concat(r.options.matchers).forEach((function(t){var e=_(t,2),o=e[0],i=e[1];(n.matchVisual||i!==v)&&r.addMatcher(o,i)})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+f(e));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),x(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\<"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[P.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new q.default).insert(n,o({},P.default.blotName,e[P.default.blotName]))}var r=this.prepareMatching(),i=_(r,2),c=i[0],a=i[1],s=function t(e,n,r){return e.nodeType===e.TEXT_NODE?r.reduce((function(t,n){return n(e,t)}),new q.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(o,l){var i=t(l,n,r);return l.nodeType===e.ELEMENT_NODE&&(i=n.reduce((function(t,e){return e(l,t)}),i),i=(l[B]||[]).reduce((function(t,e){return e(l,t)}),i)),o.concat(i)}),new q.default):new q.default}(this.container,c,a);return l(s,"\n")&&null==s.ops[s.ops.length-1].attributes&&(s=s.compose((new q.default).retain(s.length()-1).delete(1))),I.log("convert",this.container.innerHTML,s),this.container.innerHTML="",s}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,S.default.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new q.default).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),S.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new q.default).retain(n.index),o=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(S.default.sources.SILENT),setTimeout((function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,S.default.sources.USER),e.quill.setSelection(r.length()-n.length,S.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=o,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(r){var o=_(r,2),i=o[0],l=o[1];switch(i){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:e.push(l);break;default:[].forEach.call(t.container.querySelectorAll(i),(function(t){t[B]=t[B]||[],t[B].push(l)}))}})),[e,n]}}]),e}(E.default);H.DEFAULTS={matchers:[],matchVisual:!0},e.default=H,e.matchAttributor=d,e.matchBlot=h,e.matchNewline=m,e.matchSpacing=v,e.matchText=y},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function s(t){var e=t.reduce((function(t,e){return t+(e.delete||0)}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=o.default.query(t,o.default.Scope.BLOCK)})))}(t)&&(n-=1),n}Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var u=function(){function t(t,e){for(var n=0;nr&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),t=o.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(r(n(7)).default);l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=l,e.getLastChangeIndex=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var l=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(t,n){if(t instanceof d)u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=l.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(c.default);b.blotName="list",b.scope=l.default.Scope.BLOCK_BLOT,b.tagName=["OL","UL"],b.defaultChild="list-item",b.allowedChildren=[d],e.ListItem=d,e.default=b},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+f(e));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(39)).default);s.blotName="italic",s.tagName=["EM","I"],e.default=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=a(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return d.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,c.sanitize)(t,["http","https","data"])?t:"http://:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(u.default.Embed);h.blotName="image",h.tagName="IMG",e.default=h},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=a(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return d.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return c.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.BlockEmbed);h.blotName="video",h.className="ql-video",h.tagName="IFRAME",e.default=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+f(e));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var a=function(){function t(t,e){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(r(n(13)).default);b.className="ql-syntax";var g=new c.default.Attributor.Class("token","hljs",{scope:c.default.Scope.INLINE}),m=function(t){function e(t,n){o(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var l=null;return r.quill.on(d.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(l),l=setTimeout((function(){r.highlight(),l=null}),r.options.interval)})),r.highlight(),r}return l(e,t),a(e,null,[{key:"register",value:function(){d.default.register(g,!0),d.default.register(b,!0)}}]),a(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(b).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(d.default.sources.SILENT),null!=e&&this.quill.setSelection(e,d.default.sources.SILENT)}}}]),e}(h.default);m.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=b,e.CodeToken=g,e.default=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}function s(t,e,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}function u(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((function(t){if("string"==typeof t)s(n,t);else{var e=Object.keys(t)[0],r=t[e];Array.isArray(r)?function(t,e,n){var r=document.createElement("select");r.classList.add("ql-"+e),n.forEach((function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)})),t.appendChild(r)}(n,e,r):s(n,e,r)}})),t.appendChild(n)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var l=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=function(){function t(t,e){for(var n=0;n '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+f(e));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var a=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},s=function(){function t(t,e){for(var n=0;n0&&o===d.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var i=r.quill.getLines(e.index,e.length);if(1===i.length)r.position(r.quill.getBounds(e));else{var l=i[i.length-1],a=r.quill.getIndex(l),s=Math.min(l.length()-1,e.index+e.length-a),u=r.quill.getBounds(new m.Range(a,s));r.position(u)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return l(e,t),s(e,[{key:"listen",value:function(){var t=this;a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(d.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}(p.BaseTooltip);y.TEMPLATE=['','
','','',"
"].join(""),e.BubbleTooltip=y,e.default=v},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=f(e)&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+f(e));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},u=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=y}]).default},"object"==f(e)&&"object"==f(n)?n.exports=c():(o=[],void 0===(l="function"==typeof(r=c)?r.apply(e,o):r)||(n.exports=l))}).call(this,n(35).Buffer,n(65)(t))},730:function(t,e,n){},731:function(t,e,n){},732:function(t,e,n){},748:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(40),l=(r=o)&&r.__esModule?r:{default:r},c=n(1);var f=new Date,d=c.Core.convert.toBase36(f.getTime(),9),h=c.Core.convert.toBase36(c.Core.util.randomInt(0,78364164095),7),m=function(t){var e=t.$env,n=t.installManager;if(e.inApp&&n.$app){var r=n.$app;return r.onReady().then((function(){return r.settings||{}}))}return l.default.resolve()},v="S_"+d+h;e.default={"X-CLIENT-ID":function(t,e){return m(t).then((function(t){return t?t.deviceId:c.Core.util.getClientID()}))},"X-CLIENT-UA":function(t,e){return m(t).then((function(t){if(t){var e=t.appChannel,n=t.sysVersion;return[t.osType,n,e||"unknown",t.appVersion,"unknown",t.getNetworkType||"unknown"].join("|")}}))},"X-CLIENT-TICKET":function(t,e){return t.installManager.$auth.get().then((function(t){return t?t.ticket:""}))},"X-CLIENT-SID":function(t,e){return m(t).then((function(t){return t?t.sessionId:v}))},"X-CLIENT-APPID":function(t,e){var n=t.$env,r=t.config;return n.inApp?6:r.AppID||5},"X-B3-TRACEID":function(t,e){return c.Core.convert.toBase36(e.getTime(),9)+c.Core.convert.toBase36(c.Core.util.randomInt(0,78364164095),7)},"X-CLIENT-TIME":function(t,e){return e.getTime()},"X-CLIENT-PAGE":function(t,e){var n=t.routerManager.getCurrentRouter()||{};return encodeURI(n.path||location.href)},"X-HN-JOB":"If you see these message, I hope you dont hack us, I hope you can join us! Please visit http://www.cnhnkj.com/job.html","X-CLIENT-NONCE":function(){return c.Core.util.newUUID(!0)},"X-CLIENT-ENVIRONMENT":function(){return"pro"}}},749:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=h(n(40)),o=h(n(23)),l=h(n(17)),c=h(n(20)),f=h(n(31)),d=h(n(32));function h(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function e(){return(0,l.default)(this,e),(0,f.default)(this,(e.__proto__||(0,o.default)(e)).apply(this,arguments))}return(0,d.default)(e,t),(0,c.default)(e,[{key:"checkLogin",value:function(){var meta=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.$context.installManager.$auth;return t?t.validateLogin(meta):r.default.resolve()}},{key:"initEach",value:function(t){this.checkLogin(t.meta)}},{key:"beforeEach",value:function(t,e,n){this.checkLogin(t.meta).then((function(){n()}))}}]),e}(n(1).Filter);e.default=m},750:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(4)),o=c(n(1512)),l=c(n(1513));function c(t){return t&&t.__esModule?t:{default:t}}e.default={init:function(){r.default.use(o.default,{preLoad:1.3,attempt:2,filter:{concatQiniuURL:function(t,e){var n=t.src;t.src=l.default.concatQiniuURL(n);var r="http://www.lianlianny.com/agricprod/lib/files/eyejs7/avatars/img-default.jpg",o=t.el.getAttribute("type");if(o)switch(o){case"avatar":r="http://www.lianlianny.com/agricprod/lib/files/eyejs7/avatars/avatar-default.png";break;case"avatar_login":r="http://www.lianlianny.com/agricprod/lib/files/eyejs7/avatars/avatar-login.png";break;case"avatar_vip":r="http://www.lianlianny.com/agricprod/lib/files/eyejs7/avatars/avatar-vip.png"}t.loading=r,t.error=r},makerWater:function(t,e){},webp:function(t,e){e.supportWebp}}})}}},752:function(t,e,n){"use strict";var r=n(1),o=n(95);function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(){c=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,desc){t[e]=desc.value},o="function"==typeof Symbol?Symbol:{},f=o.iterator||"@@iterator",d=o.asyncIterator||"@@asyncIterator",h=o.toStringTag||"@@toStringTag";function m(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{m({},"")}catch(t){m=function(t,e,n){return t[e]=n}}function v(t,e,n,o){var l=e&&e.prototype instanceof _?e:_,c=Object.create(l.prototype),f=new M(o||[]);return r(c,"_invoke",{value:P(t,n,f)}),c}function y(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=v;var w={};function _(){}function x(){}function k(){}var O={};m(O,f,(function(){return this}));var S=Object.getPrototypeOf,C=S&&S(S(I([])));C&&C!==e&&n.call(C,f)&&(O=C);var E=k.prototype=_.prototype=Object.create(O);function T(t){["next","throw","return"].forEach((function(e){m(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){var o;r(this,"_invoke",{value:function(r,c){function f(){return new e((function(o,f){!function r(o,c,f,d){var h=y(t[o],t,c);if("throw"!==h.type){var m=h.arg,v=m.value;return v&&"object"==l(v)&&n.call(v,"__await")?e.resolve(v.__await).then((function(t){r("next",t,f,d)}),(function(t){r("throw",t,f,d)})):e.resolve(v).then((function(t){m.value=t,f(m)}),(function(t){return r("throw",t,f,d)}))}d(h.arg)}(r,c,o,f)}))}return o=o?o.then(f,f):f()}})}function P(t,e,n){var r="suspendedStart";return function(o,l){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw l;return B()}for(n.method=o,n.arg=l;;){var c=n.delegate;if(c){var f=N(c,n);if(f){if(f===w)continue;return f}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var d=y(t,e,n);if("normal"===d.type){if(r=n.done?"completed":"suspendedYield",d.arg===w)continue;return{value:d.arg,done:n.done}}"throw"===d.type&&(r="completed",n.method="throw",n.arg=d.arg)}}}function N(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,N(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),w;var o=y(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,w;var l=o.arg;return l?l.done?(e[t.resultName]=l.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,w):l:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,w)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function I(t){if(t){var e=t[f];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function e(){for(;++i=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),f=n.call(o,"finallyLoc");if(c&&f){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--i){var e=this.tryEntries[i];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),A(e),w}},catch:function(t){for(var i=this.tryEntries.length-1;i>=0;--i){var e=this.tryEntries[i];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var r=n.arg;A(e)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:I(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),w}},t}function f(t,e,n,r,o,l,c){try{var f=t[l](c),d=f.value}catch(t){return void n(t)}f.done?e(d):Promise.resolve(d).then(r,o)}var menu=[{label:"供应",value:1,path:"supply"},{label:"行情",value:2,path:"hangqing"},{label:"采购",value:3,path:"purchase"}],d=Object(r.Create)({name:"HomeSearch",services:[o.a],inject:["searchProps"],data:function(){return{dropvisi:!1,dropval:1,dropmenu:menu,keyword:"",list:[],throttle:!1}},methods:{onInput:function(){var t,e=this;return(t=c().mark((function t(){var n;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.keyword||(e.list=[]),!e.throttle){t.next=3;break}return t.abrupt("return");case 3:e.throttle=!0,n=e,setTimeout((function(){n.$service.layoutHead.queryKeyList(n.keyword).then((function(t){n.list=t||[],n.throttle=!1}))}),1e3);case 6:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var l=t.apply(e,n);function c(t){f(l,r,o,c,d,"next",t)}function d(t){f(l,r,o,c,d,"throw",t)}c(void 0)}))})()},get:function(t){13==t.keyCode&&(this.openSearch(),this.keyword="")},openSearch:function(){this.keyword.length&&(2===this.dropval?this.$link.go("market",{k:this.keyword}):3===this.dropval?this.$link.go("purchase",{k:this.keyword}):(this.$emit("goSearch"),this.$link.go("supplySearchs",{k:this.keyword})))},goFaSupply:function(){this.$auth.ticket?window.open(this.$config.merchant+"/#/supply/release"):this.$auth.actionLogin().then((function(){location.reload()}))},setDropvisi:function(){this.dropvisi=!1},handleBtnClick:function(t){t&&t.onClick?this.$emit("onClick"):this.goFaSupply()}},onInit:function(){document.addEventListener("click",this.setDropvisi),this.dropval=menu.find((function(t){return window.location.pathname.includes(t.path)}))?menu.find((function(t){return window.location.pathname.includes(t.path)})).value:1},beforeDestroy:function(){document.removeEventListener("click",this.setDropvisi)}}),h=(n(1545),n(2)),m=Object(h.a)(d,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"s-bg"},[e("div",{staticClass:"search-bg"},[t.dropvisi?e("ul",{staticClass:"s-ul"},t._l(t.dropmenu,(function(n){return e("li",{key:n.value,class:{active:t.dropval===n.value},on:{click:function(e){t.dropval=n.value}}},[e("span",[t._v(t._s(n.label))])])})),0):t._e(),t._v(" "),e("div",{staticClass:"s-l",on:{click:function(e){e.stopPropagation(),t.dropvisi=!0}}},[t._v("\n "+t._s(t.dropmenu[t.dropval-1].label)+"\n "),e("i",{staticClass:"iconfont icon-xiajiantou"})]),t._v(" "),e("div",{staticClass:"s-t"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.keyword,expression:"keyword"}],staticClass:"search-ctn",attrs:{type:"text",placeholder:"请输入您要的货品"},domProps:{value:t.keyword},on:{input:[function(e){e.target.composing||(t.keyword=e.target.value)},t.onInput],keyup:t.get}}),t._v(" "),t.list&&t.list.length?e("div",{staticClass:"result-list"},t._l(t.list,(function(n,r){return e("r-link",{key:r,staticClass:"l-item",attrs:{tag:2==t.dropval?"market":3==t.dropval?"purchase":"supplySearchs",target:"_blank",params:{k:n.bindName}}},[e("div",{staticClass:"s1"},[t._v(t._s(n.text))]),t._v(" "),e("div",{staticClass:"s2"},[t._v(t._s(n.cate1Name))])])})),1):t._e()]),t._v(" "),e("div",{staticClass:"s-r",on:{click:t.openSearch}},[t._v("搜索")])]),t._v(" "),e("div",{staticClass:"s-btn orange-c",style:t.searchProps.btn&&t.searchProps.btn.style,on:{click:function(e){return t.handleBtnClick(t.searchProps.btn)}}},[t._v("\n "+t._s(t.searchProps.btn&&t.searchProps.btn.text?t.searchProps.btn.text:"免费发商品")+"\n ")])])}),[],!1,null,"1283d1d6",null).exports,v=n(54);function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function w(){w=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,desc){t[e]=desc.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",f=o.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function h(t,e,n,o){var l=e&&e.prototype instanceof _?e:_,c=Object.create(l.prototype),f=new M(o||[]);return r(c,"_invoke",{value:P(t,n,f)}),c}function m(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var v={};function _(){}function x(){}function k(){}var O={};d(O,l,(function(){return this}));var S=Object.getPrototypeOf,C=S&&S(S(I([])));C&&C!==e&&n.call(C,l)&&(O=C);var E=k.prototype=_.prototype=Object.create(O);function T(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){var o;r(this,"_invoke",{value:function(r,l){function c(){return new e((function(o,c){!function r(o,l,c,f){var d=m(t[o],t,l);if("throw"!==d.type){var h=d.arg,v=h.value;return v&&"object"==y(v)&&n.call(v,"__await")?e.resolve(v.__await).then((function(t){r("next",t,c,f)}),(function(t){r("throw",t,c,f)})):e.resolve(v).then((function(t){h.value=t,c(h)}),(function(t){return r("throw",t,c,f)}))}f(d.arg)}(r,l,o,c)}))}return o=o?o.then(c,c):c()}})}function P(t,e,n){var r="suspendedStart";return function(o,l){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw l;return B()}for(n.method=o,n.arg=l;;){var c=n.delegate;if(c){var f=N(c,n);if(f){if(f===v)continue;return f}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var d=m(t,e,n);if("normal"===d.type){if(r=n.done?"completed":"suspendedYield",d.arg===v)continue;return{value:d.arg,done:n.done}}"throw"===d.type&&(r="completed",n.method="throw",n.arg=d.arg)}}}function N(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,N(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=m(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var l=o.arg;return l?l.done?(e[t.resultName]=l.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,v):l:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function I(t){if(t){var e=t[l];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function e(){for(;++i=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),f=n.call(o,"finallyLoc");if(c&&f){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--i){var e=this.tryEntries[i];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),A(e),v}},catch:function(t){for(var i=this.tryEntries.length-1;i>=0;--i){var e=this.tryEntries[i];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var r=n.arg;A(e)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:I(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),v}},t}function _(t,e,n,r,o,l,c){try{var f=t[l](c),d=f.value}catch(t){return void n(t)}f.done?e(d):Promise.resolve(d).then(r,o)}function x(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var l=t.apply(e,n);function c(t){_(l,r,o,c,f,"next",t)}function f(t){_(l,r,o,c,f,"throw",t)}c(void 0)}))}}var k=Object(r.Create)({name:"HomeHead",props:{barActive:{type:[String,Number],default:0},noSearch:{type:Boolean,default:!1},headStyle:{type:Object,default:function(){return{}}},hideTuliu:{type:Boolean,default:!1},needCustomSearch:{type:Boolean,default:!1},needCustomMidLayout:{type:Boolean,default:!1}},services:[o.a],components:{HomeSearch:m},onInit:function(){var t=this;return x(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.$auth.ticket&&(t.isLogin=!0,t.$service.layoutHead.queryUserInfo().then((function(e){t.hnUser=e||{}}))),e.next=4,t.queryCateList();case 4:t.currentPageTag=window&&window.location.pathname.includes("purchase")?"purchase":"supplySearchs";case 5:case"end":return e.stop()}}),e)})))()},data:function(){return{isLogin:!1,hnUser:{},hotCate:[],buyState:!1,sellState:!1,currentPageTag:"",buyBarList:["买家中心","收货中心","订单管理","优惠券"],sellBarList:["卖家中心","成长中心","订单管理","商品管理","营销管理","店铺管理"],navBar:[{name:"首页",tag:"index"},{name:"供应大厅",tag:"supply"},{name:"采购大厅",tag:"purchase"},{name:"惠农大数据",tag:"bigdata"},{name:"行情大厅",tag:"market"},{name:"行业资讯",tag:"hnzx"},{name:"农技学堂",tag:"xt"},{name:"严选商城",tag:"yanxuan"},{name:"农批通",tag:"trade"}]}},methods:{tabHome:function(t){var e=v.a.getUrl(t.tag);this.$peach.logEvent("home_tab",{name:t.name,type:"pc",url:e})},goToBigData:function(t){window.open("http://www.lianlianny.com/agricprod/html/hbd/#/")},goLogin:function(){this.$auth.actionLogin().then((function(){location.reload()}))},logout:function(){var t=this;window.hnSso.sendAction("logout").then((function(){location.reload()})).catch((function(e){t.$toast&&t.$toast({title:e||"退出登录失败",icon:"error"})}))},gotoLink:function(t,e){var n=this;return x(w().mark((function r(){var o;return w().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n.$auth.ticket){r.next=5;break}return r.next=4,n.goLogin();case 4:return r.abrupt("return");case 5:if("seller"!==t){r.next=22;break}return r.prev=6,r.next=9,n.$service.layoutHead.queryShopAuth();case 9:if(r.t0=r.sent,r.t0){r.next=12;break}r.t0={};case 12:if(r.t0.shopId){r.next=16;break}return n.$toast("您尚未开通惠农网店铺,开店之后才能使用此功能!"),r.abrupt("return");case 16:r.next=22;break;case 18:return r.prev=18,r.t1=r.catch(6),500102===r.t1.code?n.$toast("您尚未开通惠农网店铺,开店之后才能使用此功能!"):n.$toast("".concat(r.t1.msg)),r.abrupt("return");case 22:if("caigouguanli"!=(o={buyer:["/user","/user/address/","/user/orders","/user/coupon"],seller:["/#/indexs","http://daxue.www.lianlianny.com/agricprod","/#/order/list","/#/supply/list","/#/active/list","#/shop/banner"]})[t][e]){r.next=26;break}return n.$toast("功能开发中..."),r.abrupt("return");case 26:if("http://daxue.www.lianlianny.com/agricprod"!=o[t][e]){r.next=29;break}return window.open(o[t][e]),r.abrupt("return");case 29:window.open(("buyer"==t?n.$config.pc:n.$config.merchant)+o[t][e]);case 30:case"end":return r.stop()}}),r,null,[[6,18]])})))()},queryCateList:function(){var t=this;this.$service.layoutHead.queryHotCate().then((function(e){t.hotCate=e||[]}))}}}),O=(n(1546),Object(h.a)(k,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"com-bg"},[e("div",{staticClass:"h-t-bg",style:t.headStyle},[e("div",{staticClass:"h-t-c"},[e("div",{staticClass:"l-h-t-c"},[e("r-link",{staticClass:"l-i",attrs:{target:"_blank",href:"http://www.lianlianny.com/agricprod"}},[e("i",{staticClass:"iconfont icon-shouji"}),t._v("\n 手机版\n ")]),t._v(" "),e("div",{staticClass:"l-it f-c"},[t._v("欢迎来到惠农网!")]),t._v(" "),t.isLogin?e("div",{staticClass:"f-c"},[e("div",{staticClass:"link-man"},[t._v(t._s(t.hnUser.showName))]),t._v(" "),e("div",{staticClass:"logout-btn",on:{click:t.logout}},[t._v("退出")])]):e("div",{staticClass:"f-c",on:{click:t.goLogin}},[e("div",{staticClass:"l-l"},[t._v("请登录")]),t._v(" "),e("div",{staticClass:"l-f"},[t._v("免费注册")])])],1),t._v(" "),e("div",{staticClass:"r-h-t-c"},[e("div",{staticClass:"bar",class:t.buyState?"bar-bg":"",on:{mouseleave:function(e){t.buyState=!1}}},t._l(t.buyBarList,(function(n,r){return(t.buyState?t.buyState:0===r)?e("div",{staticClass:"cascade-bar f-c",style:t.headStyle,on:{click:function(e){return t.gotoLink("buyer",r)},mouseover:function(e){t.buyState=!0}}},[t._v("\n "+t._s(n)),0===r?e("i",{staticClass:"iconfont",class:t.buyState?"icon-xialacaidan-shouqi":"icon-xialacaidan"}):t._e()]):t._e()})),0),t._v(" "),e("div",{staticClass:"bar",class:t.sellState?"bar-bg":"",on:{mouseleave:function(e){t.sellState=!1}}},t._l(t.sellBarList,(function(n,r){return(t.sellState?t.sellState:0===r)?e("div",{staticClass:"cascade-bar f-c",style:t.headStyle,on:{click:function(e){return t.gotoLink("seller",r)},mouseover:function(e){t.sellState=!0}}},[t._v("\n "+t._s(n)),0===r?e("i",{staticClass:"iconfont",class:t.sellState?"icon-xialacaidan-shouqi":"icon-xialacaidan"}):t._e()]):t._e()})),0)])])]),t._v(" "),t.noSearch?t._e():e("div",{staticClass:"h-c-bg"},[t.needCustomMidLayout?t._t("custom-h-c-c",null,{attrs:t.$attrs,listeners:t.$listeners}):e("div",{staticClass:"h-c-c"},[e("r-link",{staticClass:"l-h-c-c",attrs:{tag:"index"}},[e("img",{staticClass:"hn-logo",attrs:{src:n(1544),alt:"惠农网"}})]),t._v(" "),e("div",{staticClass:"search-bg"},[e("div",{staticClass:"s-ctn"},[t.needCustomSearch?t._t("custom-search",null,{attrs:t.$attrs,listeners:t.$listeners}):e("HomeSearch",t._g({},t.$listeners))],2),t._v(" "),t.hotCate&&t.hotCate.length?e("div",{staticClass:"hot-cate-list f-c"},t._l(t.hotCate,(function(n){return e("r-link",{key:n.cateName,staticClass:"cate-items",attrs:{tag:t.currentPageTag,target:"_blank",rel:"nofollow",params:{k:n.cateName}}},[t._v(t._s(n.cateName))])})),1):t._e()]),t._v(" "),t._m(0)],1)],2),t._v(" "),t.noSearch?t._e():e("div",{staticClass:"h-b-bg"},[e("div",{staticClass:"h-b-c"},[e("div",{staticClass:"l-h-b-c"},[t._l(t.navBar,(function(n,r){return e("div",{key:r,staticClass:"tab-items",on:{click:function(e){return t.tabHome(n)}}},["bigdata"===n.tag?e("a",{attrs:{href:"/bigdata/",target:"_blank"},on:{click:function(e){return e.preventDefault(),t.goToBigData(n)}}},[e("img",{staticClass:"items-img",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/eye7/pcsite/new-icon.png",alt:""}}),t._v("\n "+t._s(n.name)+"\n ")]):e("r-link",{staticClass:"items-a",class:{"tab-items-a":t.barActive==r},attrs:{target:"_blank",rel:n.nofollow?"nofollow":"",tag:n.tag}},["yanxuan"===n.tag?e("img",{attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/eye7/pcsite/wom-icon.png",alt:""}}):t._e(),t._v("\n "+t._s(n.name)+"\n ")])],1)})),t._v(" "),t.hideTuliu?t._e():e("div",{staticClass:"tab-items"},[e("r-link",{staticClass:"items-a",attrs:{target:"_blank",href:"http://www.tuliu.com/?spm=hnw"}},[e("img",{attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/eye7/pcsite/partner-icon.png",alt:""}}),t._v("\n 土流网\n ")])],1)],2)])])])}),[function(){var t=this._self._c;this._self._setupProxy;return t("div",{staticClass:"QR-bg"},[t("div",{staticClass:"app-qr"},[t("img",{attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/common/appdownload_qr.png",alt:""}})]),this._v(" "),t("div",{staticClass:"t1"},[this._v("下载惠农网APP")]),this._v(" "),t("div",{staticClass:"t1"},[this._v("手机询价,沟通更方便")])])}],!1,null,"71d7ce4c",null).exports),S=Object(r.Create)({name:"HomeFoot",services:[o.a],props:{isHome:{type:Boolean,default:!1},friendLink:Array,default:function(){return[]}},onInit:function(){},data:function(){return{helpOption:[{title:"新手指南",icon:"icon-xinshouzhinan",helpList:[{name:"注册账户",link:"http://www.lianlianny.com/agricprod/login/",nofollow:!0},{name:"平台功能",link:"http://www.cnhnkj.com/app.html#h2-1",nofollow:!0},{name:"在线交易",link:"http://www.lianlianny.com/agricprod/zhuanti/zxjyzt_hn/",nofollow:!0},{name:"买家保障",link:"http://wx.mobile.www.lianlianny.com/agricprod/mango/pro/specialpage/page/propaganda3/index.html",nofollow:!0}]},{title:"产品服务",icon:"icon-kehufuwu",helpList:[{name:"找供应",link:"http://www.lianlianny.com/agricprod/supply/"},{name:"找采购",link:"http://www.lianlianny.com/agricprod/purchase/"},{name:"看行情",link:"http://www.lianlianny.com/agricprod/hangqing/"},{name:"发布供应",link:"http://www.lianlianny.com/agricprod/app/download/",nofollow:!0},{name:"一件代发",link:"http://www.lianlianny.com/agricprod/html/zhuanti/friends/yjdf_special",nofollow:!0}]},{title:"合作联系",icon:"icon-pingtaishengming",helpList:[{name:"客户服务 400-008-8688"},{name:"商务洽谈 0731-88189999"},{name:"媒体合作 0731-88189999"},{name:"惠农网知识产权综合服务平台",link:"http://www.lianlianny.com/agricprod/knowledge/"},{name:"惠农网乡村振兴合作专区",link:"http://www.lianlianny.com/agricprod/xczx/"}]},{title:"关于惠农",icon:"icon-guanyuhuinong",helpList:[{name:"关于我们",link:"http://www.cnhnkj.com/about.html"},{name:"惠农大事件",link:"http://www.cnhnkj.com/about.html#h2-3",nofollow:!0},{name:"服务协议",link:"http://www.lianlianny.com/agricprod/html/zhuanti/privacy/?id=1",nofollow:!0},{name:"隐私政策",link:"http://www.lianlianny.com/agricprod/html/zhuanti/privacy/?id=3",nofollow:!0},{name:"规则说明",link:"http://www.lianlianny.com/agricprod/mango/pro/help-center/help-list",nofollow:!0}]}]}}}),C=(n(1547),Object(h.a)(S,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",[e("div",{staticClass:"com-bg"},[e("div",{staticClass:"btm-t"},t._l(t.helpOption,(function(n){return e("div",{staticClass:"l-item-bg"},[e("div",{staticClass:"help-t"},[e("i",{staticClass:"iconfont",class:n.icon}),t._v("\n "+t._s(n.title)+"\n ")]),t._v(" "),e("div",{staticClass:"help-list"},t._l(n.helpList,(function(link){return e("a",{staticClass:"h-i",attrs:{href:link.link,target:"_blank",rel:link.nofollow?"nofollow":"",title:link.tel?link.tel:link.name}},[t._v(t._s(link.name))])})),0)])})),0)]),t._v(" "),e("div",{staticClass:"btm-b-bg"},[e("div",{staticClass:"btm-b"},[t.friendLink&&t.friendLink.length?e("div",{staticClass:"btm-b-t flex-c"},[e("div",{staticClass:"link-items"},[t._v("友情链接:")]),t._v(" "),t._l(t.friendLink,(function(link){return e("r-link",{key:link.url,staticClass:"link-items",attrs:{href:link.url,target:"_blank"}},[t._v(t._s(link.name))])}))],2):t._e(),t._v(" "),e("div",{staticClass:"t-bg"},[e("r-link",{staticClass:"s1",attrs:{href:"http://beian.miit.gov.cn/",rel:"nofollow",target:"_blank"}},[t._v("湘ICP备2021010693号-1")]),t._v(" "),e("r-link",{staticClass:"s1",attrs:{href:"http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=43010202001359",rel:"nofollow",target:"_blank"}},[e("img",{staticClass:"wgn-icon",attrs:{src:n(722),alt:""}}),t._v("\n 湘公网安备 43010202001359号")]),t._v(" "),e("r-link",{staticClass:"s1",attrs:{href:"http://113.247.223.7:7001/index",rel:"nofollow",target:"_blank"}},[e("img",{staticClass:"wgn-icon",attrs:{src:n(722),alt:""}}),t._v("\n 长沙网安数字警务室")]),t._v(" "),e("r-link",{staticClass:"s1",attrs:{href:"http://www.lianlianny.com/agricprod/lib/image/image/png/miniapp/2020/09/09/6f7b987700e143679859fe77d1acf6ad.png",rel:"nofollow",target:"_blank"}},[t._v("增值电信业务经营许可证:湘B2-20130072")]),t._v(" "),e("r-link",{staticClass:"s1",attrs:{href:"http://www.lianlianny.com/agricprod/lib/image/image/png/miniapp/2020/09/09/738c928898874eeea79d2f2d06fc1689.png",rel:"nofollow",target:"_blank"}},[t._v("营业执照")]),t._v(" "),e("r-link",{staticClass:"s1",attrs:{href:"http://www.lianlianny.com/agricprod/lib/image/image/png/miniapp/2020/09/09/8926affe5c3a487a8320cbb0f7ea99f1.png",rel:"nofollow",target:"_blank"}},[t._v("食品经营许可证:JY14301020285067(1-1)")]),t._v(" "),e("div",{staticClass:"s1",attrs:{title:"党建引领惠农农业行业“护廉网”建设,您的任何意见可通过这里反馈给我们"}},[t._v("护廉网:9145908@qq.com")]),t._v(" "),e("r-link",{staticClass:"s1",attrs:{href:"http://www.lianlianny.com/agricprod/lib/image/image/tos/test/png/2024/11/07/a82597354e8e4d67a6ed3de8418c7e42.png",rel:"nofollow",target:"_blank"}},[t._v("互联网药品信息服务资格证书:(湘)-非经营性-2024-0076")]),t._v(" "),e("r-link",{staticClass:"s1",attrs:{href:"http://www.lianlianny.com/agricprod/lib/image/app/icon/test/2023gbds01.png",rel:"nofollow",target:"_blank"}},[t._v("广播电视节目制作经营证书 (湘)长字第00184号")]),t._v(" "),e("div",{staticClass:"s1"},[t._v("互联网违法和不良信息举报中心:电话12377 邮箱:jubao@12377.cn")]),t._v(" "),e("div",{staticClass:"s1"},[t._v("©2013-2023 湖南惠农科技有限公司 版权所有")]),t._v(" "),e("div",{staticClass:"s1"},[t._v("客服热线:400-008-8688")])],1)])])])}),[],!1,null,"7a80bef9",null).exports),E=n(256),T=Object(r.Create)({name:"pc-layout",props:{barActive:{type:[String,Number],default:0},noSearch:{type:Boolean,default:!1},headStyle:{type:Object,default:function(){return{}}},showRightFixed:{type:Boolean,default:!1},hideTuliu:{type:Boolean,default:!1},friendLink:{type:Array,default:function(){return[]}},searchProps:{type:Object,default:function(){return{}}},needCustomSearch:{type:Boolean,default:!1},needCustomMidLayout:{type:Boolean,default:!1}},components:{HomeHead:O,HomeFoot:C,HomeRightBar:E.a},onInit:function(){},provide:function(){return{searchProps:this.searchProps}}}),j=Object(h.a)(T,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticStyle:{background:"#f5f5f5"}},[e("HomeHead",t._g({attrs:{barActive:t.barActive,hideTuliu:t.hideTuliu,headStyle:t.headStyle,noSearch:t.noSearch,searchProps:t.searchProps,needCustomSearch:t.needCustomSearch,needCustomMidLayout:t.needCustomMidLayout},scopedSlots:t._u([{key:"custom-search",fn:function(e){return[t._t("custom-search-slot",null,{headComProps:e})]}},{key:"custom-h-c-c",fn:function(){return[t._t("custom-logo-area")]},proxy:!0}],null,!0)},t.$listeners)),t._v(" "),t._t("default"),t._v(" "),e("HomeFoot",{attrs:{isHome:0==t.barActive,friendLink:t.friendLink}}),t._v(" "),e("HomeRightBar",{directives:[{name:"show",rawName:"v-show",value:t.showRightFixed,expression:"showRightFixed"}]})],2)}),[],!1,null,"056c0eee",null).exports,P={props:{value:{},content:{type:String,default:""},remark:{type:String,default:""},word:{type:String,default:""},title:{type:String,default:""},showCancelBtn:Boolean,showConfirmBtn:Boolean,cancelBtnText:String,confirmBtnText:String},data:function(){return{showMask:!1}},methods:{show:function(p){var t=this;return Object.assign(this,{showCancelBtn:!1,showConfirmBtn:!1,cancelBtnText:"",confirmBtnText:"",title:"",word:"",remark:"",content:""},p,{showMask:!0}),new Promise((function(e){t.resolve=e}))},onClose:function(t){var e=t?"confirm":"cancel";this.$emit("close",e),this.resolve(e),this.showMask=!1}},mounted:function(){this.showMask=this.value},watch:{value:function(t,e){this.showMask=t},showMask:function(t){this.$emit("input",t)}},computed:{numbers:function(){if(this.word)return this.word.substr(0,3)+" "+this.word.substr(3,4)+" "+this.word.substr(7,4)}}},dialog=(n(1548),Object(h.a)(P,(function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"show",rawName:"v-show",value:t.showMask,expression:"showMask"}],staticClass:"dialog"},[e("div",{staticClass:"dialog-container"},[e("div",{staticStyle:{"padding-bottom":"10px"}},[e("div",{staticClass:"dialog-title"},[t._v(t._s(t.title)),e("span",{staticClass:"close-btn",on:{click:function(e){return t.onClose()}}},[t._v("×")])]),t._v(" "),t.content?e("div",{staticClass:"content",domProps:{innerHTML:t._s(t.content)}}):t._e(),t._v(" "),t.remark?e("div",{staticClass:"remark",domProps:{innerHTML:t._s(t.remark)}}):t._e(),t._v(" "),t.word?e("div",{staticClass:"data-word",domProps:{innerHTML:t._s(t.numbers)}}):t._e()]),t._v(" "),t.showCancelBtn||t.showConfirmBtn?e("div",{staticClass:"new-btns"},[t.showCancelBtn?e("div",{staticClass:"btn-cancel",on:{click:function(e){return t.onClose()}}},[t._v("\n "+t._s(t.cancelBtnText)+"\n ")]):t._e(),t._v(" "),t.showCancelBtn&&t.showConfirmBtn?e("div",{staticClass:"spacer"}):t._e(),t._v(" "),t.showConfirmBtn?e("div",{staticClass:"btn-confirm",on:{click:function(e){return t.onClose(1)}}},[t._v("\n "+t._s(t.confirmBtnText)+"\n ")]):t._e()]):t._e()])])}),[],!1,null,"719a83f2",null).exports),N={install:function(t){var e;t.prototype.$showDialog=function(n){return e||(e=new(t.extend(dialog))({el:document.createElement("div")}),document.body.appendChild(e.$el)),e.show(n)},t.use(dialog)}};function L(t){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{};param.groupId=e.group?e.group.neteaseGroupId:"",param.dialingIdentity=v,R(t,param)})):R(t,param)}}},U=n(38),F=Object(r.Create)({props:{yxTag:Boolean,isVip:Boolean,vipYears:Number,isMjbz:Boolean,mjbzYears:Number}}),G=(n(1549),Object(h.a)(F,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"flex-center"},[t.isVip&&t.isMjbz?[t.yxTag?e("img",{staticClass:"icon",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/eyejs/youxuan.png"}}):e("img",{staticClass:"icon",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/eyejs/youxuan-s.png"}}),t._v(" "),e("img",{staticClass:"icon",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/supply/images/vip"+(t.vipYears||1)+".png"}})]:t.isVip?e("img",{staticClass:"icon",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/supply/images/vip"+(t.vipYears||1)+".png"}}):t.isMjbz?[t.mjbzYears?e("img",{staticClass:"icon",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/supply/images/mjbz"+(t.mjbzYears||1)+".png"}}):e("img",{staticClass:"icon",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/eyejs/mjbz.png"}})]:t._e()],2)}),[],!1,null,"2093a7b4",null).exports),Y=Object(r.Create)({props:{session:Object,selected:Boolean},components:{VipIcon:G},computed:{vipInfo:function(){if(!this.session.userInfo||!this.session.userInfo.custom)return{};var t=JSON.parse(this.session.userInfo.custom);return{isMjbz:t.safeguard,isVip:t.vipInfo&&t.vipInfo.vip,vipYears:t.vipInfo&&t.vipInfo.year}}}}),K=(n(1550),Object(h.a)(Y,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"flex"},[e("div",{staticClass:"name"},[t._v(t._s(t.session.isOfficial?"系统通知":t.session.userInfo?t.session.userInfo.nick:""))]),t._v(" "),t.session.isOfficial?e("div",{staticClass:"tag-official"},[t._v("官方")]):t.vipInfo?e("vip-icon",{attrs:{isVip:t.vipInfo.isVip,isMjbz:t.vipInfo.isMjbz,vipYears:t.vipInfo.vipYears}}):t._e()],1)}),[],!1,null,"7821d64b",null).exports),$=Object(r.Create)({components:{SessionName:K},props:{session:Object,selected:Boolean},computed:{msg:function(){if(!this.session.lastMsg)return"";if(this.session.lastMsg.text)return this.session.lastMsg.text;if(this.session.lastMsg.tips||this.session.lastMsg.tip)return"[提示消息]";if("image"===this.session.lastMsg.type)return"[图片信息]";if("audio"===this.session.lastMsg.type)return"[语音消息]";if("video"===this.session.lastMsg.type)return"[视频消息]";if("custom"===this.session.lastMsg.type){var content="";try{content=JSON.parse(this.session.lastMsg.content)}catch(t){content=this.session.lastMsg.content}return"supply"===content.customType?"[供应信息]":"order"===content.customType?"[订单信息]":"deposit_order"===content.customType?"[付款单-定金信息]":"deposit_order_reject"===content.customType?"[退回付款单-定金信息]":"payment_order"===content.customType?"[付款单信息]":"payment_order_reject"===content.customType?"[退回付款单信息]":"order_sendGoods"===content.customType?"[发货订单]":"order_update"===content.customType?"[修改订单]":!content.customType&&content.text?"[提示消息]":"[暂不支持该消息,请在手机上查看]"}}}}),X=(n(1551),Object(h.a)($,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"session-item",class:{selected:t.selected},on:{click:function(e){return t.$emit("select",t.session)}}},[t.session.userInfo?e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.session.userInfo.avatar,expression:"session.userInfo.avatar"}],staticClass:"avatar",attrs:{type:"avatar"}}):t._e(),t._v(" "),e("div",[e("session-name",{staticClass:"name",attrs:{session:t.session}}),t._v(" "),e("div",{staticClass:"msg"},[e("div",{staticClass:"last-msg"},[t._v(t._s(t.msg))]),t._v(" "),t.session.unread?e("div",{staticClass:"unread"},[t._v(t._s(t.session.unread>99?"99+":t.session.unread))]):t._e()])],1)])}),[],!1,null,"6336007a",null).exports),W=[{tag:"[可爱]",id:"emoji_01"},{tag:"[大笑]",id:"emoji_00"},{tag:"[色]",id:"emoji_02"},{tag:"[嘘]",id:"emoji_03"},{tag:"[亲]",id:"emoji_04"},{tag:"[呆]",id:"emoji_05"},{tag:"[口水]",id:"emoji_06"},{tag:"[汗]",id:"emoji_145"},{tag:"[呲牙]",id:"emoji_07"},{tag:"[鬼脸]",id:"emoji_08"},{tag:"[害羞]",id:"emoji_09"},{tag:"[偷笑]",id:"emoji_10"},{tag:"[调皮]",id:"emoji_11"},{tag:"[可怜]",id:"emoji_12"},{tag:"[敲]",id:"emoji_13"},{tag:"[惊讶]",id:"emoji_14"},{tag:"[流感]",id:"emoji_15"},{tag:"[委屈]",id:"emoji_16"},{tag:"[流泪]",id:"emoji_17"},{tag:"[嚎哭]",id:"emoji_18"},{tag:"[惊恐]",id:"emoji_19"},{tag:"[怒]",id:"emoji_20"},{tag:"[酷]",id:"emoji_21"},{tag:"[不说]",id:"emoji_22"},{tag:"[鄙视]",id:"emoji_23"},{tag:"[阿弥陀佛]",id:"emoji_24"},{tag:"[奸笑]",id:"emoji_25"},{tag:"[睡着]",id:"emoji_26"},{tag:"[口罩]",id:"emoji_27"},{tag:"[努力]",id:"emoji_28"},{tag:"[抠鼻孔]",id:"emoji_29"},{tag:"[疑问]",id:"emoji_30"},{tag:"[怒骂]",id:"emoji_31"},{tag:"[晕]",id:"emoji_32"},{tag:"[呕吐]",id:"emoji_33"},{tag:"[拜一拜]",id:"emoji_160"},{tag:"[惊喜]",id:"emoji_161"},{tag:"[流汗]",id:"emoji_162"},{tag:"[卖萌]",id:"emoji_163"},{tag:"[默契眨眼]",id:"emoji_164"},{tag:"[烧香拜佛]",id:"emoji_165"},{tag:"[晚安]",id:"emoji_166"},{tag:"[强]",id:"emoji_34"},{tag:"[弱]",id:"emoji_35"},{tag:"[OK]",id:"emoji_36"},{tag:"[拳头]",id:"emoji_37"},{tag:"[胜利]",id:"emoji_38"},{tag:"[鼓掌]",id:"emoji_39"},{tag:"[握手]",id:"emoji_200"},{tag:"[发怒]",id:"emoji_40"},{tag:"[骷髅]",id:"emoji_41"},{tag:"[便便]",id:"emoji_42"},{tag:"[火]",id:"emoji_43"},{tag:"[溜]",id:"emoji_44"},{tag:"[爱心]",id:"emoji_45"},{tag:"[心碎]",id:"emoji_46"},{tag:"[钟情]",id:"emoji_47"},{tag:"[唇]",id:"emoji_48"},{tag:"[戒指]",id:"emoji_49"},{tag:"[钻石]",id:"emoji_50"},{tag:"[太阳]",id:"emoji_51"},{tag:"[有时晴]",id:"emoji_52"},{tag:"[多云]",id:"emoji_53"},{tag:"[雷]",id:"emoji_54"},{tag:"[雨]",id:"emoji_55"},{tag:"[雪花]",id:"emoji_56"},{tag:"[爱人]",id:"emoji_57"},{tag:"[帽子]",id:"emoji_58"},{tag:"[皇冠]",id:"emoji_59"},{tag:"[篮球]",id:"emoji_60"},{tag:"[足球]",id:"emoji_61"},{tag:"[垒球]",id:"emoji_62"},{tag:"[网球]",id:"emoji_63"},{tag:"[台球]",id:"emoji_64"},{tag:"[咖啡]",id:"emoji_65"},{tag:"[啤酒]",id:"emoji_66"},{tag:"[干杯]",id:"emoji_67"},{tag:"[柠檬汁]",id:"emoji_68"},{tag:"[餐具]",id:"emoji_69"},{tag:"[汉堡]",id:"emoji_70"},{tag:"[鸡腿]",id:"emoji_71"},{tag:"[面条]",id:"emoji_72"},{tag:"[冰淇淋]",id:"emoji_73"},{tag:"[沙冰]",id:"emoji_74"},{tag:"[生日蛋糕]",id:"emoji_75"},{tag:"[蛋糕]",id:"emoji_76"},{tag:"[糖果]",id:"emoji_77"},{tag:"[葡萄]",id:"emoji_78"},{tag:"[西瓜]",id:"emoji_79"},{tag:"[光碟]",id:"emoji_80"},{tag:"[手机]",id:"emoji_81"},{tag:"[电话]",id:"emoji_82"},{tag:"[电视]",id:"emoji_83"},{tag:"[声音开启]",id:"emoji_84"},{tag:"[声音关闭]",id:"emoji_85"},{tag:"[铃铛]",id:"emoji_86"},{tag:"[锁头]",id:"emoji_87"},{tag:"[放大镜]",id:"emoji_88"},{tag:"[灯泡]",id:"emoji_89"},{tag:"[锤头]",id:"emoji_90"},{tag:"[烟]",id:"emoji_91"},{tag:"[炸弹]",id:"emoji_92"},{tag:"[枪]",id:"emoji_93"},{tag:"[刀]",id:"emoji_94"},{tag:"[药]",id:"emoji_95"},{tag:"[打针]",id:"emoji_96"},{tag:"[钱袋]",id:"emoji_97"},{tag:"[钞票]",id:"emoji_98"},{tag:"[银行卡]",id:"emoji_99"},{tag:"[手柄]",id:"emoji_100"},{tag:"[麻将]",id:"emoji_101"},{tag:"[调色板]",id:"emoji_102"},{tag:"[电影]",id:"emoji_103"},{tag:"[麦克风]",id:"emoji_104"},{tag:"[耳机]",id:"emoji_105"},{tag:"[音乐]",id:"emoji_106"},{tag:"[吉他]",id:"emoji_107"},{tag:"[火箭]",id:"emoji_108"},{tag:"[飞机]",id:"emoji_109"},{tag:"[火车]",id:"emoji_110"},{tag:"[公交]",id:"emoji_111"},{tag:"[轿车]",id:"emoji_112"},{tag:"[出租车]",id:"emoji_113"},{tag:"[警车]",id:"emoji_114"},{tag:"[自行车]",id:"emoji_115"}],V=Object(r.Create)({props:{msg:Object,myinfo:Object,session:Object},data:function(){return{PC_DOMAIN:"http://www.lianlianny.com/agricprod"}},computed:{orderLink:function(){if("order"===this.msgType&&this.customData)return-1!==this.myinfo.account.indexOf(this.customData.saleUserId)?"".concat("http://merchant.www.lianlianny.com/agricprod","/#/order/detail?orderNo=").concat(this.customData.saleCode):"".concat("http://www.lianlianny.com/agricprod","/order/detail/?orderNo=").concat(this.customData.saleCode)},text:function(){return this.msg.text.replace(/\[[^\[\]]*\]/g,(function(text){var t=W.find((function(t){return t.tag===text}));if(t){var img="http://www.lianlianny.com/agricprod/lib/files/eye-components/assets/emoji/".concat(t.id,"@2x.png");return"").concat(t.tag,"")}return text})).replace(/\n/g,(function(){return"
"}))},isMyMsg:function(){if(this.myinfo)return this.msg.from===this.myinfo.account},msgType:function(){var t=this.msg,content=t.content,e=t.type;if("text"===e||"image"===e||"video"===e)return e;try{return JSON.parse(content).customType}catch(t){return""}},customData:function(){var content=this.msg.content;if(content)return JSON.parse(content).data}}}),Z=(n(1552),Object(h.a)(V,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"msg",class:{reverse:t.isMyMsg}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.isMyMsg?t.myinfo.avatar:t.session.userInfo?t.session.userInfo.avatar:"",expression:"isMyMsg ? myinfo.avatar: (session.userInfo?session.userInfo.avatar:'')"}],staticClass:"avatar",attrs:{type:"avatar"}}),t._v(" "),"text"===t.msgType?e("div",{staticClass:"text",domProps:{innerHTML:t._s(t.text)}}):"image"===t.msgType?e("a",{staticClass:"img",attrs:{href:t.msg.file.url,target:"_blank"}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.msg.file.url,expression:"msg.file.url"}],staticClass:"media-item"})]):"chartlet"===t.msgType?e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.customData.chartletUrl,expression:"customData.chartletUrl"}],staticClass:"hn-emoji"}):"video"===t.msgType?e("a",{staticClass:"video",attrs:{href:t.msg.file.url,target:"_blank"}},[e("video",{staticClass:"media-item",attrs:{src:t.msg.file.url}}),t._v(" "),e("i",{staticClass:"icon-play iconfont icon-shipin"})]):"supply"===t.msgType?e("a",{staticClass:"supply",attrs:{target:"_blank",href:"".concat(t.PC_DOMAIN,"/gongying/").concat(t.customData.supplyId,"/")}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.customData.url170,expression:"customData.url170"}],staticClass:"supply-img"}),t._v(" "),e("div",{staticClass:"supply-info"},[e("div",{staticClass:"title"},[t._v(t._s(t.customData.title))]),t._v(" "),e("div",[t._v("价 格:"),e("span",{staticClass:"price"},[t._v("¥"+t._s(t.customData.price)+"/"+t._s(t.customData.unit))])])])]):"order"===t.msgType?e("a",{staticClass:"order",attrs:{target:"_blank",href:t.orderLink}},[e("div",{staticClass:"label"},[t._v(t._s(t.isMyMsg?"正在咨询订单":"TA正在咨询订单"))]),t._v(" "),e("div",{staticClass:"order-content"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.customData.picUrl,expression:"customData.picUrl"}],staticClass:"order-img"}),t._v(" "),e("div",{staticClass:"order-info"},[e("div",{staticClass:"title eye-ellipsis"},[t._v(t._s(t.customData.productName))]),t._v(" "),e("div",{staticClass:"info"},[t._v("下单时间:"+t._s(t.customData.orderTime))]),t._v(" "),e("div",{staticClass:"info"},[t._v("订单状态:"),e("span",{staticClass:"status"},[t._v(t._s(t.customData.orderStatus))])])])])]):e("div",{staticClass:"text"},[t._v("暂不支持该消息,请在手机上查看")]),t._v(" "),t.isMyMsg&&2!==t.msg.state?e("div",{staticClass:"read-item",class:t.msg.isRead?"grey":"green"},[t._v("\n "+t._s(t.msg.isRead?"已读":"未读")+"\n ")]):t._e()])}),[],!1,null,"6deec1f8",null).exports),Q=Object(r.Create)({props:{},data:function(){return{}},onInit:function(){var t=this,e=n(729);n(1553);var r=e.import("modules/keyboard");this.quill=new e("#editor",{placeholder:"说点什么吧...",modules:{keyboard:{bindings:{enter:{key:r.keys.ENTER,handler:function(e,n){return t.$emit("enter"),!1}},"ctrl + enter":{key:r.keys.ENTER,ctrlKey:!0,handler:function(e,n){return t.insertNewline(e,n,{pspacing:!1}),!1}}}}}}),this.quill.on("text-change",(function(e,n,source){t.$emit("change")}))},methods:{insertNewline:function(t,e,r){var o=n(729),l=o.import("parchment"),c=this.quill;t.length>0&&c.scroll.deleteAt(t.index,t.length);var f=Object.keys(e.format).reduce((function(t,n){return l.query(n,l.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});c.insertText(t.index,"\n",f,o.sources.USER),c.setSelection(t.index+1,o.sources.SILENT),c.focus(),Object.keys(e.format).forEach((function(t){null==f[t]&&(Array.isArray(e.format[t])||"link"!==t&&c.format(t,e.format[t],o.sources.USER))})),c.formatLine(t.index+1,1,r,o.sources.USER)},insertEmoji:function(t){var e=this.quill.selection.savedRange.index;this.quill.insertEmbed(e,"image","http://www.lianlianny.com/agricprod/lib/files/eye-components/assets/emoji/".concat(t.id,"@2x.png?id=").concat(t.id,"&tag=").concat(t.tag)),this.quill.setSelection(e+1)},clear:function(){this.quill.setContents()},getContent:function(){var t=this.quill.getContents(),e="";return t.forEach((function(t){t.insert.image?e+=t.insert.image.substring(t.insert.image.indexOf("tag=")+4):e+=t.insert})),e}},computed:{},watch:{}}),J=(n(1554),Object(h.a)(Q,(function(){var t=this._self._c;this._self._setupProxy;return t("div",{attrs:{id:"editor"}})}),[],!1,null,"5096b413",null).exports),tt=[];W.forEach((function(t,i){var e=Math.floor(i/24);tt[e]||(tt[e]=[]),tt[e].push(t)})),n(1555),n(1556);var et=Object(r.Create)({components:{VipIcon:G,ChatItem:Z,ChatInput:J},props:{auth:Object,myinfo:Object},data:function(){return{session:null,dialog:null,msgList:[],emojiList:tt,showEmoji:!1}},methods:{clear:function(){this.showEmoji=!1,this.session=null,this.dialog=null,this.msgList=[]},initChat:function(t){var e=this;this.session=t,U.a.setCurrentSession(t).then((function(t){e.dialog=t,U.a.on("msg",(function(t){e.msgList=t,e.$nextTick((function(){var t=e.$refs.window;t&&(t.scrollTop=t.scrollHeight)}))}))}))},doCall:function(){this.$pcCall({businessType:16,toHnUserId:this.session.to.replace("hnw","")})},sendMsg:function(){if(!this.auth||!1!==this.auth.sendMessage){var text=this.$refs.input.getContent();if(!text||!text.trim())return this.$toast("发送消息不能为空");U.a.sendText(text),this.$refs.input.clear()}},onFile:function(t){var e=t.target.files[0];U.a.sendImage(e)}},watch:{showEmoji:function(t){var e=this;t&&!this.initSwiper&&this.$nextTick((function(){new Swiper(".swiper-container",{pagination:".swiper-pagination",paginationClickable:!0}),e.initSwiper=!0}))}},computed:{identityStr:function(){return this.dialog&&this.dialog.identityTag?this.dialog.identityTag.map((function(t){return t.name})).join("、"):"-"},vipInfo:function(){if(!this.session.userInfo||!this.session.userInfo.custom)return{};var t=JSON.parse(this.session.userInfo.custom);return{isMjbz:t.safeguard,isVip:t.vipInfo.vip,vipYears:t.vipInfo.year}}}}),nt=(n(1557),Object(h.a)(et,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"chat-window"},[t.session?[e("div",{staticClass:"flex"},[e("div",{staticClass:"left"},[e("div",{ref:"window",staticClass:"window"},t._l(t.msgList,(function(n){return e("chat-item",{key:n.idClient,attrs:{msg:n,myinfo:t.myinfo,session:t.session}})})),1),t._v(" "),e("div",{staticClass:"editor-layout"},[e("div",{staticClass:"editor"},[e("div",{staticClass:"toolbar"},[e("i",{staticClass:"iconfont icon-biaoqing",class:{active:t.showEmoji},on:{click:function(e){t.showEmoji=!t.showEmoji}}}),t._v(" "),!1!==t.auth.sendMessage&&!1!==t.auth.usePhoto?e("label",{staticClass:"iconfont icon-tupian",attrs:{for:"files"}}):t._e(),t._v(" "),e("input",{staticClass:"img-select",attrs:{type:"file",id:"files",accept:"image/*"},on:{change:t.onFile}}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.showEmoji,expression:"showEmoji"}],staticClass:"swiper-container"},[e("div",{staticClass:"swiper-wrapper"},t._l(t.emojiList,(function(n,i){return e("div",{key:i,staticClass:"swiper-slide"},t._l(n,(function(n){return e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:"http://www.lianlianny.com/agricprod/lib/files/eye-components/assets/emoji/".concat(n.id,"@2x.png"),expression:"`http://www.lianlianny.com/agricprod/lib/files/eye-components/assets/emoji/${emoji.id}@2x.png`"}],key:n.id,staticClass:"img-emoji",on:{click:function(e){return t.$refs.input.insertEmoji(n)}}})})),0)})),0),t._v(" "),e("div",{staticClass:"swiper-pagination"})])]),t._v(" "),e("chat-input",{ref:"input",on:{enter:t.sendMsg,change:function(e){t.showEmoji=!1}}})],1),t._v(" "),e("button",{staticClass:"send",class:{disabled:!1===t.auth.sendMessage},attrs:{disabled:!1===t.auth.sendMessage},on:{click:t.sendMsg}},[t._v("\n 发送\n ")])])]),t._v(" "),e("div",{staticClass:"right"},[t.session.userInfo?e("div",{staticClass:"nick eye-ellipsis"},[t._v(t._s(t.session.userInfo.nick))]):t._e(),t._v(" "),e("vip-icon",{attrs:{isVip:t.vipInfo.isVip,"yx-tag":"",isMjbz:t.vipInfo.isMjbz,vipYears:t.vipInfo.vipYears}}),t._v(" "),t.dialog?[e("div",{staticClass:"info"},[e("div",{staticStyle:{"flex-shrink":"0"}},[t._v("经营模式:")]),t._v("\n "+t._s(t.identityStr)+"\n ")]),t._v(" "),e("div",{staticClass:"info"},[e("div",{staticStyle:{"flex-shrink":"0"}},[t._v("所在地区:")]),t._v("\n "+t._s(t.dialog.provinceName?t.dialog.provinceName+" "+t.dialog.cityName:"-")+"\n ")]),t._v(" "),e("div",{staticClass:"info"},[e("div",{staticStyle:{"flex-shrink":"0"}},[t._v("主营类目:")]),t._v("\n "+t._s(t.dialog.categoryNames||"-")+"\n ")]),t._v(" "),!1!==t.auth.callMobile?e("button",{staticClass:"btn first",on:{click:t.doCall}},[t._v("电话咨询")]):t._e(),t._v(" "),e("r-link",{staticClass:"btn",attrs:{tag:"homepage",target:"_blank",params:{id:t.dialog.receiveId}}},[t._v("进入店铺")])]:t._e()],2)])]:[e("img",{staticClass:"no-message",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/2021/3/9/no-message.png"}}),t._v(" "),e("span",[t._v("欢迎使用惠农网聊生意")])]],2)}),[],!1,null,"e61af1ec",null).exports);function it(t){return(it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ot(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function at(t,e,n){return(e=function(t){var e=function(input,t){if("object"!==it(input)||null===input)return input;var e=input[Symbol.toPrimitive];if(void 0!==e){var n=e.call(input,t||"default");if("object"!==it(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(input)}(t,"string");return"symbol"===it(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var st=Object(r.Create)({components:{SessionItem:X,ChatWindow:nt,SessionName:K},props:{},data:function(){return{showWindow:!1,myinfo:null,currentSession:null,sessions:[],auth:{}}},onInit:function(){var t=this;U.a.on("myinfo",(function(e){t.myinfo=e})),U.a.on("session",(function(e){t.sessions=e})),U.a.on("error",(function(e){t.$toast(e.message||e.msg||e||"未知错误")})),U.a.on("warn",(function(e){e&&t.$toast(e)}))},watch:{showWindow:function(t){t||(this.currentSession=null,this.$refs.chat.clear())}},methods:{changeCurrentSession:function(t){this.currentSession&&this.currentSession.id===t.id||(this.currentSession=t,this.$refs.chat.initChat(this.currentSession))},show:function(p){var t=this,e=p||{},n=e.supply,r=e.toUserId;if(this.$auth.ticket){if(this.$auth.hnUserId==r)return void this.$toast("抱歉,您不能对自己发起聊生意");U.a.init({toUserId:r}).then((function(e){if(!1===e.enter)return t.$toast(e.msg);if(t.auth=e,t.showWindow=!0,e.msg){var o=e.msg,content=o.content,title=o.title,l=o.serviceText,c=o.closeText,f=o.serviceJump;t.$showDialog(function(t){for(var i=1;i