vue3-tree-org.common.js 169 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483
  1. module.exports =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/
  6. /******/ // The require function
  7. /******/ function __webpack_require__(moduleId) {
  8. /******/
  9. /******/ // Check if module is in cache
  10. /******/ if(installedModules[moduleId]) {
  11. /******/ return installedModules[moduleId].exports;
  12. /******/ }
  13. /******/ // Create a new module (and put it into the cache)
  14. /******/ var module = installedModules[moduleId] = {
  15. /******/ i: moduleId,
  16. /******/ l: false,
  17. /******/ exports: {}
  18. /******/ };
  19. /******/
  20. /******/ // Execute the module function
  21. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22. /******/
  23. /******/ // Flag the module as loaded
  24. /******/ module.l = true;
  25. /******/
  26. /******/ // Return the exports of the module
  27. /******/ return module.exports;
  28. /******/ }
  29. /******/
  30. /******/
  31. /******/ // expose the modules object (__webpack_modules__)
  32. /******/ __webpack_require__.m = modules;
  33. /******/
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/
  37. /******/ // define getter function for harmony exports
  38. /******/ __webpack_require__.d = function(exports, name, getter) {
  39. /******/ if(!__webpack_require__.o(exports, name)) {
  40. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41. /******/ }
  42. /******/ };
  43. /******/
  44. /******/ // define __esModule on exports
  45. /******/ __webpack_require__.r = function(exports) {
  46. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48. /******/ }
  49. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  50. /******/ };
  51. /******/
  52. /******/ // create a fake namespace object
  53. /******/ // mode & 1: value is a module id, require it
  54. /******/ // mode & 2: merge all properties of value into the ns
  55. /******/ // mode & 4: return value when already ns object
  56. /******/ // mode & 8|1: behave like require
  57. /******/ __webpack_require__.t = function(value, mode) {
  58. /******/ if(mode & 1) value = __webpack_require__(value);
  59. /******/ if(mode & 8) return value;
  60. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61. /******/ var ns = Object.create(null);
  62. /******/ __webpack_require__.r(ns);
  63. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65. /******/ return ns;
  66. /******/ };
  67. /******/
  68. /******/ // getDefaultExport function for compatibility with non-harmony modules
  69. /******/ __webpack_require__.n = function(module) {
  70. /******/ var getter = module && module.__esModule ?
  71. /******/ function getDefault() { return module['default']; } :
  72. /******/ function getModuleExports() { return module; };
  73. /******/ __webpack_require__.d(getter, 'a', getter);
  74. /******/ return getter;
  75. /******/ };
  76. /******/
  77. /******/ // Object.prototype.hasOwnProperty.call
  78. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79. /******/
  80. /******/ // __webpack_public_path__
  81. /******/ __webpack_require__.p = "";
  82. /******/
  83. /******/
  84. /******/ // Load entry module and return exports
  85. /******/ return __webpack_require__(__webpack_require__.s = "fb15");
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ "00ee":
  90. /***/ (function(module, exports, __webpack_require__) {
  91. var wellKnownSymbol = __webpack_require__("b622");
  92. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  93. var test = {};
  94. test[TO_STRING_TAG] = 'z';
  95. module.exports = String(test) === '[object z]';
  96. /***/ }),
  97. /***/ "06cf":
  98. /***/ (function(module, exports, __webpack_require__) {
  99. var DESCRIPTORS = __webpack_require__("83ab");
  100. var call = __webpack_require__("c65b");
  101. var propertyIsEnumerableModule = __webpack_require__("d1e7");
  102. var createPropertyDescriptor = __webpack_require__("5c6c");
  103. var toIndexedObject = __webpack_require__("fc6a");
  104. var toPropertyKey = __webpack_require__("a04b");
  105. var hasOwn = __webpack_require__("1a2d");
  106. var IE8_DOM_DEFINE = __webpack_require__("0cfb");
  107. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  108. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  109. // `Object.getOwnPropertyDescriptor` method
  110. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  111. exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  112. O = toIndexedObject(O);
  113. P = toPropertyKey(P);
  114. if (IE8_DOM_DEFINE) try {
  115. return $getOwnPropertyDescriptor(O, P);
  116. } catch (error) { /* empty */ }
  117. if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  118. };
  119. /***/ }),
  120. /***/ "07fa":
  121. /***/ (function(module, exports, __webpack_require__) {
  122. var toLength = __webpack_require__("50c4");
  123. // `LengthOfArrayLike` abstract operation
  124. // https://tc39.es/ecma262/#sec-lengthofarraylike
  125. module.exports = function (obj) {
  126. return toLength(obj.length);
  127. };
  128. /***/ }),
  129. /***/ "0cfb":
  130. /***/ (function(module, exports, __webpack_require__) {
  131. var DESCRIPTORS = __webpack_require__("83ab");
  132. var fails = __webpack_require__("d039");
  133. var createElement = __webpack_require__("cc12");
  134. // Thanks to IE8 for its funny defineProperty
  135. module.exports = !DESCRIPTORS && !fails(function () {
  136. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  137. return Object.defineProperty(createElement('div'), 'a', {
  138. get: function () { return 7; }
  139. }).a != 7;
  140. });
  141. /***/ }),
  142. /***/ "0d51":
  143. /***/ (function(module, exports) {
  144. var $String = String;
  145. module.exports = function (argument) {
  146. try {
  147. return $String(argument);
  148. } catch (error) {
  149. return 'Object';
  150. }
  151. };
  152. /***/ }),
  153. /***/ "13d2":
  154. /***/ (function(module, exports, __webpack_require__) {
  155. var fails = __webpack_require__("d039");
  156. var isCallable = __webpack_require__("1626");
  157. var hasOwn = __webpack_require__("1a2d");
  158. var DESCRIPTORS = __webpack_require__("83ab");
  159. var CONFIGURABLE_FUNCTION_NAME = __webpack_require__("5e77").CONFIGURABLE;
  160. var inspectSource = __webpack_require__("8925");
  161. var InternalStateModule = __webpack_require__("69f3");
  162. var enforceInternalState = InternalStateModule.enforce;
  163. var getInternalState = InternalStateModule.get;
  164. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  165. var defineProperty = Object.defineProperty;
  166. var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
  167. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  168. });
  169. var TEMPLATE = String(String).split('String');
  170. var makeBuiltIn = module.exports = function (value, name, options) {
  171. if (String(name).slice(0, 7) === 'Symbol(') {
  172. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  173. }
  174. if (options && options.getter) name = 'get ' + name;
  175. if (options && options.setter) name = 'set ' + name;
  176. if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  177. if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
  178. else value.name = name;
  179. }
  180. if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
  181. defineProperty(value, 'length', { value: options.arity });
  182. }
  183. try {
  184. if (options && hasOwn(options, 'constructor') && options.constructor) {
  185. if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
  186. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  187. } else if (value.prototype) value.prototype = undefined;
  188. } catch (error) { /* empty */ }
  189. var state = enforceInternalState(value);
  190. if (!hasOwn(state, 'source')) {
  191. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  192. } return value;
  193. };
  194. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  195. // eslint-disable-next-line no-extend-native -- required
  196. Function.prototype.toString = makeBuiltIn(function toString() {
  197. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  198. }, 'toString');
  199. /***/ }),
  200. /***/ "1626":
  201. /***/ (function(module, exports) {
  202. // `IsCallable` abstract operation
  203. // https://tc39.es/ecma262/#sec-iscallable
  204. module.exports = function (argument) {
  205. return typeof argument == 'function';
  206. };
  207. /***/ }),
  208. /***/ "1a2d":
  209. /***/ (function(module, exports, __webpack_require__) {
  210. var uncurryThis = __webpack_require__("e330");
  211. var toObject = __webpack_require__("7b0b");
  212. var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  213. // `HasOwnProperty` abstract operation
  214. // https://tc39.es/ecma262/#sec-hasownproperty
  215. // eslint-disable-next-line es-x/no-object-hasown -- safe
  216. module.exports = Object.hasOwn || function hasOwn(it, key) {
  217. return hasOwnProperty(toObject(it), key);
  218. };
  219. /***/ }),
  220. /***/ "1d80":
  221. /***/ (function(module, exports) {
  222. var $TypeError = TypeError;
  223. // `RequireObjectCoercible` abstract operation
  224. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  225. module.exports = function (it) {
  226. if (it == undefined) throw $TypeError("Can't call method on " + it);
  227. return it;
  228. };
  229. /***/ }),
  230. /***/ "23cb":
  231. /***/ (function(module, exports, __webpack_require__) {
  232. var toIntegerOrInfinity = __webpack_require__("5926");
  233. var max = Math.max;
  234. var min = Math.min;
  235. // Helper for a popular repeating case of the spec:
  236. // Let integer be ? ToInteger(index).
  237. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  238. module.exports = function (index, length) {
  239. var integer = toIntegerOrInfinity(index);
  240. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  241. };
  242. /***/ }),
  243. /***/ "23e7":
  244. /***/ (function(module, exports, __webpack_require__) {
  245. var global = __webpack_require__("da84");
  246. var getOwnPropertyDescriptor = __webpack_require__("06cf").f;
  247. var createNonEnumerableProperty = __webpack_require__("9112");
  248. var defineBuiltIn = __webpack_require__("cb2d");
  249. var defineGlobalProperty = __webpack_require__("6374");
  250. var copyConstructorProperties = __webpack_require__("e893");
  251. var isForced = __webpack_require__("94ca");
  252. /*
  253. options.target - name of the target object
  254. options.global - target is the global object
  255. options.stat - export as static methods of target
  256. options.proto - export as prototype methods of target
  257. options.real - real prototype method for the `pure` version
  258. options.forced - export even if the native feature is available
  259. options.bind - bind methods to the target, required for the `pure` version
  260. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  261. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  262. options.sham - add a flag to not completely full polyfills
  263. options.enumerable - export as enumerable property
  264. options.dontCallGetSet - prevent calling a getter on target
  265. options.name - the .name of the function if it does not match the key
  266. */
  267. module.exports = function (options, source) {
  268. var TARGET = options.target;
  269. var GLOBAL = options.global;
  270. var STATIC = options.stat;
  271. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  272. if (GLOBAL) {
  273. target = global;
  274. } else if (STATIC) {
  275. target = global[TARGET] || defineGlobalProperty(TARGET, {});
  276. } else {
  277. target = (global[TARGET] || {}).prototype;
  278. }
  279. if (target) for (key in source) {
  280. sourceProperty = source[key];
  281. if (options.dontCallGetSet) {
  282. descriptor = getOwnPropertyDescriptor(target, key);
  283. targetProperty = descriptor && descriptor.value;
  284. } else targetProperty = target[key];
  285. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  286. // contained in target
  287. if (!FORCED && targetProperty !== undefined) {
  288. if (typeof sourceProperty == typeof targetProperty) continue;
  289. copyConstructorProperties(sourceProperty, targetProperty);
  290. }
  291. // add a flag to not completely full polyfills
  292. if (options.sham || (targetProperty && targetProperty.sham)) {
  293. createNonEnumerableProperty(sourceProperty, 'sham', true);
  294. }
  295. defineBuiltIn(target, key, sourceProperty, options);
  296. }
  297. };
  298. /***/ }),
  299. /***/ "241c":
  300. /***/ (function(module, exports, __webpack_require__) {
  301. var internalObjectKeys = __webpack_require__("ca84");
  302. var enumBugKeys = __webpack_require__("7839");
  303. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  304. // `Object.getOwnPropertyNames` method
  305. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  306. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  307. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  308. return internalObjectKeys(O, hiddenKeys);
  309. };
  310. /***/ }),
  311. /***/ "2ba4":
  312. /***/ (function(module, exports, __webpack_require__) {
  313. var NATIVE_BIND = __webpack_require__("40d5");
  314. var FunctionPrototype = Function.prototype;
  315. var apply = FunctionPrototype.apply;
  316. var call = FunctionPrototype.call;
  317. // eslint-disable-next-line es-x/no-reflect -- safe
  318. module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
  319. return call.apply(apply, arguments);
  320. });
  321. /***/ }),
  322. /***/ "2d00":
  323. /***/ (function(module, exports, __webpack_require__) {
  324. var global = __webpack_require__("da84");
  325. var userAgent = __webpack_require__("342f");
  326. var process = global.process;
  327. var Deno = global.Deno;
  328. var versions = process && process.versions || Deno && Deno.version;
  329. var v8 = versions && versions.v8;
  330. var match, version;
  331. if (v8) {
  332. match = v8.split('.');
  333. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  334. // but their correct versions are not interesting for us
  335. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  336. }
  337. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  338. // so check `userAgent` even if `.v8` exists, but 0
  339. if (!version && userAgent) {
  340. match = userAgent.match(/Edge\/(\d+)/);
  341. if (!match || match[1] >= 74) {
  342. match = userAgent.match(/Chrome\/(\d+)/);
  343. if (match) version = +match[1];
  344. }
  345. }
  346. module.exports = version;
  347. /***/ }),
  348. /***/ "342f":
  349. /***/ (function(module, exports, __webpack_require__) {
  350. var getBuiltIn = __webpack_require__("d066");
  351. module.exports = getBuiltIn('navigator', 'userAgent') || '';
  352. /***/ }),
  353. /***/ "3a9b":
  354. /***/ (function(module, exports, __webpack_require__) {
  355. var uncurryThis = __webpack_require__("e330");
  356. module.exports = uncurryThis({}.isPrototypeOf);
  357. /***/ }),
  358. /***/ "3bbe":
  359. /***/ (function(module, exports, __webpack_require__) {
  360. var isCallable = __webpack_require__("1626");
  361. var $String = String;
  362. var $TypeError = TypeError;
  363. module.exports = function (argument) {
  364. if (typeof argument == 'object' || isCallable(argument)) return argument;
  365. throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
  366. };
  367. /***/ }),
  368. /***/ "40d5":
  369. /***/ (function(module, exports, __webpack_require__) {
  370. var fails = __webpack_require__("d039");
  371. module.exports = !fails(function () {
  372. // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
  373. var test = (function () { /* empty */ }).bind();
  374. // eslint-disable-next-line no-prototype-builtins -- safe
  375. return typeof test != 'function' || test.hasOwnProperty('prototype');
  376. });
  377. /***/ }),
  378. /***/ "44ad":
  379. /***/ (function(module, exports, __webpack_require__) {
  380. var uncurryThis = __webpack_require__("e330");
  381. var fails = __webpack_require__("d039");
  382. var classof = __webpack_require__("c6b6");
  383. var $Object = Object;
  384. var split = uncurryThis(''.split);
  385. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  386. module.exports = fails(function () {
  387. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  388. // eslint-disable-next-line no-prototype-builtins -- safe
  389. return !$Object('z').propertyIsEnumerable(0);
  390. }) ? function (it) {
  391. return classof(it) == 'String' ? split(it, '') : $Object(it);
  392. } : $Object;
  393. /***/ }),
  394. /***/ "485a":
  395. /***/ (function(module, exports, __webpack_require__) {
  396. var call = __webpack_require__("c65b");
  397. var isCallable = __webpack_require__("1626");
  398. var isObject = __webpack_require__("861d");
  399. var $TypeError = TypeError;
  400. // `OrdinaryToPrimitive` abstract operation
  401. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  402. module.exports = function (input, pref) {
  403. var fn, val;
  404. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  405. if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  406. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  407. throw $TypeError("Can't convert object to primitive value");
  408. };
  409. /***/ }),
  410. /***/ "4930":
  411. /***/ (function(module, exports, __webpack_require__) {
  412. /* eslint-disable es-x/no-symbol -- required for testing */
  413. var V8_VERSION = __webpack_require__("2d00");
  414. var fails = __webpack_require__("d039");
  415. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
  416. module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  417. var symbol = Symbol();
  418. // Chrome 38 Symbol has incorrect toString conversion
  419. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  420. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  421. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  422. !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  423. });
  424. /***/ }),
  425. /***/ "4d64":
  426. /***/ (function(module, exports, __webpack_require__) {
  427. var toIndexedObject = __webpack_require__("fc6a");
  428. var toAbsoluteIndex = __webpack_require__("23cb");
  429. var lengthOfArrayLike = __webpack_require__("07fa");
  430. // `Array.prototype.{ indexOf, includes }` methods implementation
  431. var createMethod = function (IS_INCLUDES) {
  432. return function ($this, el, fromIndex) {
  433. var O = toIndexedObject($this);
  434. var length = lengthOfArrayLike(O);
  435. var index = toAbsoluteIndex(fromIndex, length);
  436. var value;
  437. // Array#includes uses SameValueZero equality algorithm
  438. // eslint-disable-next-line no-self-compare -- NaN check
  439. if (IS_INCLUDES && el != el) while (length > index) {
  440. value = O[index++];
  441. // eslint-disable-next-line no-self-compare -- NaN check
  442. if (value != value) return true;
  443. // Array#indexOf ignores holes, Array#includes - not
  444. } else for (;length > index; index++) {
  445. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  446. } return !IS_INCLUDES && -1;
  447. };
  448. };
  449. module.exports = {
  450. // `Array.prototype.includes` method
  451. // https://tc39.es/ecma262/#sec-array.prototype.includes
  452. includes: createMethod(true),
  453. // `Array.prototype.indexOf` method
  454. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  455. indexOf: createMethod(false)
  456. };
  457. /***/ }),
  458. /***/ "50c4":
  459. /***/ (function(module, exports, __webpack_require__) {
  460. var toIntegerOrInfinity = __webpack_require__("5926");
  461. var min = Math.min;
  462. // `ToLength` abstract operation
  463. // https://tc39.es/ecma262/#sec-tolength
  464. module.exports = function (argument) {
  465. return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  466. };
  467. /***/ }),
  468. /***/ "5692":
  469. /***/ (function(module, exports, __webpack_require__) {
  470. var IS_PURE = __webpack_require__("c430");
  471. var store = __webpack_require__("c6cd");
  472. (module.exports = function (key, value) {
  473. return store[key] || (store[key] = value !== undefined ? value : {});
  474. })('versions', []).push({
  475. version: '3.24.1',
  476. mode: IS_PURE ? 'pure' : 'global',
  477. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  478. license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',
  479. source: 'https://github.com/zloirock/core-js'
  480. });
  481. /***/ }),
  482. /***/ "56ef":
  483. /***/ (function(module, exports, __webpack_require__) {
  484. var getBuiltIn = __webpack_require__("d066");
  485. var uncurryThis = __webpack_require__("e330");
  486. var getOwnPropertyNamesModule = __webpack_require__("241c");
  487. var getOwnPropertySymbolsModule = __webpack_require__("7418");
  488. var anObject = __webpack_require__("825a");
  489. var concat = uncurryThis([].concat);
  490. // all object keys, includes non-enumerable and symbols
  491. module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  492. var keys = getOwnPropertyNamesModule.f(anObject(it));
  493. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  494. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  495. };
  496. /***/ }),
  497. /***/ "577e":
  498. /***/ (function(module, exports, __webpack_require__) {
  499. var classof = __webpack_require__("f5df");
  500. var $String = String;
  501. module.exports = function (argument) {
  502. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  503. return $String(argument);
  504. };
  505. /***/ }),
  506. /***/ "5926":
  507. /***/ (function(module, exports, __webpack_require__) {
  508. var trunc = __webpack_require__("b42e");
  509. // `ToIntegerOrInfinity` abstract operation
  510. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  511. module.exports = function (argument) {
  512. var number = +argument;
  513. // eslint-disable-next-line no-self-compare -- NaN check
  514. return number !== number || number === 0 ? 0 : trunc(number);
  515. };
  516. /***/ }),
  517. /***/ "59ed":
  518. /***/ (function(module, exports, __webpack_require__) {
  519. var isCallable = __webpack_require__("1626");
  520. var tryToString = __webpack_require__("0d51");
  521. var $TypeError = TypeError;
  522. // `Assert: IsCallable(argument) is true`
  523. module.exports = function (argument) {
  524. if (isCallable(argument)) return argument;
  525. throw $TypeError(tryToString(argument) + ' is not a function');
  526. };
  527. /***/ }),
  528. /***/ "5c6c":
  529. /***/ (function(module, exports) {
  530. module.exports = function (bitmap, value) {
  531. return {
  532. enumerable: !(bitmap & 1),
  533. configurable: !(bitmap & 2),
  534. writable: !(bitmap & 4),
  535. value: value
  536. };
  537. };
  538. /***/ }),
  539. /***/ "5e77":
  540. /***/ (function(module, exports, __webpack_require__) {
  541. var DESCRIPTORS = __webpack_require__("83ab");
  542. var hasOwn = __webpack_require__("1a2d");
  543. var FunctionPrototype = Function.prototype;
  544. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  545. var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
  546. var EXISTS = hasOwn(FunctionPrototype, 'name');
  547. // additional protection from minified / mangled / dropped function names
  548. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  549. var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
  550. module.exports = {
  551. EXISTS: EXISTS,
  552. PROPER: PROPER,
  553. CONFIGURABLE: CONFIGURABLE
  554. };
  555. /***/ }),
  556. /***/ "6374":
  557. /***/ (function(module, exports, __webpack_require__) {
  558. var global = __webpack_require__("da84");
  559. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  560. var defineProperty = Object.defineProperty;
  561. module.exports = function (key, value) {
  562. try {
  563. defineProperty(global, key, { value: value, configurable: true, writable: true });
  564. } catch (error) {
  565. global[key] = value;
  566. } return value;
  567. };
  568. /***/ }),
  569. /***/ "69f3":
  570. /***/ (function(module, exports, __webpack_require__) {
  571. var NATIVE_WEAK_MAP = __webpack_require__("7f9a");
  572. var global = __webpack_require__("da84");
  573. var uncurryThis = __webpack_require__("e330");
  574. var isObject = __webpack_require__("861d");
  575. var createNonEnumerableProperty = __webpack_require__("9112");
  576. var hasOwn = __webpack_require__("1a2d");
  577. var shared = __webpack_require__("c6cd");
  578. var sharedKey = __webpack_require__("f772");
  579. var hiddenKeys = __webpack_require__("d012");
  580. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  581. var TypeError = global.TypeError;
  582. var WeakMap = global.WeakMap;
  583. var set, get, has;
  584. var enforce = function (it) {
  585. return has(it) ? get(it) : set(it, {});
  586. };
  587. var getterFor = function (TYPE) {
  588. return function (it) {
  589. var state;
  590. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  591. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  592. } return state;
  593. };
  594. };
  595. if (NATIVE_WEAK_MAP || shared.state) {
  596. var store = shared.state || (shared.state = new WeakMap());
  597. var wmget = uncurryThis(store.get);
  598. var wmhas = uncurryThis(store.has);
  599. var wmset = uncurryThis(store.set);
  600. set = function (it, metadata) {
  601. if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  602. metadata.facade = it;
  603. wmset(store, it, metadata);
  604. return metadata;
  605. };
  606. get = function (it) {
  607. return wmget(store, it) || {};
  608. };
  609. has = function (it) {
  610. return wmhas(store, it);
  611. };
  612. } else {
  613. var STATE = sharedKey('state');
  614. hiddenKeys[STATE] = true;
  615. set = function (it, metadata) {
  616. if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  617. metadata.facade = it;
  618. createNonEnumerableProperty(it, STATE, metadata);
  619. return metadata;
  620. };
  621. get = function (it) {
  622. return hasOwn(it, STATE) ? it[STATE] : {};
  623. };
  624. has = function (it) {
  625. return hasOwn(it, STATE);
  626. };
  627. }
  628. module.exports = {
  629. set: set,
  630. get: get,
  631. has: has,
  632. enforce: enforce,
  633. getterFor: getterFor
  634. };
  635. /***/ }),
  636. /***/ "6b0d":
  637. /***/ (function(module, exports, __webpack_require__) {
  638. "use strict";
  639. Object.defineProperty(exports, "__esModule", { value: true });
  640. // runtime helper for setting properties on components
  641. // in a tree-shakable way
  642. exports.default = (sfc, props) => {
  643. const target = sfc.__vccOpts || sfc;
  644. for (const [key, val] of props) {
  645. target[key] = val;
  646. }
  647. return target;
  648. };
  649. /***/ }),
  650. /***/ "7156":
  651. /***/ (function(module, exports, __webpack_require__) {
  652. var isCallable = __webpack_require__("1626");
  653. var isObject = __webpack_require__("861d");
  654. var setPrototypeOf = __webpack_require__("d2bb");
  655. // makes subclassing work correct for wrapped built-ins
  656. module.exports = function ($this, dummy, Wrapper) {
  657. var NewTarget, NewTargetPrototype;
  658. if (
  659. // it can work only with native `setPrototypeOf`
  660. setPrototypeOf &&
  661. // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
  662. isCallable(NewTarget = dummy.constructor) &&
  663. NewTarget !== Wrapper &&
  664. isObject(NewTargetPrototype = NewTarget.prototype) &&
  665. NewTargetPrototype !== Wrapper.prototype
  666. ) setPrototypeOf($this, NewTargetPrototype);
  667. return $this;
  668. };
  669. /***/ }),
  670. /***/ "7418":
  671. /***/ (function(module, exports) {
  672. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
  673. exports.f = Object.getOwnPropertySymbols;
  674. /***/ }),
  675. /***/ "7839":
  676. /***/ (function(module, exports) {
  677. // IE8- don't enum bug keys
  678. module.exports = [
  679. 'constructor',
  680. 'hasOwnProperty',
  681. 'isPrototypeOf',
  682. 'propertyIsEnumerable',
  683. 'toLocaleString',
  684. 'toString',
  685. 'valueOf'
  686. ];
  687. /***/ }),
  688. /***/ "7b0b":
  689. /***/ (function(module, exports, __webpack_require__) {
  690. var requireObjectCoercible = __webpack_require__("1d80");
  691. var $Object = Object;
  692. // `ToObject` abstract operation
  693. // https://tc39.es/ecma262/#sec-toobject
  694. module.exports = function (argument) {
  695. return $Object(requireObjectCoercible(argument));
  696. };
  697. /***/ }),
  698. /***/ "7f9a":
  699. /***/ (function(module, exports, __webpack_require__) {
  700. var global = __webpack_require__("da84");
  701. var isCallable = __webpack_require__("1626");
  702. var inspectSource = __webpack_require__("8925");
  703. var WeakMap = global.WeakMap;
  704. module.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));
  705. /***/ }),
  706. /***/ "825a":
  707. /***/ (function(module, exports, __webpack_require__) {
  708. var isObject = __webpack_require__("861d");
  709. var $String = String;
  710. var $TypeError = TypeError;
  711. // `Assert: Type(argument) is Object`
  712. module.exports = function (argument) {
  713. if (isObject(argument)) return argument;
  714. throw $TypeError($String(argument) + ' is not an object');
  715. };
  716. /***/ }),
  717. /***/ "83ab":
  718. /***/ (function(module, exports, __webpack_require__) {
  719. var fails = __webpack_require__("d039");
  720. // Detect IE8's incomplete defineProperty implementation
  721. module.exports = !fails(function () {
  722. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  723. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  724. });
  725. /***/ }),
  726. /***/ "861d":
  727. /***/ (function(module, exports, __webpack_require__) {
  728. var isCallable = __webpack_require__("1626");
  729. module.exports = function (it) {
  730. return typeof it == 'object' ? it !== null : isCallable(it);
  731. };
  732. /***/ }),
  733. /***/ "8925":
  734. /***/ (function(module, exports, __webpack_require__) {
  735. var uncurryThis = __webpack_require__("e330");
  736. var isCallable = __webpack_require__("1626");
  737. var store = __webpack_require__("c6cd");
  738. var functionToString = uncurryThis(Function.toString);
  739. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  740. if (!isCallable(store.inspectSource)) {
  741. store.inspectSource = function (it) {
  742. return functionToString(it);
  743. };
  744. }
  745. module.exports = store.inspectSource;
  746. /***/ }),
  747. /***/ "8bbf":
  748. /***/ (function(module, exports) {
  749. module.exports = require("vue");
  750. /***/ }),
  751. /***/ "90e3":
  752. /***/ (function(module, exports, __webpack_require__) {
  753. var uncurryThis = __webpack_require__("e330");
  754. var id = 0;
  755. var postfix = Math.random();
  756. var toString = uncurryThis(1.0.toString);
  757. module.exports = function (key) {
  758. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  759. };
  760. /***/ }),
  761. /***/ "9112":
  762. /***/ (function(module, exports, __webpack_require__) {
  763. var DESCRIPTORS = __webpack_require__("83ab");
  764. var definePropertyModule = __webpack_require__("9bf2");
  765. var createPropertyDescriptor = __webpack_require__("5c6c");
  766. module.exports = DESCRIPTORS ? function (object, key, value) {
  767. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  768. } : function (object, key, value) {
  769. object[key] = value;
  770. return object;
  771. };
  772. /***/ }),
  773. /***/ "9224":
  774. /***/ (function(module) {
  775. module.exports = JSON.parse("{\"name\":\"vue3-tree-org\",\"version\":\"4.2.2\",\"author\":\"sangtian152\",\"private\":false,\"main\":\"lib/vue3-tree-org.common.js\",\"module\":\"lib/index.esm.js\",\"typings\":\"lib/index.d.ts\",\"license\":\"MIT\",\"homepage\":\"https://sangtian152.github.io/vue3-tree-org\",\"files\":[\"lib\"],\"repository\":{\"type\":\"git\",\"url\":\"https://gitee.com/sangtian152/vue3-tree-org.git\"},\"keywords\":[\"vue3-tree-org\",\"orgchart\",\"vue\",\"tree-org\",\"组织架构图\"],\"scripts\":{\"dev\":\"vuepress dev docs\",\"serve\":\"vue-cli-service serve\",\"lint\":\"vue-cli-service lint\",\"clean:dist\":\"rimraf dist\",\"build\":\"npm run build:docs && npm run build:lib && npm run build:esm\",\"build:docs\":\"vuepress build docs\",\"build:lib\":\"vue-cli-service build --target lib --name vue3-tree-org --dest lib src/index.ts\",\"build:esm\":\"npm run clean:dist && gulp --require sucrase/register/ts -f build/gulpfile.ts\"},\"peerDependencies\":{\"vue\":\"^3.0.0\"},\"dependencies\":{\"core-js\":\"^3.6.5\"},\"devDependencies\":{\"@rollup/plugin-json\":\"^4.1.0\",\"@rollup/plugin-node-resolve\":\"^13.0.5\",\"@types/gulp\":\"^4.0.9\",\"@types/gulp-rename\":\"^2.0.1\",\"@types/gulp-sass\":\"^5.0.0\",\"@types/sass\":\"^1.43.1\",\"@typescript-eslint/eslint-plugin\":\"^4.18.0\",\"@typescript-eslint/parser\":\"^4.18.0\",\"@vue/cli-plugin-babel\":\"~4.5.0\",\"@vue/cli-plugin-eslint\":\"~4.5.0\",\"@vue/cli-plugin-router\":\"~4.5.0\",\"@vue/cli-plugin-typescript\":\"~4.5.0\",\"@vue/cli-service\":\"~4.5.0\",\"@vue/compiler-sfc\":\"^3.0.0\",\"@vue/eslint-config-standard\":\"^5.1.2\",\"@vue/eslint-config-typescript\":\"^7.0.0\",\"element-plus\":\"^1.3.0-beta.9\",\"escape-html\":\"^1.0.3\",\"eslint\":\"^6.7.2\",\"eslint-plugin-import\":\"^2.20.2\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"^4.2.1\",\"eslint-plugin-standard\":\"^4.0.0\",\"eslint-plugin-vue\":\"^7.0.0\",\"gulp\":\"^4.0.2\",\"gulp-rename\":\"^2.0.0\",\"gulp-sass\":\"^5.1.0\",\"markdown-it\":\"^12.3.2\",\"markdown-it-container\":\"^3.0.0\",\"node-sass\":\"^4.14.1\",\"rollup\":\"^2.58.0\",\"rollup-plugin-terser\":\"^7.0.2\",\"rollup-plugin-typescript2\":\"^0.30.0\",\"rollup-plugin-vue\":\"^6.0.0\",\"sass\":\"^1.49.9\",\"sass-loader\":\"^10.2.1\",\"sucrase\":\"^3.20.3\",\"typescript\":\"~4.1.5\",\"unplugin-element-plus\":\"^0.2.0\",\"vue-router\":\"^4.0.0-0\",\"vuepress\":\"^2.0.0-beta.49\"}}");
  776. /***/ }),
  777. /***/ "94ca":
  778. /***/ (function(module, exports, __webpack_require__) {
  779. var fails = __webpack_require__("d039");
  780. var isCallable = __webpack_require__("1626");
  781. var replacement = /#|\.prototype\./;
  782. var isForced = function (feature, detection) {
  783. var value = data[normalize(feature)];
  784. return value == POLYFILL ? true
  785. : value == NATIVE ? false
  786. : isCallable(detection) ? fails(detection)
  787. : !!detection;
  788. };
  789. var normalize = isForced.normalize = function (string) {
  790. return String(string).replace(replacement, '.').toLowerCase();
  791. };
  792. var data = isForced.data = {};
  793. var NATIVE = isForced.NATIVE = 'N';
  794. var POLYFILL = isForced.POLYFILL = 'P';
  795. module.exports = isForced;
  796. /***/ }),
  797. /***/ "9bf2":
  798. /***/ (function(module, exports, __webpack_require__) {
  799. var DESCRIPTORS = __webpack_require__("83ab");
  800. var IE8_DOM_DEFINE = __webpack_require__("0cfb");
  801. var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__("aed9");
  802. var anObject = __webpack_require__("825a");
  803. var toPropertyKey = __webpack_require__("a04b");
  804. var $TypeError = TypeError;
  805. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  806. var $defineProperty = Object.defineProperty;
  807. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  808. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  809. var ENUMERABLE = 'enumerable';
  810. var CONFIGURABLE = 'configurable';
  811. var WRITABLE = 'writable';
  812. // `Object.defineProperty` method
  813. // https://tc39.es/ecma262/#sec-object.defineproperty
  814. exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  815. anObject(O);
  816. P = toPropertyKey(P);
  817. anObject(Attributes);
  818. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  819. var current = $getOwnPropertyDescriptor(O, P);
  820. if (current && current[WRITABLE]) {
  821. O[P] = Attributes.value;
  822. Attributes = {
  823. configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
  824. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  825. writable: false
  826. };
  827. }
  828. } return $defineProperty(O, P, Attributes);
  829. } : $defineProperty : function defineProperty(O, P, Attributes) {
  830. anObject(O);
  831. P = toPropertyKey(P);
  832. anObject(Attributes);
  833. if (IE8_DOM_DEFINE) try {
  834. return $defineProperty(O, P, Attributes);
  835. } catch (error) { /* empty */ }
  836. if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
  837. if ('value' in Attributes) O[P] = Attributes.value;
  838. return O;
  839. };
  840. /***/ }),
  841. /***/ "9ff4":
  842. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  843. "use strict";
  844. /* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export EMPTY_ARR */
  845. /* unused harmony export EMPTY_OBJ */
  846. /* unused harmony export NO */
  847. /* unused harmony export NOOP */
  848. /* unused harmony export PatchFlagNames */
  849. /* unused harmony export camelize */
  850. /* unused harmony export capitalize */
  851. /* unused harmony export def */
  852. /* unused harmony export escapeHtml */
  853. /* unused harmony export escapeHtmlComment */
  854. /* unused harmony export extend */
  855. /* unused harmony export genPropsAccessExp */
  856. /* unused harmony export generateCodeFrame */
  857. /* unused harmony export getGlobalThis */
  858. /* unused harmony export hasChanged */
  859. /* unused harmony export hasOwn */
  860. /* unused harmony export hyphenate */
  861. /* unused harmony export includeBooleanAttr */
  862. /* unused harmony export invokeArrayFns */
  863. /* unused harmony export isArray */
  864. /* unused harmony export isBooleanAttr */
  865. /* unused harmony export isBuiltInDirective */
  866. /* unused harmony export isDate */
  867. /* unused harmony export isFunction */
  868. /* unused harmony export isGloballyWhitelisted */
  869. /* unused harmony export isHTMLTag */
  870. /* unused harmony export isIntegerKey */
  871. /* unused harmony export isKnownHtmlAttr */
  872. /* unused harmony export isKnownSvgAttr */
  873. /* unused harmony export isMap */
  874. /* unused harmony export isModelListener */
  875. /* unused harmony export isNoUnitNumericStyleProp */
  876. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isObject; });
  877. /* unused harmony export isOn */
  878. /* unused harmony export isPlainObject */
  879. /* unused harmony export isPromise */
  880. /* unused harmony export isReservedProp */
  881. /* unused harmony export isSSRSafeAttrName */
  882. /* unused harmony export isSVGTag */
  883. /* unused harmony export isSet */
  884. /* unused harmony export isSpecialBooleanAttr */
  885. /* unused harmony export isString */
  886. /* unused harmony export isSymbol */
  887. /* unused harmony export isVoidTag */
  888. /* unused harmony export looseEqual */
  889. /* unused harmony export looseIndexOf */
  890. /* unused harmony export makeMap */
  891. /* unused harmony export normalizeClass */
  892. /* unused harmony export normalizeProps */
  893. /* unused harmony export normalizeStyle */
  894. /* unused harmony export objectToString */
  895. /* unused harmony export parseStringStyle */
  896. /* unused harmony export propsToAttrMap */
  897. /* unused harmony export remove */
  898. /* unused harmony export slotFlagsText */
  899. /* unused harmony export stringifyStyle */
  900. /* unused harmony export toDisplayString */
  901. /* unused harmony export toHandlerKey */
  902. /* unused harmony export toNumber */
  903. /* unused harmony export toRawType */
  904. /* unused harmony export toTypeString */
  905. /**
  906. * Make a map and return a function for checking if a key
  907. * is in that map.
  908. * IMPORTANT: all calls of this function must be prefixed with
  909. * \/\*#\_\_PURE\_\_\*\/
  910. * So that rollup can tree-shake them if necessary.
  911. */
  912. function makeMap(str, expectsLowerCase) {
  913. const map = Object.create(null);
  914. const list = str.split(',');
  915. for (let i = 0; i < list.length; i++) {
  916. map[list[i]] = true;
  917. }
  918. return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val];
  919. }
  920. /**
  921. * dev only flag -> name mapping
  922. */
  923. const PatchFlagNames = {
  924. [1 /* TEXT */]: `TEXT`,
  925. [2 /* CLASS */]: `CLASS`,
  926. [4 /* STYLE */]: `STYLE`,
  927. [8 /* PROPS */]: `PROPS`,
  928. [16 /* FULL_PROPS */]: `FULL_PROPS`,
  929. [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`,
  930. [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`,
  931. [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`,
  932. [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`,
  933. [512 /* NEED_PATCH */]: `NEED_PATCH`,
  934. [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`,
  935. [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`,
  936. [-1 /* HOISTED */]: `HOISTED`,
  937. [-2 /* BAIL */]: `BAIL`
  938. };
  939. /**
  940. * Dev only
  941. */
  942. const slotFlagsText = {
  943. [1 /* STABLE */]: 'STABLE',
  944. [2 /* DYNAMIC */]: 'DYNAMIC',
  945. [3 /* FORWARDED */]: 'FORWARDED'
  946. };
  947. const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +
  948. 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +
  949. 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt';
  950. const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED);
  951. const range = 2;
  952. function generateCodeFrame(source, start = 0, end = source.length) {
  953. // Split the content into individual lines but capture the newline sequence
  954. // that separated each line. This is important because the actual sequence is
  955. // needed to properly take into account the full line length for offset
  956. // comparison
  957. let lines = source.split(/(\r?\n)/);
  958. // Separate the lines and newline sequences into separate arrays for easier referencing
  959. const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);
  960. lines = lines.filter((_, idx) => idx % 2 === 0);
  961. let count = 0;
  962. const res = [];
  963. for (let i = 0; i < lines.length; i++) {
  964. count +=
  965. lines[i].length +
  966. ((newlineSequences[i] && newlineSequences[i].length) || 0);
  967. if (count >= start) {
  968. for (let j = i - range; j <= i + range || end > count; j++) {
  969. if (j < 0 || j >= lines.length)
  970. continue;
  971. const line = j + 1;
  972. res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`);
  973. const lineLength = lines[j].length;
  974. const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0;
  975. if (j === i) {
  976. // push underline
  977. const pad = start - (count - (lineLength + newLineSeqLength));
  978. const length = Math.max(1, end > count ? lineLength - pad : end - start);
  979. res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
  980. }
  981. else if (j > i) {
  982. if (end > count) {
  983. const length = Math.max(Math.min(end - count, lineLength), 1);
  984. res.push(` | ` + '^'.repeat(length));
  985. }
  986. count += lineLength + newLineSeqLength;
  987. }
  988. }
  989. break;
  990. }
  991. }
  992. return res.join('\n');
  993. }
  994. /**
  995. * On the client we only need to offer special cases for boolean attributes that
  996. * have different names from their corresponding dom properties:
  997. * - itemscope -> N/A
  998. * - allowfullscreen -> allowFullscreen
  999. * - formnovalidate -> formNoValidate
  1000. * - ismap -> isMap
  1001. * - nomodule -> noModule
  1002. * - novalidate -> noValidate
  1003. * - readonly -> readOnly
  1004. */
  1005. const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
  1006. const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs);
  1007. /**
  1008. * The full list is needed during SSR to produce the correct initial markup.
  1009. */
  1010. const isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs +
  1011. `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,` +
  1012. `loop,open,required,reversed,scoped,seamless,` +
  1013. `checked,muted,multiple,selected`);
  1014. /**
  1015. * Boolean attributes should be included if the value is truthy or ''.
  1016. * e.g. `<select multiple>` compiles to `{ multiple: '' }`
  1017. */
  1018. function includeBooleanAttr(value) {
  1019. return !!value || value === '';
  1020. }
  1021. const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
  1022. const attrValidationCache = {};
  1023. function isSSRSafeAttrName(name) {
  1024. if (attrValidationCache.hasOwnProperty(name)) {
  1025. return attrValidationCache[name];
  1026. }
  1027. const isUnsafe = unsafeAttrCharRE.test(name);
  1028. if (isUnsafe) {
  1029. console.error(`unsafe attribute name: ${name}`);
  1030. }
  1031. return (attrValidationCache[name] = !isUnsafe);
  1032. }
  1033. const propsToAttrMap = {
  1034. acceptCharset: 'accept-charset',
  1035. className: 'class',
  1036. htmlFor: 'for',
  1037. httpEquiv: 'http-equiv'
  1038. };
  1039. /**
  1040. * CSS properties that accept plain numbers
  1041. */
  1042. const isNoUnitNumericStyleProp = /*#__PURE__*/ makeMap(`animation-iteration-count,border-image-outset,border-image-slice,` +
  1043. `border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,` +
  1044. `columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,` +
  1045. `grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,` +
  1046. `grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,` +
  1047. `line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,` +
  1048. // SVG
  1049. `fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,` +
  1050. `stroke-miterlimit,stroke-opacity,stroke-width`);
  1051. /**
  1052. * Known attributes, this is used for stringification of runtime static nodes
  1053. * so that we don't stringify bindings that cannot be set from HTML.
  1054. * Don't also forget to allow `data-*` and `aria-*`!
  1055. * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
  1056. */
  1057. const isKnownHtmlAttr = /*#__PURE__*/ makeMap(`accept,accept-charset,accesskey,action,align,allow,alt,async,` +
  1058. `autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,` +
  1059. `border,buffered,capture,challenge,charset,checked,cite,class,code,` +
  1060. `codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,` +
  1061. `coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,` +
  1062. `disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,` +
  1063. `formaction,formenctype,formmethod,formnovalidate,formtarget,headers,` +
  1064. `height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,` +
  1065. `ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,` +
  1066. `manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,` +
  1067. `open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,` +
  1068. `referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,` +
  1069. `selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,` +
  1070. `start,step,style,summary,tabindex,target,title,translate,type,usemap,` +
  1071. `value,width,wrap`);
  1072. /**
  1073. * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
  1074. */
  1075. const isKnownSvgAttr = /*#__PURE__*/ makeMap(`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,` +
  1076. `arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,` +
  1077. `baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,` +
  1078. `clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,` +
  1079. `color-interpolation-filters,color-profile,color-rendering,` +
  1080. `contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,` +
  1081. `descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,` +
  1082. `dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,` +
  1083. `fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,` +
  1084. `font-family,font-size,font-size-adjust,font-stretch,font-style,` +
  1085. `font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,` +
  1086. `glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,` +
  1087. `gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,` +
  1088. `horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,` +
  1089. `k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,` +
  1090. `lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,` +
  1091. `marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,` +
  1092. `mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,` +
  1093. `name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,` +
  1094. `overflow,overline-position,overline-thickness,panose-1,paint-order,path,` +
  1095. `pathLength,patternContentUnits,patternTransform,patternUnits,ping,` +
  1096. `pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,` +
  1097. `preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,` +
  1098. `rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,` +
  1099. `restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,` +
  1100. `specularConstant,specularExponent,speed,spreadMethod,startOffset,` +
  1101. `stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,` +
  1102. `strikethrough-position,strikethrough-thickness,string,stroke,` +
  1103. `stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,` +
  1104. `stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,` +
  1105. `systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,` +
  1106. `text-decoration,text-rendering,textLength,to,transform,transform-origin,` +
  1107. `type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,` +
  1108. `unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,` +
  1109. `v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,` +
  1110. `vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,` +
  1111. `writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,` +
  1112. `xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,` +
  1113. `xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`);
  1114. function normalizeStyle(value) {
  1115. if (isArray(value)) {
  1116. const res = {};
  1117. for (let i = 0; i < value.length; i++) {
  1118. const item = value[i];
  1119. const normalized = isString(item)
  1120. ? parseStringStyle(item)
  1121. : normalizeStyle(item);
  1122. if (normalized) {
  1123. for (const key in normalized) {
  1124. res[key] = normalized[key];
  1125. }
  1126. }
  1127. }
  1128. return res;
  1129. }
  1130. else if (isString(value)) {
  1131. return value;
  1132. }
  1133. else if (isObject(value)) {
  1134. return value;
  1135. }
  1136. }
  1137. const listDelimiterRE = /;(?![^(]*\))/g;
  1138. const propertyDelimiterRE = /:(.+)/;
  1139. function parseStringStyle(cssText) {
  1140. const ret = {};
  1141. cssText.split(listDelimiterRE).forEach(item => {
  1142. if (item) {
  1143. const tmp = item.split(propertyDelimiterRE);
  1144. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  1145. }
  1146. });
  1147. return ret;
  1148. }
  1149. function stringifyStyle(styles) {
  1150. let ret = '';
  1151. if (!styles || isString(styles)) {
  1152. return ret;
  1153. }
  1154. for (const key in styles) {
  1155. const value = styles[key];
  1156. const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
  1157. if (isString(value) ||
  1158. (typeof value === 'number' && isNoUnitNumericStyleProp(normalizedKey))) {
  1159. // only render valid values
  1160. ret += `${normalizedKey}:${value};`;
  1161. }
  1162. }
  1163. return ret;
  1164. }
  1165. function normalizeClass(value) {
  1166. let res = '';
  1167. if (isString(value)) {
  1168. res = value;
  1169. }
  1170. else if (isArray(value)) {
  1171. for (let i = 0; i < value.length; i++) {
  1172. const normalized = normalizeClass(value[i]);
  1173. if (normalized) {
  1174. res += normalized + ' ';
  1175. }
  1176. }
  1177. }
  1178. else if (isObject(value)) {
  1179. for (const name in value) {
  1180. if (value[name]) {
  1181. res += name + ' ';
  1182. }
  1183. }
  1184. }
  1185. return res.trim();
  1186. }
  1187. function normalizeProps(props) {
  1188. if (!props)
  1189. return null;
  1190. let { class: klass, style } = props;
  1191. if (klass && !isString(klass)) {
  1192. props.class = normalizeClass(klass);
  1193. }
  1194. if (style) {
  1195. props.style = normalizeStyle(style);
  1196. }
  1197. return props;
  1198. }
  1199. // These tag configs are shared between compiler-dom and runtime-dom, so they
  1200. // https://developer.mozilla.org/en-US/docs/Web/HTML/Element
  1201. const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +
  1202. 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
  1203. 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +
  1204. 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +
  1205. 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +
  1206. 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' +
  1207. 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' +
  1208. 'option,output,progress,select,textarea,details,dialog,menu,' +
  1209. 'summary,template,blockquote,iframe,tfoot';
  1210. // https://developer.mozilla.org/en-US/docs/Web/SVG/Element
  1211. const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +
  1212. 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +
  1213. 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +
  1214. 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
  1215. 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +
  1216. 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +
  1217. 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +
  1218. 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' +
  1219. 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
  1220. 'text,textPath,title,tspan,unknown,use,view';
  1221. const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
  1222. /**
  1223. * Compiler only.
  1224. * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
  1225. */
  1226. const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
  1227. /**
  1228. * Compiler only.
  1229. * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
  1230. */
  1231. const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
  1232. /**
  1233. * Compiler only.
  1234. * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
  1235. */
  1236. const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
  1237. const escapeRE = /["'&<>]/;
  1238. function escapeHtml(string) {
  1239. const str = '' + string;
  1240. const match = escapeRE.exec(str);
  1241. if (!match) {
  1242. return str;
  1243. }
  1244. let html = '';
  1245. let escaped;
  1246. let index;
  1247. let lastIndex = 0;
  1248. for (index = match.index; index < str.length; index++) {
  1249. switch (str.charCodeAt(index)) {
  1250. case 34: // "
  1251. escaped = '&quot;';
  1252. break;
  1253. case 38: // &
  1254. escaped = '&amp;';
  1255. break;
  1256. case 39: // '
  1257. escaped = '&#39;';
  1258. break;
  1259. case 60: // <
  1260. escaped = '&lt;';
  1261. break;
  1262. case 62: // >
  1263. escaped = '&gt;';
  1264. break;
  1265. default:
  1266. continue;
  1267. }
  1268. if (lastIndex !== index) {
  1269. html += str.slice(lastIndex, index);
  1270. }
  1271. lastIndex = index + 1;
  1272. html += escaped;
  1273. }
  1274. return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
  1275. }
  1276. // https://www.w3.org/TR/html52/syntax.html#comments
  1277. const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
  1278. function escapeHtmlComment(src) {
  1279. return src.replace(commentStripRE, '');
  1280. }
  1281. function looseCompareArrays(a, b) {
  1282. if (a.length !== b.length)
  1283. return false;
  1284. let equal = true;
  1285. for (let i = 0; equal && i < a.length; i++) {
  1286. equal = looseEqual(a[i], b[i]);
  1287. }
  1288. return equal;
  1289. }
  1290. function looseEqual(a, b) {
  1291. if (a === b)
  1292. return true;
  1293. let aValidType = isDate(a);
  1294. let bValidType = isDate(b);
  1295. if (aValidType || bValidType) {
  1296. return aValidType && bValidType ? a.getTime() === b.getTime() : false;
  1297. }
  1298. aValidType = isSymbol(a);
  1299. bValidType = isSymbol(b);
  1300. if (aValidType || bValidType) {
  1301. return a === b;
  1302. }
  1303. aValidType = isArray(a);
  1304. bValidType = isArray(b);
  1305. if (aValidType || bValidType) {
  1306. return aValidType && bValidType ? looseCompareArrays(a, b) : false;
  1307. }
  1308. aValidType = isObject(a);
  1309. bValidType = isObject(b);
  1310. if (aValidType || bValidType) {
  1311. /* istanbul ignore if: this if will probably never be called */
  1312. if (!aValidType || !bValidType) {
  1313. return false;
  1314. }
  1315. const aKeysCount = Object.keys(a).length;
  1316. const bKeysCount = Object.keys(b).length;
  1317. if (aKeysCount !== bKeysCount) {
  1318. return false;
  1319. }
  1320. for (const key in a) {
  1321. const aHasKey = a.hasOwnProperty(key);
  1322. const bHasKey = b.hasOwnProperty(key);
  1323. if ((aHasKey && !bHasKey) ||
  1324. (!aHasKey && bHasKey) ||
  1325. !looseEqual(a[key], b[key])) {
  1326. return false;
  1327. }
  1328. }
  1329. }
  1330. return String(a) === String(b);
  1331. }
  1332. function looseIndexOf(arr, val) {
  1333. return arr.findIndex(item => looseEqual(item, val));
  1334. }
  1335. /**
  1336. * For converting {{ interpolation }} values to displayed strings.
  1337. * @private
  1338. */
  1339. const toDisplayString = (val) => {
  1340. return isString(val)
  1341. ? val
  1342. : val == null
  1343. ? ''
  1344. : isArray(val) ||
  1345. (isObject(val) &&
  1346. (val.toString === objectToString || !isFunction(val.toString)))
  1347. ? JSON.stringify(val, replacer, 2)
  1348. : String(val);
  1349. };
  1350. const replacer = (_key, val) => {
  1351. // can't use isRef here since @vue/shared has no deps
  1352. if (val && val.__v_isRef) {
  1353. return replacer(_key, val.value);
  1354. }
  1355. else if (isMap(val)) {
  1356. return {
  1357. [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => {
  1358. entries[`${key} =>`] = val;
  1359. return entries;
  1360. }, {})
  1361. };
  1362. }
  1363. else if (isSet(val)) {
  1364. return {
  1365. [`Set(${val.size})`]: [...val.values()]
  1366. };
  1367. }
  1368. else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
  1369. return String(val);
  1370. }
  1371. return val;
  1372. };
  1373. const EMPTY_OBJ = ( false)
  1374. ? undefined
  1375. : {};
  1376. const EMPTY_ARR = ( false) ? undefined : [];
  1377. const NOOP = () => { };
  1378. /**
  1379. * Always return false.
  1380. */
  1381. const NO = () => false;
  1382. const onRE = /^on[^a-z]/;
  1383. const isOn = (key) => onRE.test(key);
  1384. const isModelListener = (key) => key.startsWith('onUpdate:');
  1385. const extend = Object.assign;
  1386. const remove = (arr, el) => {
  1387. const i = arr.indexOf(el);
  1388. if (i > -1) {
  1389. arr.splice(i, 1);
  1390. }
  1391. };
  1392. const hasOwnProperty = Object.prototype.hasOwnProperty;
  1393. const hasOwn = (val, key) => hasOwnProperty.call(val, key);
  1394. const isArray = Array.isArray;
  1395. const isMap = (val) => toTypeString(val) === '[object Map]';
  1396. const isSet = (val) => toTypeString(val) === '[object Set]';
  1397. const isDate = (val) => toTypeString(val) === '[object Date]';
  1398. const isFunction = (val) => typeof val === 'function';
  1399. const isString = (val) => typeof val === 'string';
  1400. const isSymbol = (val) => typeof val === 'symbol';
  1401. const isObject = (val) => val !== null && typeof val === 'object';
  1402. const isPromise = (val) => {
  1403. return isObject(val) && isFunction(val.then) && isFunction(val.catch);
  1404. };
  1405. const objectToString = Object.prototype.toString;
  1406. const toTypeString = (value) => objectToString.call(value);
  1407. const toRawType = (value) => {
  1408. // extract "RawType" from strings like "[object RawType]"
  1409. return toTypeString(value).slice(8, -1);
  1410. };
  1411. const isPlainObject = (val) => toTypeString(val) === '[object Object]';
  1412. const isIntegerKey = (key) => isString(key) &&
  1413. key !== 'NaN' &&
  1414. key[0] !== '-' &&
  1415. '' + parseInt(key, 10) === key;
  1416. const isReservedProp = /*#__PURE__*/ makeMap(
  1417. // the leading comma is intentional so empty string "" is also included
  1418. ',key,ref,ref_for,ref_key,' +
  1419. 'onVnodeBeforeMount,onVnodeMounted,' +
  1420. 'onVnodeBeforeUpdate,onVnodeUpdated,' +
  1421. 'onVnodeBeforeUnmount,onVnodeUnmounted');
  1422. const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
  1423. const cacheStringFunction = (fn) => {
  1424. const cache = Object.create(null);
  1425. return ((str) => {
  1426. const hit = cache[str];
  1427. return hit || (cache[str] = fn(str));
  1428. });
  1429. };
  1430. const camelizeRE = /-(\w)/g;
  1431. /**
  1432. * @private
  1433. */
  1434. const camelize = cacheStringFunction((str) => {
  1435. return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''));
  1436. });
  1437. const hyphenateRE = /\B([A-Z])/g;
  1438. /**
  1439. * @private
  1440. */
  1441. const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase());
  1442. /**
  1443. * @private
  1444. */
  1445. const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));
  1446. /**
  1447. * @private
  1448. */
  1449. const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);
  1450. // compare whether a value has changed, accounting for NaN.
  1451. const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  1452. const invokeArrayFns = (fns, arg) => {
  1453. for (let i = 0; i < fns.length; i++) {
  1454. fns[i](arg);
  1455. }
  1456. };
  1457. const def = (obj, key, value) => {
  1458. Object.defineProperty(obj, key, {
  1459. configurable: true,
  1460. enumerable: false,
  1461. value
  1462. });
  1463. };
  1464. const toNumber = (val) => {
  1465. const n = parseFloat(val);
  1466. return isNaN(n) ? val : n;
  1467. };
  1468. let _globalThis;
  1469. const getGlobalThis = () => {
  1470. return (_globalThis ||
  1471. (_globalThis =
  1472. typeof globalThis !== 'undefined'
  1473. ? globalThis
  1474. : typeof self !== 'undefined'
  1475. ? self
  1476. : typeof window !== 'undefined'
  1477. ? window
  1478. : typeof global !== 'undefined'
  1479. ? global
  1480. : {}));
  1481. };
  1482. const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
  1483. function genPropsAccessExp(name) {
  1484. return identRE.test(name)
  1485. ? `__props.${name}`
  1486. : `__props[${JSON.stringify(name)}]`;
  1487. }
  1488. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
  1489. /***/ }),
  1490. /***/ "a04b":
  1491. /***/ (function(module, exports, __webpack_require__) {
  1492. var toPrimitive = __webpack_require__("c04e");
  1493. var isSymbol = __webpack_require__("d9b5");
  1494. // `ToPropertyKey` abstract operation
  1495. // https://tc39.es/ecma262/#sec-topropertykey
  1496. module.exports = function (argument) {
  1497. var key = toPrimitive(argument, 'string');
  1498. return isSymbol(key) ? key : key + '';
  1499. };
  1500. /***/ }),
  1501. /***/ "ab36":
  1502. /***/ (function(module, exports, __webpack_require__) {
  1503. var isObject = __webpack_require__("861d");
  1504. var createNonEnumerableProperty = __webpack_require__("9112");
  1505. // `InstallErrorCause` abstract operation
  1506. // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
  1507. module.exports = function (O, options) {
  1508. if (isObject(options) && 'cause' in options) {
  1509. createNonEnumerableProperty(O, 'cause', options.cause);
  1510. }
  1511. };
  1512. /***/ }),
  1513. /***/ "aeb0":
  1514. /***/ (function(module, exports, __webpack_require__) {
  1515. var defineProperty = __webpack_require__("9bf2").f;
  1516. module.exports = function (Target, Source, key) {
  1517. key in Target || defineProperty(Target, key, {
  1518. configurable: true,
  1519. get: function () { return Source[key]; },
  1520. set: function (it) { Source[key] = it; }
  1521. });
  1522. };
  1523. /***/ }),
  1524. /***/ "aed9":
  1525. /***/ (function(module, exports, __webpack_require__) {
  1526. var DESCRIPTORS = __webpack_require__("83ab");
  1527. var fails = __webpack_require__("d039");
  1528. // V8 ~ Chrome 36-
  1529. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  1530. module.exports = DESCRIPTORS && fails(function () {
  1531. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  1532. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  1533. value: 42,
  1534. writable: false
  1535. }).prototype != 42;
  1536. });
  1537. /***/ }),
  1538. /***/ "b42e":
  1539. /***/ (function(module, exports) {
  1540. var ceil = Math.ceil;
  1541. var floor = Math.floor;
  1542. // `Math.trunc` method
  1543. // https://tc39.es/ecma262/#sec-math.trunc
  1544. // eslint-disable-next-line es-x/no-math-trunc -- safe
  1545. module.exports = Math.trunc || function trunc(x) {
  1546. var n = +x;
  1547. return (n > 0 ? floor : ceil)(n);
  1548. };
  1549. /***/ }),
  1550. /***/ "b622":
  1551. /***/ (function(module, exports, __webpack_require__) {
  1552. var global = __webpack_require__("da84");
  1553. var shared = __webpack_require__("5692");
  1554. var hasOwn = __webpack_require__("1a2d");
  1555. var uid = __webpack_require__("90e3");
  1556. var NATIVE_SYMBOL = __webpack_require__("4930");
  1557. var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");
  1558. var WellKnownSymbolsStore = shared('wks');
  1559. var Symbol = global.Symbol;
  1560. var symbolFor = Symbol && Symbol['for'];
  1561. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
  1562. module.exports = function (name) {
  1563. if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  1564. var description = 'Symbol.' + name;
  1565. if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {
  1566. WellKnownSymbolsStore[name] = Symbol[name];
  1567. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  1568. WellKnownSymbolsStore[name] = symbolFor(description);
  1569. } else {
  1570. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  1571. }
  1572. } return WellKnownSymbolsStore[name];
  1573. };
  1574. /***/ }),
  1575. /***/ "b980":
  1576. /***/ (function(module, exports, __webpack_require__) {
  1577. var fails = __webpack_require__("d039");
  1578. var createPropertyDescriptor = __webpack_require__("5c6c");
  1579. module.exports = !fails(function () {
  1580. var error = Error('a');
  1581. if (!('stack' in error)) return true;
  1582. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  1583. Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
  1584. return error.stack !== 7;
  1585. });
  1586. /***/ }),
  1587. /***/ "c04e":
  1588. /***/ (function(module, exports, __webpack_require__) {
  1589. var call = __webpack_require__("c65b");
  1590. var isObject = __webpack_require__("861d");
  1591. var isSymbol = __webpack_require__("d9b5");
  1592. var getMethod = __webpack_require__("dc4a");
  1593. var ordinaryToPrimitive = __webpack_require__("485a");
  1594. var wellKnownSymbol = __webpack_require__("b622");
  1595. var $TypeError = TypeError;
  1596. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  1597. // `ToPrimitive` abstract operation
  1598. // https://tc39.es/ecma262/#sec-toprimitive
  1599. module.exports = function (input, pref) {
  1600. if (!isObject(input) || isSymbol(input)) return input;
  1601. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  1602. var result;
  1603. if (exoticToPrim) {
  1604. if (pref === undefined) pref = 'default';
  1605. result = call(exoticToPrim, input, pref);
  1606. if (!isObject(result) || isSymbol(result)) return result;
  1607. throw $TypeError("Can't convert object to primitive value");
  1608. }
  1609. if (pref === undefined) pref = 'number';
  1610. return ordinaryToPrimitive(input, pref);
  1611. };
  1612. /***/ }),
  1613. /***/ "c430":
  1614. /***/ (function(module, exports) {
  1615. module.exports = false;
  1616. /***/ }),
  1617. /***/ "c65b":
  1618. /***/ (function(module, exports, __webpack_require__) {
  1619. var NATIVE_BIND = __webpack_require__("40d5");
  1620. var call = Function.prototype.call;
  1621. module.exports = NATIVE_BIND ? call.bind(call) : function () {
  1622. return call.apply(call, arguments);
  1623. };
  1624. /***/ }),
  1625. /***/ "c6b6":
  1626. /***/ (function(module, exports, __webpack_require__) {
  1627. var uncurryThis = __webpack_require__("e330");
  1628. var toString = uncurryThis({}.toString);
  1629. var stringSlice = uncurryThis(''.slice);
  1630. module.exports = function (it) {
  1631. return stringSlice(toString(it), 8, -1);
  1632. };
  1633. /***/ }),
  1634. /***/ "c6cd":
  1635. /***/ (function(module, exports, __webpack_require__) {
  1636. var global = __webpack_require__("da84");
  1637. var defineGlobalProperty = __webpack_require__("6374");
  1638. var SHARED = '__core-js_shared__';
  1639. var store = global[SHARED] || defineGlobalProperty(SHARED, {});
  1640. module.exports = store;
  1641. /***/ }),
  1642. /***/ "c770":
  1643. /***/ (function(module, exports, __webpack_require__) {
  1644. var uncurryThis = __webpack_require__("e330");
  1645. var $Error = Error;
  1646. var replace = uncurryThis(''.replace);
  1647. var TEST = (function (arg) { return String($Error(arg).stack); })('zxcasd');
  1648. var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
  1649. var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
  1650. module.exports = function (stack, dropEntries) {
  1651. if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
  1652. while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
  1653. } return stack;
  1654. };
  1655. /***/ }),
  1656. /***/ "c8ba":
  1657. /***/ (function(module, exports) {
  1658. var g;
  1659. // This works in non-strict mode
  1660. g = (function() {
  1661. return this;
  1662. })();
  1663. try {
  1664. // This works if eval is allowed (see CSP)
  1665. g = g || new Function("return this")();
  1666. } catch (e) {
  1667. // This works if the window reference is available
  1668. if (typeof window === "object") g = window;
  1669. }
  1670. // g can still be undefined, but nothing to do about it...
  1671. // We return undefined, instead of nothing here, so it's
  1672. // easier to handle this case. if(!global) { ...}
  1673. module.exports = g;
  1674. /***/ }),
  1675. /***/ "ca84":
  1676. /***/ (function(module, exports, __webpack_require__) {
  1677. var uncurryThis = __webpack_require__("e330");
  1678. var hasOwn = __webpack_require__("1a2d");
  1679. var toIndexedObject = __webpack_require__("fc6a");
  1680. var indexOf = __webpack_require__("4d64").indexOf;
  1681. var hiddenKeys = __webpack_require__("d012");
  1682. var push = uncurryThis([].push);
  1683. module.exports = function (object, names) {
  1684. var O = toIndexedObject(object);
  1685. var i = 0;
  1686. var result = [];
  1687. var key;
  1688. for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  1689. // Don't enum bug & hidden keys
  1690. while (names.length > i) if (hasOwn(O, key = names[i++])) {
  1691. ~indexOf(result, key) || push(result, key);
  1692. }
  1693. return result;
  1694. };
  1695. /***/ }),
  1696. /***/ "cb2d":
  1697. /***/ (function(module, exports, __webpack_require__) {
  1698. var isCallable = __webpack_require__("1626");
  1699. var definePropertyModule = __webpack_require__("9bf2");
  1700. var makeBuiltIn = __webpack_require__("13d2");
  1701. var defineGlobalProperty = __webpack_require__("6374");
  1702. module.exports = function (O, key, value, options) {
  1703. if (!options) options = {};
  1704. var simple = options.enumerable;
  1705. var name = options.name !== undefined ? options.name : key;
  1706. if (isCallable(value)) makeBuiltIn(value, name, options);
  1707. if (options.global) {
  1708. if (simple) O[key] = value;
  1709. else defineGlobalProperty(key, value);
  1710. } else {
  1711. try {
  1712. if (!options.unsafe) delete O[key];
  1713. else if (O[key]) simple = true;
  1714. } catch (error) { /* empty */ }
  1715. if (simple) O[key] = value;
  1716. else definePropertyModule.f(O, key, {
  1717. value: value,
  1718. enumerable: false,
  1719. configurable: !options.nonConfigurable,
  1720. writable: !options.nonWritable
  1721. });
  1722. } return O;
  1723. };
  1724. /***/ }),
  1725. /***/ "cc12":
  1726. /***/ (function(module, exports, __webpack_require__) {
  1727. var global = __webpack_require__("da84");
  1728. var isObject = __webpack_require__("861d");
  1729. var document = global.document;
  1730. // typeof document.createElement is 'object' in old IE
  1731. var EXISTS = isObject(document) && isObject(document.createElement);
  1732. module.exports = function (it) {
  1733. return EXISTS ? document.createElement(it) : {};
  1734. };
  1735. /***/ }),
  1736. /***/ "d012":
  1737. /***/ (function(module, exports) {
  1738. module.exports = {};
  1739. /***/ }),
  1740. /***/ "d039":
  1741. /***/ (function(module, exports) {
  1742. module.exports = function (exec) {
  1743. try {
  1744. return !!exec();
  1745. } catch (error) {
  1746. return true;
  1747. }
  1748. };
  1749. /***/ }),
  1750. /***/ "d066":
  1751. /***/ (function(module, exports, __webpack_require__) {
  1752. var global = __webpack_require__("da84");
  1753. var isCallable = __webpack_require__("1626");
  1754. var aFunction = function (argument) {
  1755. return isCallable(argument) ? argument : undefined;
  1756. };
  1757. module.exports = function (namespace, method) {
  1758. return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
  1759. };
  1760. /***/ }),
  1761. /***/ "d1e7":
  1762. /***/ (function(module, exports, __webpack_require__) {
  1763. "use strict";
  1764. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  1765. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  1766. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  1767. // Nashorn ~ JDK8 bug
  1768. var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  1769. // `Object.prototype.propertyIsEnumerable` method implementation
  1770. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  1771. exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  1772. var descriptor = getOwnPropertyDescriptor(this, V);
  1773. return !!descriptor && descriptor.enumerable;
  1774. } : $propertyIsEnumerable;
  1775. /***/ }),
  1776. /***/ "d2bb":
  1777. /***/ (function(module, exports, __webpack_require__) {
  1778. /* eslint-disable no-proto -- safe */
  1779. var uncurryThis = __webpack_require__("e330");
  1780. var anObject = __webpack_require__("825a");
  1781. var aPossiblePrototype = __webpack_require__("3bbe");
  1782. // `Object.setPrototypeOf` method
  1783. // https://tc39.es/ecma262/#sec-object.setprototypeof
  1784. // Works with __proto__ only. Old v8 can't work with null proto objects.
  1785. // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
  1786. module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  1787. var CORRECT_SETTER = false;
  1788. var test = {};
  1789. var setter;
  1790. try {
  1791. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  1792. setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
  1793. setter(test, []);
  1794. CORRECT_SETTER = test instanceof Array;
  1795. } catch (error) { /* empty */ }
  1796. return function setPrototypeOf(O, proto) {
  1797. anObject(O);
  1798. aPossiblePrototype(proto);
  1799. if (CORRECT_SETTER) setter(O, proto);
  1800. else O.__proto__ = proto;
  1801. return O;
  1802. };
  1803. }() : undefined);
  1804. /***/ }),
  1805. /***/ "d9b5":
  1806. /***/ (function(module, exports, __webpack_require__) {
  1807. var getBuiltIn = __webpack_require__("d066");
  1808. var isCallable = __webpack_require__("1626");
  1809. var isPrototypeOf = __webpack_require__("3a9b");
  1810. var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");
  1811. var $Object = Object;
  1812. module.exports = USE_SYMBOL_AS_UID ? function (it) {
  1813. return typeof it == 'symbol';
  1814. } : function (it) {
  1815. var $Symbol = getBuiltIn('Symbol');
  1816. return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
  1817. };
  1818. /***/ }),
  1819. /***/ "d9e2":
  1820. /***/ (function(module, exports, __webpack_require__) {
  1821. /* eslint-disable no-unused-vars -- required for functions `.length` */
  1822. var $ = __webpack_require__("23e7");
  1823. var global = __webpack_require__("da84");
  1824. var apply = __webpack_require__("2ba4");
  1825. var wrapErrorConstructorWithCause = __webpack_require__("e5cb");
  1826. var WEB_ASSEMBLY = 'WebAssembly';
  1827. var WebAssembly = global[WEB_ASSEMBLY];
  1828. var FORCED = Error('e', { cause: 7 }).cause !== 7;
  1829. var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
  1830. var O = {};
  1831. O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED);
  1832. $({ global: true, constructor: true, arity: 1, forced: FORCED }, O);
  1833. };
  1834. var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
  1835. if (WebAssembly && WebAssembly[ERROR_NAME]) {
  1836. var O = {};
  1837. O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED);
  1838. $({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED }, O);
  1839. }
  1840. };
  1841. // https://github.com/tc39/proposal-error-cause
  1842. exportGlobalErrorCauseWrapper('Error', function (init) {
  1843. return function Error(message) { return apply(init, this, arguments); };
  1844. });
  1845. exportGlobalErrorCauseWrapper('EvalError', function (init) {
  1846. return function EvalError(message) { return apply(init, this, arguments); };
  1847. });
  1848. exportGlobalErrorCauseWrapper('RangeError', function (init) {
  1849. return function RangeError(message) { return apply(init, this, arguments); };
  1850. });
  1851. exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
  1852. return function ReferenceError(message) { return apply(init, this, arguments); };
  1853. });
  1854. exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
  1855. return function SyntaxError(message) { return apply(init, this, arguments); };
  1856. });
  1857. exportGlobalErrorCauseWrapper('TypeError', function (init) {
  1858. return function TypeError(message) { return apply(init, this, arguments); };
  1859. });
  1860. exportGlobalErrorCauseWrapper('URIError', function (init) {
  1861. return function URIError(message) { return apply(init, this, arguments); };
  1862. });
  1863. exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
  1864. return function CompileError(message) { return apply(init, this, arguments); };
  1865. });
  1866. exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
  1867. return function LinkError(message) { return apply(init, this, arguments); };
  1868. });
  1869. exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
  1870. return function RuntimeError(message) { return apply(init, this, arguments); };
  1871. });
  1872. /***/ }),
  1873. /***/ "da84":
  1874. /***/ (function(module, exports, __webpack_require__) {
  1875. /* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {
  1876. return it && it.Math == Math && it;
  1877. };
  1878. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  1879. module.exports =
  1880. // eslint-disable-next-line es-x/no-global-this -- safe
  1881. check(typeof globalThis == 'object' && globalThis) ||
  1882. check(typeof window == 'object' && window) ||
  1883. // eslint-disable-next-line no-restricted-globals -- safe
  1884. check(typeof self == 'object' && self) ||
  1885. check(typeof global == 'object' && global) ||
  1886. // eslint-disable-next-line no-new-func -- fallback
  1887. (function () { return this; })() || Function('return this')();
  1888. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
  1889. /***/ }),
  1890. /***/ "dc4a":
  1891. /***/ (function(module, exports, __webpack_require__) {
  1892. var aCallable = __webpack_require__("59ed");
  1893. // `GetMethod` abstract operation
  1894. // https://tc39.es/ecma262/#sec-getmethod
  1895. module.exports = function (V, P) {
  1896. var func = V[P];
  1897. return func == null ? undefined : aCallable(func);
  1898. };
  1899. /***/ }),
  1900. /***/ "e330":
  1901. /***/ (function(module, exports, __webpack_require__) {
  1902. var NATIVE_BIND = __webpack_require__("40d5");
  1903. var FunctionPrototype = Function.prototype;
  1904. var bind = FunctionPrototype.bind;
  1905. var call = FunctionPrototype.call;
  1906. var uncurryThis = NATIVE_BIND && bind.bind(call, call);
  1907. module.exports = NATIVE_BIND ? function (fn) {
  1908. return fn && uncurryThis(fn);
  1909. } : function (fn) {
  1910. return fn && function () {
  1911. return call.apply(fn, arguments);
  1912. };
  1913. };
  1914. /***/ }),
  1915. /***/ "e391":
  1916. /***/ (function(module, exports, __webpack_require__) {
  1917. var toString = __webpack_require__("577e");
  1918. module.exports = function (argument, $default) {
  1919. return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
  1920. };
  1921. /***/ }),
  1922. /***/ "e5cb":
  1923. /***/ (function(module, exports, __webpack_require__) {
  1924. "use strict";
  1925. var getBuiltIn = __webpack_require__("d066");
  1926. var hasOwn = __webpack_require__("1a2d");
  1927. var createNonEnumerableProperty = __webpack_require__("9112");
  1928. var isPrototypeOf = __webpack_require__("3a9b");
  1929. var setPrototypeOf = __webpack_require__("d2bb");
  1930. var copyConstructorProperties = __webpack_require__("e893");
  1931. var proxyAccessor = __webpack_require__("aeb0");
  1932. var inheritIfRequired = __webpack_require__("7156");
  1933. var normalizeStringArgument = __webpack_require__("e391");
  1934. var installErrorCause = __webpack_require__("ab36");
  1935. var clearErrorStack = __webpack_require__("c770");
  1936. var ERROR_STACK_INSTALLABLE = __webpack_require__("b980");
  1937. var DESCRIPTORS = __webpack_require__("83ab");
  1938. var IS_PURE = __webpack_require__("c430");
  1939. module.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
  1940. var STACK_TRACE_LIMIT = 'stackTraceLimit';
  1941. var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
  1942. var path = FULL_NAME.split('.');
  1943. var ERROR_NAME = path[path.length - 1];
  1944. var OriginalError = getBuiltIn.apply(null, path);
  1945. if (!OriginalError) return;
  1946. var OriginalErrorPrototype = OriginalError.prototype;
  1947. // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
  1948. if (!IS_PURE && hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
  1949. if (!FORCED) return OriginalError;
  1950. var BaseError = getBuiltIn('Error');
  1951. var WrappedError = wrapper(function (a, b) {
  1952. var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
  1953. var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
  1954. if (message !== undefined) createNonEnumerableProperty(result, 'message', message);
  1955. if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(result, 'stack', clearErrorStack(result.stack, 2));
  1956. if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
  1957. if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
  1958. return result;
  1959. });
  1960. WrappedError.prototype = OriginalErrorPrototype;
  1961. if (ERROR_NAME !== 'Error') {
  1962. if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
  1963. else copyConstructorProperties(WrappedError, BaseError, { name: true });
  1964. } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
  1965. proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
  1966. proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
  1967. }
  1968. copyConstructorProperties(WrappedError, OriginalError);
  1969. if (!IS_PURE) try {
  1970. // Safari 13- bug: WebAssembly errors does not have a proper `.name`
  1971. if (OriginalErrorPrototype.name !== ERROR_NAME) {
  1972. createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);
  1973. }
  1974. OriginalErrorPrototype.constructor = WrappedError;
  1975. } catch (error) { /* empty */ }
  1976. return WrappedError;
  1977. };
  1978. /***/ }),
  1979. /***/ "e893":
  1980. /***/ (function(module, exports, __webpack_require__) {
  1981. var hasOwn = __webpack_require__("1a2d");
  1982. var ownKeys = __webpack_require__("56ef");
  1983. var getOwnPropertyDescriptorModule = __webpack_require__("06cf");
  1984. var definePropertyModule = __webpack_require__("9bf2");
  1985. module.exports = function (target, source, exceptions) {
  1986. var keys = ownKeys(source);
  1987. var defineProperty = definePropertyModule.f;
  1988. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  1989. for (var i = 0; i < keys.length; i++) {
  1990. var key = keys[i];
  1991. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  1992. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  1993. }
  1994. }
  1995. };
  1996. /***/ }),
  1997. /***/ "f5df":
  1998. /***/ (function(module, exports, __webpack_require__) {
  1999. var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee");
  2000. var isCallable = __webpack_require__("1626");
  2001. var classofRaw = __webpack_require__("c6b6");
  2002. var wellKnownSymbol = __webpack_require__("b622");
  2003. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  2004. var $Object = Object;
  2005. // ES3 wrong here
  2006. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  2007. // fallback for IE11 Script Access Denied error
  2008. var tryGet = function (it, key) {
  2009. try {
  2010. return it[key];
  2011. } catch (error) { /* empty */ }
  2012. };
  2013. // getting tag from ES6+ `Object.prototype.toString`
  2014. module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  2015. var O, tag, result;
  2016. return it === undefined ? 'Undefined' : it === null ? 'Null'
  2017. // @@toStringTag case
  2018. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  2019. // builtinTag case
  2020. : CORRECT_ARGUMENTS ? classofRaw(O)
  2021. // ES3 arguments fallback
  2022. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  2023. };
  2024. /***/ }),
  2025. /***/ "f772":
  2026. /***/ (function(module, exports, __webpack_require__) {
  2027. var shared = __webpack_require__("5692");
  2028. var uid = __webpack_require__("90e3");
  2029. var keys = shared('keys');
  2030. module.exports = function (key) {
  2031. return keys[key] || (keys[key] = uid(key));
  2032. };
  2033. /***/ }),
  2034. /***/ "fb15":
  2035. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2036. "use strict";
  2037. // ESM COMPAT FLAG
  2038. __webpack_require__.r(__webpack_exports__);
  2039. // EXPORTS
  2040. __webpack_require__.d(__webpack_exports__, "Vue3TreeOrg", function() { return /* reexport */ tree_org; });
  2041. // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
  2042. // This file is imported into lib/wc client bundles.
  2043. if (typeof window !== 'undefined') {
  2044. var currentScript = window.document.currentScript
  2045. if (false) { var getCurrentScript; }
  2046. var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
  2047. if (src) {
  2048. __webpack_require__.p = src[1] // eslint-disable-line
  2049. }
  2050. }
  2051. // Indicate to webpack that this file can be concatenated
  2052. /* harmony default export */ var setPublicPath = (null);
  2053. // EXTERNAL MODULE: ./package.json
  2054. var package_0 = __webpack_require__("9224");
  2055. // CONCATENATED MODULE: ./src/utils/utils.ts
  2056. const isObject = function (arg) {
  2057. return Object.prototype.toString.call(arg) === '[object Object]';
  2058. };
  2059. const isString = function (str) {
  2060. return typeof str === 'string';
  2061. };
  2062. const isNumber = function (num) {
  2063. return typeof num === 'number';
  2064. };
  2065. const fromPairs = function (pairs) {
  2066. let index = -1;
  2067. const // 循环索引
  2068. length = pairs ? pairs.length : 0;
  2069. const // 键值对数组的长度
  2070. result = {}; // 结果对象
  2071. while (++index < length) {
  2072. // 循环并给结果对象加入属性
  2073. const pair = pairs[index];
  2074. result[pair[0]] = pair[1];
  2075. }
  2076. return result;
  2077. };
  2078. // CONCATENATED MODULE: ./src/utils/log.ts
  2079. /* eslint-disable no-console */
  2080. const log = {
  2081. print: (text, type, back) => isString(type) || typeof back === 'boolean',
  2082. pretty: (title, text, type) => isString(text) && isString(title) || typeof type === 'string',
  2083. primary: (text, back) => isString(text) || typeof back === 'boolean',
  2084. success: (text, back) => isString(text) || typeof back === 'boolean',
  2085. info: (text, back) => isString(text) || typeof back === 'boolean',
  2086. warning: (text, back) => isString(text) || typeof back === 'boolean',
  2087. danger: (text, back) => isString(text) || typeof back === 'boolean'
  2088. };
  2089. /**
  2090. * @description 返回这个样式的颜色值
  2091. * @param {String} type 样式名称 [ primary | success | warning | danger | text ]
  2092. */
  2093. function typeColor(type = 'default') {
  2094. let color = '';
  2095. switch (type) {
  2096. case 'primary':
  2097. color = '#2d8cf0';
  2098. break;
  2099. case 'success':
  2100. color = '#19be6b';
  2101. break;
  2102. case 'info':
  2103. color = '#909399';
  2104. break;
  2105. case 'warning':
  2106. color = '#ff9900';
  2107. break;
  2108. case 'danger':
  2109. color = '#ff4d4f';
  2110. break;
  2111. case 'default':
  2112. color = '#35495E';
  2113. break;
  2114. default:
  2115. color = type;
  2116. break;
  2117. }
  2118. return color;
  2119. }
  2120. log.print = function (text, type = 'default', back = false) {
  2121. if (typeof text === 'object') {
  2122. // 如果是对象则调用打印对象方式
  2123. console.dir(text);
  2124. return true;
  2125. }
  2126. if (back) {
  2127. // 如果是打印带背景图的
  2128. console.log(`%c ${text} `, `background:${typeColor(type)}; padding: 2px; border-radius: 4px;color: #fff;`);
  2129. } else {
  2130. console.log(`%c ${text} `, `color: ${typeColor(type)};`);
  2131. }
  2132. return true;
  2133. }; // 漂亮的
  2134. log.pretty = function (title, text, type = 'primary') {
  2135. console.log(`%c ${title} %c ${text} %c`, `background:${typeColor(type)};border:1px solid ${typeColor(type)}; padding: 1px; border-radius: 4px 0 0 4px; color: #fff;`, `border:1px solid ${typeColor(type)}; padding: 1px; border-radius: 0 4px 4px 0; color: ${typeColor(type)};`, 'background:transparent');
  2136. return true;
  2137. };
  2138. log.primary = function (text, back = false) {
  2139. this.print && this.print(text, 'primary', back);
  2140. return true;
  2141. };
  2142. log.success = function (text, back = false) {
  2143. this.print && this.print(text, 'success', back);
  2144. return true;
  2145. };
  2146. log.info = function (text, back = false) {
  2147. this.print && this.print(text, 'info', back);
  2148. return true;
  2149. };
  2150. log.warning = function (text, back = false) {
  2151. this.print && this.print(text, 'warning', back);
  2152. return true;
  2153. };
  2154. log.danger = function (text, back = false) {
  2155. this.print && this.print(text, 'danger', back);
  2156. return true;
  2157. };
  2158. /* harmony default export */ var utils_log = (log);
  2159. // CONCATENATED MODULE: ./src/plugin/core/index.ts
  2160. // 功能插件
  2161. /* harmony default export */ var core = ({
  2162. async install(app) {
  2163. // 设置为 false 以阻止 vue 在启动时生成生产提示
  2164. // app.config.productionTip = false
  2165. app.config.globalProperties.$log = utils_log; // 打印UI官网
  2166. utils_log.pretty('[' + package_0.name + '] ' + package_0.version, 'success');
  2167. }
  2168. });
  2169. // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
  2170. var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
  2171. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/tree-org/src/tree.vue?vue&type=template&id=f08413b6&ts=true
  2172. const _hoisted_1 = {
  2173. ref: "eleRef",
  2174. class: "zm-tree-org"
  2175. };
  2176. const _hoisted_2 = {
  2177. class: "tree-org-node__text"
  2178. };
  2179. const _hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
  2180. class: "tree-org-node__expand-btn"
  2181. }, null, -1);
  2182. const _hoisted_4 = {
  2183. class: "tree-org-node__text"
  2184. };
  2185. const _hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
  2186. class: "tree-org-node__expand-btn"
  2187. }, null, -1);
  2188. function render(_ctx, _cache, $props, $setup, $data, $options) {
  2189. const _component_tree_org_node = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("tree-org-node");
  2190. const _component_Draggable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Draggable");
  2191. const _component_Tools = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Tools");
  2192. const _component_clone_org = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("clone-org");
  2193. const _component_Contextmenu = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Contextmenu");
  2194. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
  2195. ref: "zoomRef",
  2196. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["zoom-container", {
  2197. 'is-center': _ctx.center && !_ctx.horizontal
  2198. }]),
  2199. style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])(_ctx.zoomStyle),
  2200. onWheel: _cache[0] || (_cache[0] = //@ts-ignore
  2201. (...args) => _ctx.zoomWheel && _ctx.zoomWheel(...args))
  2202. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Draggable, {
  2203. x: _ctx.left,
  2204. y: _ctx.top,
  2205. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({
  2206. dragging: _ctx.autoDragging
  2207. }),
  2208. onDragging: _ctx.onDrag,
  2209. onDragstop: _ctx.onDragStop,
  2210. draggable: _ctx.draggable,
  2211. "drag-cancel": _ctx.dragCancel
  2212. }, {
  2213. default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
  2214. ref: "treeRef",
  2215. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["tree-org", {
  2216. horizontal: _ctx.horizontal,
  2217. collapsable: _ctx.collapsable
  2218. }])
  2219. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_tree_org_node, {
  2220. data: _ctx.treeData,
  2221. props: _ctx.keys,
  2222. lazy: _ctx.lazy,
  2223. suffix: _ctx.suffix,
  2224. horizontal: _ctx.horizontal,
  2225. labelStyle: _ctx.labelStyle,
  2226. collapsable: _ctx.collapsable,
  2227. renderContent: _ctx.renderContent,
  2228. selectedKey: _ctx.selectedKey,
  2229. defaultExpandLevel: _ctx.defaultExpandLevel,
  2230. selectedClassName: _ctx.selectedClassName,
  2231. labelClassName: _ctx.labelClassName,
  2232. vNodedrag: _ctx.nodeargs,
  2233. onOnExpand: _ctx.handleExpand,
  2234. onNodeClick: _ctx.handleClick,
  2235. onNodeDblclick: _ctx.handleDblclick,
  2236. onNodeMouseenter: _ctx.nodeMouseenter,
  2237. onNodeMouseleave: _ctx.nodeMouseleave,
  2238. onNodeContextmenu: _ctx.nodeContextmenu,
  2239. onNodeFocus: _ctx.handleFocus,
  2240. onNodeBlur: _ctx.handleBlur
  2241. }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createSlots"])({
  2242. _: 2
  2243. }, [_ctx.defaultSlot ? {
  2244. name: "default",
  2245. fn: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(({
  2246. node
  2247. }) => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", {
  2248. node: node
  2249. }, () => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(node.label), 1)])])])
  2250. } : undefined, _ctx.expandSlot ? {
  2251. name: "expand",
  2252. fn: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(({
  2253. node
  2254. }) => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "expand", {
  2255. node: node
  2256. }, () => [_hoisted_3])])
  2257. } : undefined]), 1032, ["data", "props", "lazy", "suffix", "horizontal", "labelStyle", "collapsable", "renderContent", "selectedKey", "defaultExpandLevel", "selectedClassName", "labelClassName", "vNodedrag", "onOnExpand", "onNodeClick", "onNodeDblclick", "onNodeMouseenter", "onNodeMouseleave", "onNodeContextmenu", "onNodeFocus", "onNodeBlur"])], 2)]),
  2258. _: 3
  2259. }, 8, ["x", "y", "class", "onDragging", "onDragstop", "draggable", "drag-cancel"])], 38), _ctx.tools.visible ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Tools, {
  2260. key: 0,
  2261. tools: _ctx.tools.data,
  2262. scale: _ctx.zoomPercent,
  2263. onOnExpand: _ctx.expandChange,
  2264. onOnScale: _ctx.zoomOrgchart,
  2265. onOnRestore: _ctx.restoreOrgchart,
  2266. onOnFullscreen: _ctx.handleFullscreen
  2267. }, null, 8, ["tools", "scale", "onOnExpand", "onOnScale", "onOnRestore", "onOnFullscreen"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.nodeDraggable ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_clone_org, {
  2268. key: 1,
  2269. modelValue: _ctx.nodeMoving,
  2270. "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.nodeMoving = $event),
  2271. props: _ctx.keys,
  2272. data: _ctx.cloneData,
  2273. horizontal: _ctx.horizontal,
  2274. "label-style": _ctx.labelStyle,
  2275. collapsable: _ctx.collapsable,
  2276. "render-content": _ctx.renderContent,
  2277. "label-class-name": _ctx.labelClassName
  2278. }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createSlots"])({
  2279. _: 2
  2280. }, [_ctx.defaultSlot ? {
  2281. name: "default",
  2282. fn: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(({
  2283. node
  2284. }) => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", {
  2285. node: node
  2286. }, () => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(node[_ctx.keys.label]), 1)])])])
  2287. } : undefined, _ctx.expandSlot ? {
  2288. name: "expand",
  2289. fn: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(({
  2290. node
  2291. }) => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "expand", {
  2292. node: node
  2293. }, () => [_hoisted_5])])
  2294. } : undefined]), 1032, ["modelValue", "props", "data", "horizontal", "label-style", "collapsable", "render-content", "label-class-name"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.nodeMenus.length ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Contextmenu, {
  2295. key: 2,
  2296. modelValue: _ctx.contextmenu,
  2297. "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => _ctx.contextmenu = $event),
  2298. x: _ctx.menuX,
  2299. y: _ctx.menuY,
  2300. node: _ctx.menuData,
  2301. data: _ctx.data,
  2302. props: _ctx.keys,
  2303. menus: _ctx.nodeMenus,
  2304. disabled: _ctx.disabled,
  2305. "node-add": _ctx.nodeAdd,
  2306. "node-delete": _ctx.nodeDelete,
  2307. "node-edit": _ctx.nodeEdit,
  2308. "node-copy": _ctx.nodeCopy,
  2309. onContextmenu: _cache[3] || (_cache[3] = arg => {
  2310. _ctx.$emit('on-contextmenu', arg);
  2311. }),
  2312. onOnNodeCopy: _cache[4] || (_cache[4] = txt => {
  2313. _ctx.$emit('on-node-copy', txt);
  2314. }),
  2315. onOnNodeDelete: _cache[5] || (_cache[5] = txt => {
  2316. _ctx.$emit('on-node-delete', txt);
  2317. })
  2318. }, null, 8, ["modelValue", "x", "y", "node", "data", "props", "menus", "disabled", "node-add", "node-delete", "node-edit", "node-copy"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512);
  2319. }
  2320. // CONCATENATED MODULE: ./src/components/tree-org/src/tree.vue?vue&type=template&id=f08413b6&ts=true
  2321. // CONCATENATED MODULE: ./src/store/index.ts
  2322. const stopClick = function () {
  2323. let stop = false;
  2324. return {
  2325. get: () => stop,
  2326. set: val => {
  2327. stop = val;
  2328. }
  2329. };
  2330. }();
  2331. // CONCATENATED MODULE: ./src/directives/drag/index.ts
  2332. // 递归遍历处理数据
  2333. const recurseData = function (data, keys, cb) {
  2334. const {
  2335. children
  2336. } = keys;
  2337. if (isObject(data)) {
  2338. fn(data);
  2339. } else if (Array.isArray(data)) {
  2340. for (let i = 0, len = data.length; i < len; i++) {
  2341. fn(data[i]);
  2342. }
  2343. }
  2344. function fn(obj) {
  2345. cb(obj);
  2346. if (Array.isArray(obj[children])) {
  2347. const list = obj[children];
  2348. for (let i = 0, len = list.length; i < len; i++) {
  2349. fn(list[i]);
  2350. }
  2351. }
  2352. }
  2353. }; // 获取父级节点
  2354. const drag_getNodeById = function (node, keys, value) {
  2355. const {
  2356. id,
  2357. children
  2358. } = keys;
  2359. if (node[id] === value) {
  2360. return node;
  2361. } else if (Array.isArray(node[children])) {
  2362. const list = node[children];
  2363. for (let i = 0, len = list.length; i < len; i++) {
  2364. const row = list[i];
  2365. const pNode = drag_getNodeById(row, keys, value);
  2366. if (pNode) {
  2367. return pNode;
  2368. }
  2369. }
  2370. }
  2371. }; // 移除节点
  2372. const removeNode = function (node, context) {
  2373. const {
  2374. keys,
  2375. data,
  2376. onlyOneNode
  2377. } = context;
  2378. const {
  2379. id,
  2380. pid,
  2381. children
  2382. } = keys;
  2383. const oldPaNode = drag_getNodeById(data, keys, node[pid]);
  2384. const list = oldPaNode[children];
  2385. let index;
  2386. for (let i = 0, len = list.length; i < len; i++) {
  2387. if (list[i][id] === node[id]) {
  2388. list.splice(i, 1);
  2389. index = i;
  2390. break;
  2391. }
  2392. } // 如果仅移动当前节点,把当前节点的子节点添加到当前节点的父节点,并把当前节点子节点移除
  2393. const childNodes = node[children];
  2394. if (onlyOneNode && index !== undefined && childNodes) {
  2395. node[children] = [];
  2396. childNodes.forEach(it => {
  2397. it[pid] = oldPaNode[id];
  2398. });
  2399. oldPaNode[children].splice(index, 0, ...childNodes);
  2400. }
  2401. }; // 新增子节点节点
  2402. const addChildNode = function (node, context) {
  2403. const {
  2404. parenNode,
  2405. onlyOneNode,
  2406. cloneNodeDrag
  2407. } = context;
  2408. if (parenNode.value) {
  2409. const {
  2410. keys
  2411. } = context;
  2412. const {
  2413. id,
  2414. pid,
  2415. children
  2416. } = keys;
  2417. const parentData = parenNode.value.$$data;
  2418. const nodeClone = JSON.parse(JSON.stringify(node.$$data));
  2419. if (!cloneNodeDrag) {
  2420. // 如果拖拽节点
  2421. removeNode(nodeClone, context);
  2422. nodeClone[pid] = parentData[id];
  2423. parentData[children] ? parentData[children].push(nodeClone) : parentData[children] = [].concat(nodeClone);
  2424. } else {
  2425. // 如果拷贝并拖拽节点
  2426. recurseData(nodeClone, keys, function (item) {
  2427. if (typeof item[id] === 'string' && item[id].indexOf('clone-node') !== -1) {
  2428. item[id] = `clone-node-${item[id]}`;
  2429. }
  2430. });
  2431. if (onlyOneNode && Array.isArray(nodeClone[children])) {
  2432. nodeClone[children] = [];
  2433. }
  2434. nodeClone[keys.pid] = parentData[keys.id];
  2435. parentData[children] ? parentData[children].push(nodeClone) : parentData[children] = [nodeClone];
  2436. }
  2437. }
  2438. };
  2439. const drag_drag = {
  2440. beforeMount(el, binding) {
  2441. const {
  2442. l,
  2443. t
  2444. } = binding.modifiers;
  2445. const {
  2446. drag,
  2447. dragData,
  2448. node,
  2449. emit,
  2450. beforeDragEnd,
  2451. initNodes
  2452. } = binding.value;
  2453. const {
  2454. value
  2455. } = binding;
  2456. const instance = { ...dragData
  2457. };
  2458. el.addEventListener('mousedown', handleDownCb);
  2459. let offsetLeft = 0;
  2460. let hasRender = false;
  2461. let cloneTree;
  2462. let screenX = 0;
  2463. let screenY = 0;
  2464. function initData(e) {
  2465. e.stopPropagation();
  2466. screenX = e.screenX;
  2467. screenY = e.screenY;
  2468. offsetLeft = 0;
  2469. instance.contextmenu.value = false; // 隐藏右键菜单
  2470. const {
  2471. keys,
  2472. onlyOneNode
  2473. } = instance;
  2474. if (onlyOneNode) {
  2475. // 如果是仅移动当前节点
  2476. const {
  2477. children
  2478. } = keys;
  2479. const cloneNode = { ...node.$$data
  2480. };
  2481. cloneNode[children] = [];
  2482. instance.cloneData.value = initNodes(cloneNode);
  2483. } else {
  2484. instance.cloneData.value = initNodes(node.$$data);
  2485. }
  2486. }
  2487. function handleDownCb(e) {
  2488. const target = e.target;
  2489. if (drag === false || e.button !== 0 || node.focused || node.$$data.noDragging || target.className.indexOf('tree-org-node-btn') > -1) {
  2490. return false;
  2491. }
  2492. initData(e);
  2493. document.addEventListener('mousemove', handleMoveCb);
  2494. document.addEventListener('mouseup', handleUpCb);
  2495. handleEmit('start');
  2496. }
  2497. function moveStart(e) {
  2498. stopClick.set(true);
  2499. instance.nodeMoving.value = true;
  2500. node.moving = true;
  2501. let ndom = el;
  2502. while (!ndom.classList.contains('tree-org-node')) {
  2503. offsetLeft += ndom.offsetLeft;
  2504. ndom = ndom.offsetParent;
  2505. } // 拖动节点副本
  2506. offsetLeft = offsetLeft + 2;
  2507. cloneTree = document.querySelector('#clone-tree-org');
  2508. if (cloneTree) {
  2509. cloneTree.style.width = `${ndom.clientWidth}px`;
  2510. cloneTree.style.opacity = '0.8';
  2511. cloneTree.style.left = e.clientX - offsetLeft + 'px';
  2512. cloneTree.style.top = e.clientY + 2 + 'px';
  2513. }
  2514. }
  2515. function handleMoveCb(e) {
  2516. e.preventDefault();
  2517. if (Math.abs(e.screenX - screenX) < 5 && Math.abs(e.screenY - screenY) < 5) {
  2518. return false;
  2519. }
  2520. if (!hasRender) {
  2521. hasRender = true;
  2522. moveStart(e);
  2523. }
  2524. if (l && t && value) {
  2525. if (cloneTree) {
  2526. cloneTree.style.left = e.clientX - offsetLeft + 'px';
  2527. cloneTree.style.top = e.clientY + 2 + 'px';
  2528. }
  2529. handleEmit('move');
  2530. return;
  2531. }
  2532. if (l && value) {
  2533. el.style.left = e.clientX - offsetLeft + 'px';
  2534. handleEmit('move');
  2535. return;
  2536. }
  2537. if (t && value) {
  2538. el.style.top = e.clientY + 'px';
  2539. handleEmit('move');
  2540. }
  2541. }
  2542. function handleUpCb(e) {
  2543. document.removeEventListener('mousemove', handleMoveCb);
  2544. document.removeEventListener('mouseup', handleUpCb);
  2545. if (!hasRender) {
  2546. return;
  2547. }
  2548. if (typeof beforeDragEnd === 'function') {
  2549. const before = beforeDragEnd(node, instance.parenNode.value);
  2550. if (before && before.then) {
  2551. before.then(() => {
  2552. doDragEnd(e); // eslint-disable-next-line @typescript-eslint/no-empty-function
  2553. }, () => {});
  2554. } else if (before !== false) {
  2555. doDragEnd(e);
  2556. }
  2557. } else {
  2558. doDragEnd(e);
  2559. }
  2560. resetDrag();
  2561. }
  2562. function resetDrag() {
  2563. hasRender = false;
  2564. cloneTree = null;
  2565. node.moving = false;
  2566. instance.nodeMoving.value = false;
  2567. setTimeout(() => {
  2568. stopClick.set(false);
  2569. }, 200);
  2570. }
  2571. function doDragEnd(e) {
  2572. const movingNode = document.querySelector('.tree-org-node__moving');
  2573. if (movingNode && movingNode.contains(e.target)) {
  2574. handleEmit('end');
  2575. return false;
  2576. }
  2577. addChildNode(node, instance);
  2578. handleEmit('end');
  2579. }
  2580. function handleEmit(type) {
  2581. if (type === 'start') {
  2582. emit('on-node-drag-start', node);
  2583. return;
  2584. }
  2585. if (type === 'move') {
  2586. emit('on-node-drag', node);
  2587. return;
  2588. }
  2589. if (type === 'end') {
  2590. emit('on-node-drag-end', node, instance.parenNode.value);
  2591. }
  2592. }
  2593. }
  2594. };
  2595. /* harmony default export */ var directives_drag = (drag_drag);
  2596. // CONCATENATED MODULE: ./src/directives/focus/index.ts
  2597. /* harmony default export */ var directives_focus = ({
  2598. mounted(el, {
  2599. value
  2600. }) {
  2601. if (value) {
  2602. el.focus();
  2603. }
  2604. },
  2605. updated(el, {
  2606. value
  2607. }) {
  2608. if (value) {
  2609. el.focus();
  2610. }
  2611. }
  2612. });
  2613. // CONCATENATED MODULE: ./src/components/node/index.ts
  2614. // 功能插件
  2615. const EVENTS = {
  2616. onClick: 'onNodeClick',
  2617. onDblclick: 'onNodeDblclick',
  2618. onContextmenu: 'onNodeContextmenu',
  2619. onMouseenter: 'onNodeMouseenter',
  2620. onMouseleave: 'onNodeMouseleave'
  2621. };
  2622. function createListener(handler, node) {
  2623. if (typeof handler === 'function') {
  2624. return function (e) {
  2625. const target = e.target;
  2626. if (target.className.indexOf('org-tree-node-btn') > -1) return;
  2627. handler(e, node);
  2628. };
  2629. }
  2630. } // 判断是否叶子节点
  2631. const isLeaf = (data, prop, lazy) => {
  2632. const hasChild = Array.isArray(data[prop]) && data[prop].length > 0;
  2633. return !hasChild && !lazy || data.isLeaf;
  2634. }; // 创建 node 节点
  2635. const renderNode = (h, data, context) => {
  2636. const {
  2637. attrs
  2638. } = context;
  2639. const cls = ['tree-org-node'];
  2640. const childNodes = [];
  2641. const {
  2642. expand,
  2643. children,
  2644. id
  2645. } = data; // 如果是叶子节点则追加leaf事件
  2646. if (isLeaf(data, 'children', attrs.lazy)) {
  2647. cls.push('is-leaf');
  2648. } else if (attrs.collapsable && !expand) {
  2649. // 追加是否展开class
  2650. cls.push('collapsed');
  2651. }
  2652. if (data.moving) {
  2653. cls.push('tree-org-node__moving');
  2654. } // 渲染label块
  2655. childNodes.push(renderLabel(h, data, context));
  2656. if (!attrs.collapsable || expand) {
  2657. childNodes.push(renderChildren(h, children, context));
  2658. }
  2659. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(h('div', {
  2660. class: cls,
  2661. key: id
  2662. }, childNodes), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !data.hidden]]);
  2663. }; // 创建展开折叠按钮
  2664. const renderBtn = (h, node, context) => {
  2665. const {
  2666. attrs
  2667. } = context;
  2668. const expandHandler = attrs.onOnExpand;
  2669. const cls = ['tree-org-node__expand'];
  2670. if (node.expand) {
  2671. cls.push('expanded');
  2672. }
  2673. const children = [];
  2674. if (context.slots.expand) {
  2675. children.push(context.slots.expand({
  2676. node
  2677. }));
  2678. } else {
  2679. children.push(h('span', {
  2680. class: 'tree-org-node__expand-btn'
  2681. }));
  2682. }
  2683. return h('span', {
  2684. class: cls,
  2685. onMousedown: e => {
  2686. e.stopPropagation();
  2687. },
  2688. onDblclick: e => {
  2689. e.stopPropagation();
  2690. },
  2691. onClick: e => {
  2692. e.stopPropagation();
  2693. expandHandler && expandHandler(e, node);
  2694. }
  2695. }, children);
  2696. }; // 创建 label 节点
  2697. const renderLabel = (h, node, context) => {
  2698. const {
  2699. attrs
  2700. } = context;
  2701. const defaultProps = attrs.props;
  2702. const renderContent = attrs.renderContent; // const { directives } = context.data
  2703. const {
  2704. label
  2705. } = node;
  2706. const childNodes = [];
  2707. if (context.slots.default) {
  2708. childNodes.push(context.slots.default({
  2709. node
  2710. }));
  2711. } else if (typeof renderContent === 'function') {
  2712. utils_log.warning('scoped-slot header is easier to use. We recommend users to use scoped-slot header.');
  2713. const vnode = renderContent(h, node);
  2714. vnode && childNodes.push(vnode);
  2715. } else {
  2716. childNodes.push(h('div', {
  2717. class: 'tree-org-node__text'
  2718. }, label));
  2719. }
  2720. if (attrs.collapsable && !isLeaf(node, 'children', attrs.lazy)) {
  2721. childNodes.push(renderBtn(h, node, context));
  2722. }
  2723. const cls = ['tree-org-node__inner'];
  2724. let {
  2725. labelStyle,
  2726. labelClassName,
  2727. selectedClassName,
  2728. selectedKey
  2729. } = attrs;
  2730. if (typeof labelClassName === 'function') {
  2731. labelClassName = labelClassName(node);
  2732. }
  2733. labelClassName && cls.push(labelClassName);
  2734. node.className && cls.push(node.className); // add selected class and key from props
  2735. if (typeof selectedClassName === 'function') {
  2736. selectedClassName = selectedClassName(node);
  2737. }
  2738. if (selectedKey !== undefined) {
  2739. selectedKey = Array.isArray(selectedKey) ? selectedKey : [selectedKey];
  2740. }
  2741. selectedClassName && selectedKey && selectedKey.includes(node.id) && cls.push(selectedClassName);
  2742. const nodeLabelClass = ['tree-org-node__content'];
  2743. if (node.$$root) {
  2744. nodeLabelClass.push(`is-root_${attrs.suffix}`);
  2745. }
  2746. if (!node.label) {
  2747. nodeLabelClass.push('is-empty');
  2748. }
  2749. if (node.$$focused) {
  2750. nodeLabelClass.push('is-edit');
  2751. }
  2752. const vNodedrag = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])('nodedrag');
  2753. const cloneDirs = [];
  2754. if (attrs.vNodedrag && vNodedrag && !node.$$root) {
  2755. cloneDirs.push([vNodedrag, Object.assign({
  2756. node: node
  2757. }, attrs.vNodedrag), '', {
  2758. l: true,
  2759. t: true
  2760. }]);
  2761. } // event handlers
  2762. const NODEEVENTS = {};
  2763. for (const EKEY in EVENTS) {
  2764. if (Object.prototype.hasOwnProperty.call(EVENTS, EKEY)) {
  2765. const EVENT = EVENTS[EKEY];
  2766. const handler = attrs[EVENT];
  2767. if (handler) {
  2768. NODEEVENTS[EKEY] = createListener(handler, node);
  2769. }
  2770. }
  2771. } // texterea event handles
  2772. const focusHandler = attrs.onNodeFocus;
  2773. const blurHandler = attrs.onNodeBlur;
  2774. const vFocus = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])('focus');
  2775. const directives = [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], node.$$focused]];
  2776. if (vFocus) {
  2777. directives.push([vFocus, node.$$focused]);
  2778. }
  2779. return h('div', {
  2780. class: nodeLabelClass
  2781. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(h('div', {
  2782. class: cls,
  2783. style: node.style ? node.style : labelStyle,
  2784. ...NODEEVENTS
  2785. }, childNodes), cloneDirs), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(h('textarea', {
  2786. class: 'tree-org-node__textarea',
  2787. placeholder: '请输入节点名称',
  2788. value: node.label,
  2789. onFocus: e => {
  2790. focusHandler && focusHandler(e, node.$$data, node);
  2791. },
  2792. onInput: event => {
  2793. node.label = event.target.value;
  2794. },
  2795. onBlur: e => {
  2796. if (node.$$data.focused !== undefined) node.$$data.focused = false;
  2797. node.$$data[defaultProps.label] = e.target.value;
  2798. node.$$focused = false;
  2799. blurHandler && blurHandler(e, node.$$data, node);
  2800. },
  2801. onClick: e => e.stopPropagation()
  2802. }), directives)]);
  2803. }; // 创建 node 子节点
  2804. const renderChildren = (h, list, context) => {
  2805. if (Array.isArray(list) && list.length) {
  2806. const children = list.filter(item => !item.$$hidden).map(item => {
  2807. return renderNode(h, item, context);
  2808. });
  2809. return h('div', {
  2810. class: 'tree-org-node__children'
  2811. }, children);
  2812. }
  2813. return '';
  2814. };
  2815. const TreeOrgNode = (props, context) => {
  2816. if (!props.data || Object.keys(props.data).length === 0) return '';
  2817. props.data.$$root = !props.isClone;
  2818. return renderNode(external_commonjs_vue_commonjs2_vue_root_Vue_["h"], props.data, context);
  2819. };
  2820. TreeOrgNode.directives = {
  2821. // 自定义指令
  2822. focus: directives_focus,
  2823. nodedrag: directives_drag
  2824. };
  2825. /* harmony default export */ var components_node = (TreeOrgNode);
  2826. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/tools/tools.vue?vue&type=template&id=1aca9713
  2827. const toolsvue_type_template_id_1aca9713_hoisted_1 = {
  2828. class: "zm-tree-handle"
  2829. };
  2830. const toolsvue_type_template_id_1aca9713_hoisted_2 = {
  2831. key: 0,
  2832. class: "zm-tree-percent"
  2833. };
  2834. const toolsvue_type_template_id_1aca9713_hoisted_3 = ["title"];
  2835. const toolsvue_type_template_id_1aca9713_hoisted_4 = {
  2836. class: "zm-tree-svg"
  2837. };
  2838. const toolsvue_type_template_id_1aca9713_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
  2839. class: "zm-tree-icon"
  2840. }, "+", -1);
  2841. const _hoisted_6 = [toolsvue_type_template_id_1aca9713_hoisted_5];
  2842. const _hoisted_7 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
  2843. class: "zm-tree-icon"
  2844. }, "-", -1);
  2845. const _hoisted_8 = [_hoisted_7];
  2846. const _hoisted_9 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
  2847. class: "zm-tree-restore"
  2848. }, null, -1);
  2849. const _hoisted_10 = [_hoisted_9];
  2850. const _hoisted_11 = ["title"];
  2851. const _hoisted_12 = {
  2852. class: "zm-tree-svg"
  2853. };
  2854. function toolsvue_type_template_id_1aca9713_render(_ctx, _cache, $props, $setup, $data, $options) {
  2855. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", toolsvue_type_template_id_1aca9713_hoisted_1, [_ctx.tools.scale ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", toolsvue_type_template_id_1aca9713_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.scale), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.tools.expand ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
  2856. key: 1,
  2857. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleExpand && _ctx.handleExpand(...args)),
  2858. title: _ctx.expandTitle,
  2859. class: "zm-tree-handle-item"
  2860. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", toolsvue_type_template_id_1aca9713_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", {
  2861. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(['treefont', _ctx.expanded ? 'icon-collapse' : 'icon-expand'])
  2862. }, null, 2)])], 8, toolsvue_type_template_id_1aca9713_hoisted_3)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.tools.zoom ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
  2863. key: 2,
  2864. onClick: _cache[1] || (_cache[1] = $event => _ctx.handleScale('out')),
  2865. title: "放大",
  2866. class: "zm-tree-handle-item zoom-out"
  2867. }, _hoisted_6)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.tools.zoom ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
  2868. key: 3,
  2869. onClick: _cache[2] || (_cache[2] = $event => _ctx.handleScale('in')),
  2870. title: "缩小",
  2871. class: "zm-tree-handle-item zoom-in"
  2872. }, _hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.tools.restore ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
  2873. key: 4,
  2874. onClick: _cache[3] || (_cache[3] = $event => _ctx.handleScale('restore')),
  2875. title: "还原",
  2876. class: "zm-tree-handle-item"
  2877. }, _hoisted_10)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.tools.fullscreen ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
  2878. key: 5,
  2879. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.handleFullscreen && _ctx.handleFullscreen(...args)),
  2880. title: _ctx.fullTiltle,
  2881. class: "zm-tree-handle-item"
  2882. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", {
  2883. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(['treefont', _ctx.fullscreen ? 'icon-unfullscreen' : 'icon-fullscreen'])
  2884. }, null, 2)])], 8, _hoisted_11)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]);
  2885. }
  2886. // CONCATENATED MODULE: ./src/components/tools/tools.vue?vue&type=template&id=1aca9713
  2887. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/tools/tools.vue?vue&type=script&lang=js
  2888. /* harmony default export */ var toolsvue_type_script_lang_js = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
  2889. props: {
  2890. scale: String,
  2891. tools: Object
  2892. },
  2893. setup(props, {
  2894. emit
  2895. }) {
  2896. const expanded = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  2897. const fullscreen = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  2898. function handleExpand() {
  2899. expanded.value = !expanded.value;
  2900. emit('onExpand');
  2901. }
  2902. function handleScale(scale) {
  2903. if (scale === 'out') {
  2904. emit('onScale', 0.1);
  2905. } else if (scale === 'in') {
  2906. emit('onScale', -0.1);
  2907. } else {
  2908. emit('onRestore');
  2909. }
  2910. }
  2911. function handleFullscreen(e) {
  2912. fullscreen.value = !fullscreen.value;
  2913. emit('onFullscreen', e);
  2914. }
  2915. function isFullScreen() {
  2916. return document.isFullScreen || document.mozIsFullScreen || document.webkitIsFullScreen;
  2917. }
  2918. function onResize() {
  2919. // 如果当前非全屏,但是 fullscreen 为true,说明是esc退出全屏
  2920. if (!isFullScreen() && fullscreen.value) {
  2921. // 全屏下按键esc后要执行的动作
  2922. handleFullscreen('esc');
  2923. }
  2924. }
  2925. const expandTitle = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  2926. return expanded.value ? '全部收起' : '全部展开';
  2927. });
  2928. const fullTiltle = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  2929. return fullscreen.value ? '退出全屏' : '全屏';
  2930. });
  2931. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(() => {
  2932. window.addEventListener('resize', onResize);
  2933. });
  2934. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onBeforeUnmount"])(() => {
  2935. window.removeEventListener('resize', onResize);
  2936. });
  2937. return {
  2938. expanded,
  2939. fullscreen,
  2940. expandTitle,
  2941. fullTiltle,
  2942. handleExpand,
  2943. handleScale,
  2944. handleFullscreen
  2945. };
  2946. }
  2947. }));
  2948. // CONCATENATED MODULE: ./src/components/tools/tools.vue?vue&type=script&lang=js
  2949. // EXTERNAL MODULE: ./node_modules/vue-loader-v16/dist/exportHelper.js
  2950. var exportHelper = __webpack_require__("6b0d");
  2951. var exportHelper_default = /*#__PURE__*/__webpack_require__.n(exportHelper);
  2952. // CONCATENATED MODULE: ./src/components/tools/tools.vue
  2953. const __exports__ = /*#__PURE__*/exportHelper_default()(toolsvue_type_script_lang_js, [['render',toolsvue_type_template_id_1aca9713_render]])
  2954. /* harmony default export */ var tools_tools = (__exports__);
  2955. // CONCATENATED MODULE: ./src/components/tools/index.ts
  2956. /* harmony default export */ var components_tools = (tools_tools);
  2957. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/draggable/src/draggable.vue?vue&type=template&id=79ff2fba&ts=true
  2958. function draggablevue_type_template_id_79ff2fba_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
  2959. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
  2960. style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])(_ctx.style),
  2961. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])([{
  2962. [_ctx.classNameActive]: _ctx.enabled,
  2963. [_ctx.classNameDragging]: _ctx.dragging,
  2964. [_ctx.classNameDraggable]: _ctx.draggable
  2965. }, _ctx.className]),
  2966. ref: "eleRef",
  2967. onMousedown: _cache[0] || (_cache[0] = //@ts-ignore
  2968. (...args) => _ctx.elementMouseDown && _ctx.elementMouseDown(...args)),
  2969. onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
  2970. (...args) => _ctx.elementTouchDown && _ctx.elementTouchDown(...args))
  2971. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 38);
  2972. }
  2973. // CONCATENATED MODULE: ./src/components/draggable/src/draggable.vue?vue&type=template&id=79ff2fba&ts=true
  2974. // CONCATENATED MODULE: ./src/utils/fns.ts
  2975. function isFunction(func) {
  2976. return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';
  2977. } // 生成随机字符串, e表示长度
  2978. function randomString(e) {
  2979. e = e || 32;
  2980. const t = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
  2981. const a = t.length;
  2982. let n = '';
  2983. for (let i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a));
  2984. return n;
  2985. }
  2986. function snapToGrid(grid, pendingX, pendingY, scale = 1) {
  2987. const deltaX = Math.round(pendingX / scale / grid[0]) * grid[0];
  2988. const deltaY = Math.round(pendingY / scale / grid[1]) * grid[1];
  2989. return {
  2990. deltaX,
  2991. deltaY
  2992. };
  2993. }
  2994. function getSize(el) {
  2995. const rect = el.getBoundingClientRect();
  2996. return [rect.width, rect.height];
  2997. }
  2998. function restrictToBounds(value, min, max) {
  2999. if (value < min) {
  3000. return min;
  3001. }
  3002. if (max < value) {
  3003. return max;
  3004. }
  3005. return value;
  3006. }
  3007. // CONCATENATED MODULE: ./src/utils/dom.ts
  3008. function matchesSelectorToParentElements(el, selector, baseNode) {
  3009. let node = el;
  3010. const matchesSelectorFunc = ['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'].find(func => node && isFunction(node[func])) || '';
  3011. if (!isFunction(node[matchesSelectorFunc])) return false;
  3012. do {
  3013. if (node[matchesSelectorFunc](selector)) return true;
  3014. if (node === baseNode) return false;
  3015. node = node.parentNode;
  3016. } while (node);
  3017. return false;
  3018. }
  3019. function getComputedSize($el) {
  3020. const style = window.getComputedStyle($el);
  3021. return [parseFloat(style.getPropertyValue('width')), parseFloat(style.getPropertyValue('height'))];
  3022. }
  3023. const addEvent = function (element, event, handler, useCapture = false) {
  3024. if (element && event && handler) {
  3025. element.addEventListener(event, handler, useCapture);
  3026. }
  3027. };
  3028. /* istanbul ignore next */
  3029. const removeEvent = function (element, event, handler, useCapture = false) {
  3030. if (element && event && handler) {
  3031. element.removeEventListener(event, handler, useCapture);
  3032. }
  3033. };
  3034. // CONCATENATED MODULE: ./src/components/draggable/src/use-draggable.ts
  3035. const useDraggable = (props, {
  3036. emit
  3037. }, refs) => {
  3038. const events = {
  3039. mouse: {
  3040. start: 'mousedown',
  3041. move: 'mousemove',
  3042. stop: 'mouseup'
  3043. },
  3044. touch: {
  3045. start: 'touchstart',
  3046. move: 'touchmove',
  3047. stop: 'touchend'
  3048. }
  3049. };
  3050. const userSelectNone = {
  3051. userSelect: 'none',
  3052. MozUserSelect: 'none',
  3053. WebkitUserSelect: 'none',
  3054. MsUserSelect: 'none'
  3055. };
  3056. const userSelectAuto = {
  3057. userSelect: 'auto',
  3058. MozUserSelect: 'auto',
  3059. WebkitUserSelect: 'auto',
  3060. MsUserSelect: 'auto'
  3061. };
  3062. let eventsFor = events.mouse;
  3063. const left = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(props.x);
  3064. const top = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(props.y);
  3065. const zIndex = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(props.z);
  3066. const enabled = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(props.active);
  3067. const dragging = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  3068. const right = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3069. const bottom = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3070. const width = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3071. const height = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3072. const parentWidth = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3073. const parentHeight = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3074. let mouseClickPosition = {};
  3075. let bounds = {};
  3076. function resetBoundsAndMouseState() {
  3077. mouseClickPosition = {
  3078. mouseX: 0,
  3079. mouseY: 0,
  3080. x: 0,
  3081. y: 0,
  3082. w: 0,
  3083. h: 0
  3084. };
  3085. bounds = {
  3086. minLeft: -Infinity,
  3087. maxLeft: Infinity,
  3088. minRight: -Infinity,
  3089. maxRight: Infinity,
  3090. minTop: -Infinity,
  3091. maxTop: Infinity,
  3092. minBottom: -Infinity,
  3093. maxBottom: Infinity
  3094. };
  3095. }
  3096. function checkParentSize() {
  3097. if (props.parent) {
  3098. const [newParentWidth, newParentHeight] = getParentSize();
  3099. parentWidth.value = newParentWidth || 0;
  3100. parentHeight.value = newParentHeight || 0;
  3101. }
  3102. }
  3103. function getParentSize() {
  3104. if (props.parent && refs.eleRef.value) {
  3105. const style = window.getComputedStyle(refs.eleRef.value.parentNode, null);
  3106. return [parseInt(style.getPropertyValue('width'), 10), parseInt(style.getPropertyValue('height'), 10)];
  3107. }
  3108. return [0, 0];
  3109. }
  3110. function elementTouchDown(e) {
  3111. // e.stopPropagation()
  3112. eventsFor = events.touch;
  3113. elementDown(e);
  3114. }
  3115. function elementMouseDown(e) {
  3116. // e.stopPropagation()
  3117. eventsFor = events.mouse;
  3118. elementDown(e);
  3119. }
  3120. function elementDown(e) {
  3121. if (e instanceof MouseEvent && e.which !== 1) {
  3122. return;
  3123. }
  3124. const target = e.target || e.srcElement;
  3125. if (target && refs.eleRef.value && refs.eleRef.value.contains(target)) {
  3126. if (props.dragCancel && matchesSelectorToParentElements(target, props.dragCancel, refs.eleRef.value)) {
  3127. dragging.value = false;
  3128. return;
  3129. }
  3130. if (!enabled.value) {
  3131. enabled.value = true;
  3132. emit('activated');
  3133. emit('update:active', true);
  3134. }
  3135. if (props.draggable) {
  3136. dragging.value = true;
  3137. }
  3138. if (e instanceof MouseEvent) {
  3139. mouseClickPosition.mouseX = e.pageX;
  3140. mouseClickPosition.mouseY = e.pageY;
  3141. } else {
  3142. mouseClickPosition.mouseX = e.touches[0].pageX;
  3143. mouseClickPosition.mouseY = e.touches[0].pageY;
  3144. }
  3145. mouseClickPosition.left = left.value;
  3146. mouseClickPosition.right = right.value;
  3147. mouseClickPosition.top = top.value;
  3148. mouseClickPosition.bottom = bottom.value;
  3149. if (props.parent) {
  3150. bounds = calcDragLimits();
  3151. }
  3152. addEvent(document.documentElement, eventsFor.move, move);
  3153. addEvent(document.documentElement, eventsFor.stop, handleUp);
  3154. }
  3155. }
  3156. function calcDragLimits() {
  3157. const grid = props.grid;
  3158. return {
  3159. minLeft: left.value % grid[0],
  3160. maxLeft: Math.floor((parentWidth.value - width.value - left.value) / grid[0]) * grid[0] + left.value,
  3161. minRight: right.value % grid[0],
  3162. maxRight: Math.floor((parentWidth.value - width.value - right.value) / grid[0]) * grid[0] + right.value,
  3163. minTop: top.value % grid[1],
  3164. maxTop: Math.floor((parentHeight.value - height.value - top.value) / grid[1]) * grid[1] + top.value,
  3165. minBottom: bottom.value % grid[1],
  3166. maxBottom: Math.floor((parentHeight.value - height.value - bottom.value) / grid[1]) * grid[1] + bottom.value
  3167. };
  3168. }
  3169. function deselect(e) {
  3170. const target = e.target || e.srcElement;
  3171. if (refs.eleRef.value && !refs.eleRef.value.contains(target)) {
  3172. if (enabled.value && !props.preventDeactivation) {
  3173. enabled.value = false;
  3174. emit('deactivated');
  3175. emit('update:active', false);
  3176. }
  3177. } // resetBoundsAndMouseState()
  3178. }
  3179. function move(e) {
  3180. if (dragging.value) {
  3181. handleDrag(e);
  3182. }
  3183. }
  3184. function handleDrag(e) {
  3185. const axis = props.axis;
  3186. const grid = props.grid;
  3187. let pageX = 0;
  3188. let pageY = 0;
  3189. if (e instanceof MouseEvent) {
  3190. pageX = e.pageX;
  3191. pageY = e.pageY;
  3192. } else {
  3193. pageX = e.touches[0].pageX;
  3194. pageY = e.touches[0].pageY;
  3195. }
  3196. const tmpDeltaX = axis && axis !== 'y' ? mouseClickPosition.mouseX - pageX : 0;
  3197. const tmpDeltaY = axis && axis !== 'x' ? mouseClickPosition.mouseY - pageY : 0;
  3198. const {
  3199. deltaX,
  3200. deltaY
  3201. } = snapToGrid(grid, tmpDeltaX, tmpDeltaY, props.scale);
  3202. const lf = restrictToBounds(mouseClickPosition.left - deltaX, bounds.minLeft, bounds.maxLeft);
  3203. const tp = restrictToBounds(mouseClickPosition.top - deltaY, bounds.minTop, bounds.maxTop);
  3204. const rt = restrictToBounds(mouseClickPosition.right + deltaX, bounds.minRight, bounds.maxRight);
  3205. const bt = restrictToBounds(mouseClickPosition.bottom + deltaY, bounds.minBottom, bounds.maxBottom);
  3206. left.value = lf;
  3207. top.value = tp;
  3208. right.value = rt;
  3209. bottom.value = bt;
  3210. emit('dragging', left.value, top.value);
  3211. }
  3212. function moveHorizontally(val) {
  3213. const {
  3214. deltaX
  3215. } = snapToGrid(props.grid, val, top.value, props.scale);
  3216. const lf = restrictToBounds(deltaX, bounds.minLeft, bounds.maxLeft);
  3217. left.value = lf;
  3218. right.value = parentWidth.value - width.value - lf;
  3219. }
  3220. function moveVertically(val) {
  3221. const {
  3222. deltaY
  3223. } = snapToGrid(props.grid, left.value, val, props.scale);
  3224. const tp = restrictToBounds(deltaY, bounds.minTop, bounds.maxTop);
  3225. top.value = tp;
  3226. bottom.value = parentHeight.value - height.value - tp;
  3227. }
  3228. function handleUp() {
  3229. resetBoundsAndMouseState();
  3230. if (dragging.value) {
  3231. dragging.value = false;
  3232. emit('dragstop', left.value, top.value);
  3233. }
  3234. }
  3235. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onBeforeMount"])(() => {
  3236. resetBoundsAndMouseState();
  3237. });
  3238. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(() => {
  3239. if (!props.enableNativeDrag && refs.eleRef.value) {
  3240. refs.eleRef.value.ondragstart = () => false;
  3241. }
  3242. const [pw, ph] = getParentSize();
  3243. parentWidth.value = pw;
  3244. parentHeight.value = ph;
  3245. if (refs.eleRef.value) {
  3246. const [elWidth, elHeight] = getComputedSize(refs.eleRef.value);
  3247. width.value = elWidth;
  3248. height.value = elHeight;
  3249. right.value = parentWidth.value - width.value - left.value;
  3250. bottom.value = parentHeight.value - height.value - top.value;
  3251. }
  3252. addEvent(document.documentElement, 'mousedown', deselect);
  3253. addEvent(document.documentElement, 'touchend touchcancel', deselect);
  3254. addEvent(window, 'resize', checkParentSize);
  3255. });
  3256. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(() => {
  3257. removeEvent(document.documentElement, 'mousedown', deselect);
  3258. removeEvent(document.documentElement, 'touchstart', handleUp);
  3259. removeEvent(document.documentElement, 'mousemove', move);
  3260. removeEvent(document.documentElement, 'touchmove', move);
  3261. removeEvent(document.documentElement, 'mouseup', handleUp);
  3262. removeEvent(document.documentElement, 'touchend touchcancel', deselect);
  3263. removeEvent(window, 'resize', checkParentSize);
  3264. });
  3265. const style = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  3266. return {
  3267. transform: `translate(${left.value}px, ${top.value}px)`,
  3268. zIndex: zIndex.value,
  3269. ...(dragging.value && props.disableUserSelect ? userSelectNone : userSelectAuto)
  3270. };
  3271. });
  3272. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => props.active, active => {
  3273. enabled.value = active;
  3274. if (active) {
  3275. emit('activated');
  3276. } else {
  3277. emit('deactivated');
  3278. }
  3279. });
  3280. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => props.z, value => {
  3281. if (value >= 0 || value === 'auto') {
  3282. zIndex.value = value;
  3283. }
  3284. });
  3285. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => props.x, value => {
  3286. if (dragging.value) {
  3287. return;
  3288. }
  3289. if (props.parent) {
  3290. bounds = calcDragLimits();
  3291. }
  3292. moveHorizontally(value);
  3293. });
  3294. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => props.y, value => {
  3295. if (dragging.value) {
  3296. return;
  3297. }
  3298. if (props.parent) {
  3299. bounds = calcDragLimits();
  3300. }
  3301. moveVertically(value);
  3302. });
  3303. return {
  3304. enabled,
  3305. dragging,
  3306. style,
  3307. resetBoundsAndMouseState,
  3308. elementTouchDown,
  3309. elementMouseDown
  3310. };
  3311. };
  3312. // EXTERNAL MODULE: ./node_modules/@vue/shared/dist/shared.esm-bundler.js
  3313. var shared_esm_bundler = __webpack_require__("9ff4");
  3314. // CONCATENATED MODULE: ./src/utils/props.ts
  3315. const wrapperKey = Symbol('wrapper');
  3316. const propKey = '__elPropsReservedKey';
  3317. /**
  3318. * @description Build prop. It can better optimize prop types
  3319. * @description 生成 prop,能更好地优化类型
  3320. * @example
  3321. // limited options
  3322. // the type will be PropType<'light' | 'dark'>
  3323. buildProp({
  3324. type: String,
  3325. values: ['light', 'dark'],
  3326. } as const)
  3327. * @example
  3328. // limited options and other types
  3329. // the type will be PropType<'small' | 'large' | number>
  3330. buildProp({
  3331. type: [String, Number],
  3332. values: ['small', 'large'],
  3333. validator: (val: unknown): val is number => typeof val === 'number',
  3334. } as const)
  3335. @link see more: https://github.com/element-plus/element-plus/pull/3341
  3336. */
  3337. function buildProp(option, key) {
  3338. // filter native prop type and nested prop, e.g `null`, `undefined` (from `buildProps`)
  3339. if (!Object(shared_esm_bundler["a" /* isObject */])(option) || !!option[propKey]) return option;
  3340. const {
  3341. values,
  3342. required,
  3343. default: defaultValue,
  3344. type,
  3345. validator
  3346. } = option;
  3347. const _validator = values || validator ? val => {
  3348. let valid = false;
  3349. let allowedValues = [];
  3350. if (values) {
  3351. allowedValues = [...values, defaultValue];
  3352. valid = valid || allowedValues.includes(val);
  3353. }
  3354. if (validator) valid = valid || validator(val);
  3355. if (!valid && allowedValues.length > 0) {
  3356. const allowValuesText = [...new Set(allowedValues)].map(value => JSON.stringify(value)).join(', ');
  3357. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["warn"])(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ''}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
  3358. }
  3359. return valid;
  3360. } : undefined;
  3361. return {
  3362. type: typeof type === 'object' && Object.getOwnPropertySymbols(type).includes(wrapperKey) ? type[wrapperKey] : type,
  3363. validator: _validator,
  3364. [propKey]: true,
  3365. default: defaultValue,
  3366. required: !!required
  3367. };
  3368. }
  3369. const buildProps = props => fromPairs(Object.entries(props).map(([key, option]) => [key, buildProp(option, key)]));
  3370. const definePropType = val => ({
  3371. [wrapperKey]: val
  3372. });
  3373. // CONCATENATED MODULE: ./src/components/draggable/src/draggable.ts
  3374. const draggableProps = buildProps({
  3375. className: {
  3376. type: String,
  3377. default: 'zm-draggable'
  3378. },
  3379. classNameDraggable: {
  3380. type: String,
  3381. default: 'draggable'
  3382. },
  3383. classNameDragging: {
  3384. type: String,
  3385. default: 'dragging'
  3386. },
  3387. classNameActive: {
  3388. type: String,
  3389. default: 'active'
  3390. },
  3391. disableUserSelect: {
  3392. type: Boolean,
  3393. default: true
  3394. },
  3395. enableNativeDrag: {
  3396. type: Boolean,
  3397. default: false
  3398. },
  3399. preventDeactivation: {
  3400. type: Boolean,
  3401. default: false
  3402. },
  3403. active: {
  3404. type: Boolean,
  3405. default: false
  3406. },
  3407. draggable: {
  3408. type: Boolean,
  3409. default: true
  3410. },
  3411. x: {
  3412. type: Number,
  3413. default: 0
  3414. },
  3415. y: {
  3416. type: Number,
  3417. default: 0
  3418. },
  3419. z: {
  3420. type: [String, Number],
  3421. default: 'auto',
  3422. validator: val => typeof val === 'string' ? val === 'auto' : val >= 0
  3423. },
  3424. dragCancel: String,
  3425. axis: {
  3426. type: String,
  3427. default: 'both',
  3428. validator: val => ['x', 'y', 'both'].includes(val)
  3429. },
  3430. grid: {
  3431. type: Array,
  3432. default: () => [1, 1]
  3433. },
  3434. parent: {
  3435. type: Boolean,
  3436. default: false
  3437. },
  3438. scale: {
  3439. type: Number,
  3440. default: 1,
  3441. validator: val => val > 0
  3442. }
  3443. });
  3444. const draggableEmits = {
  3445. activated: () => true,
  3446. deactivated: () => true,
  3447. dragging: (x, y) => isNumber(x) && isNumber(y),
  3448. dragstop: (x, y) => isNumber(x) && isNumber(y),
  3449. 'update:active': value => typeof value === 'boolean'
  3450. };
  3451. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/draggable/src/draggable.vue?vue&type=script&lang=ts
  3452. /* harmony default export */ var draggablevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
  3453. replace: true,
  3454. name: 'Draggable',
  3455. props: draggableProps,
  3456. emits: draggableEmits,
  3457. setup(props, ctx) {
  3458. const eleRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
  3459. const draggable = useDraggable(props, ctx, {
  3460. eleRef
  3461. });
  3462. return {
  3463. top,
  3464. eleRef,
  3465. ...draggable
  3466. };
  3467. }
  3468. }));
  3469. // CONCATENATED MODULE: ./src/components/draggable/src/draggable.vue?vue&type=script&lang=ts
  3470. // CONCATENATED MODULE: ./src/components/draggable/src/draggable.vue
  3471. const draggable_exports_ = /*#__PURE__*/exportHelper_default()(draggablevue_type_script_lang_ts, [['render',draggablevue_type_template_id_79ff2fba_ts_true_render]])
  3472. /* harmony default export */ var src_draggable = (draggable_exports_);
  3473. // CONCATENATED MODULE: ./src/components/draggable/index.ts
  3474. /* harmony default export */ var components_draggable = (src_draggable);
  3475. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/clone-org/clone-org.vue?vue&type=template&id=61bebde9&ts=true
  3476. function clone_orgvue_type_template_id_61bebde9_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
  3477. const _component_tree_org_node = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("tree-org-node");
  3478. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Teleport"], {
  3479. to: "body"
  3480. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
  3481. id: "clone-tree-org",
  3482. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["clone-tree-org tree-org", {
  3483. horizontal: _ctx.horizontal,
  3484. collapsable: _ctx.collapsable
  3485. }])
  3486. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_tree_org_node, {
  3487. data: _ctx.data,
  3488. props: _ctx.props,
  3489. isClone: false,
  3490. horizontal: _ctx.horizontal,
  3491. labelStyle: _ctx.labelStyle,
  3492. collapsable: _ctx.collapsable,
  3493. renderContent: _ctx.renderContent,
  3494. labelClassName: _ctx.labelClassName
  3495. }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createSlots"])({
  3496. _: 2
  3497. }, [_ctx.defaultSlot ? {
  3498. name: "default",
  3499. fn: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(({
  3500. node
  3501. }) => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", {
  3502. node: node
  3503. })])
  3504. } : undefined, _ctx.expandSlot ? {
  3505. name: "expand",
  3506. fn: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(({
  3507. node
  3508. }) => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "expand", {
  3509. node: node
  3510. })])
  3511. } : undefined]), 1032, ["data", "props", "horizontal", "labelStyle", "collapsable", "renderContent", "labelClassName"])], 2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.modelValue]])]);
  3512. }
  3513. // CONCATENATED MODULE: ./src/components/clone-org/clone-org.vue?vue&type=template&id=61bebde9&ts=true
  3514. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/clone-org/clone-org.vue?vue&type=script&lang=ts
  3515. const cloneorgProps = buildProps({
  3516. data: {
  3517. type: Object,
  3518. required: true
  3519. },
  3520. props: {
  3521. type: definePropType(Object)
  3522. },
  3523. modelValue: Boolean,
  3524. horizontal: Boolean,
  3525. selectedKey: String,
  3526. collapsable: Boolean,
  3527. renderContent: Function,
  3528. labelStyle: Object,
  3529. labelClassName: {
  3530. type: [Function, String]
  3531. }
  3532. });
  3533. /* harmony default export */ var clone_orgvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
  3534. components: {
  3535. TreeOrgNode: components_node
  3536. },
  3537. props: cloneorgProps,
  3538. setup(props, ctx) {
  3539. const defaultSlot = !!ctx.slots.default;
  3540. const expandSlot = !!ctx.slots.expand;
  3541. return {
  3542. defaultSlot,
  3543. expandSlot
  3544. };
  3545. }
  3546. }));
  3547. // CONCATENATED MODULE: ./src/components/clone-org/clone-org.vue?vue&type=script&lang=ts
  3548. // CONCATENATED MODULE: ./src/components/clone-org/clone-org.vue
  3549. const clone_org_exports_ = /*#__PURE__*/exportHelper_default()(clone_orgvue_type_script_lang_ts, [['render',clone_orgvue_type_template_id_61bebde9_ts_true_render]])
  3550. /* harmony default export */ var clone_org = (clone_org_exports_);
  3551. // CONCATENATED MODULE: ./src/components/clone-org/index.ts
  3552. /* harmony default export */ var components_clone_org = (clone_org);
  3553. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/contextmenu/src/contextmenu.vue?vue&type=template&id=c9139626&ts=true
  3554. const contextmenuvue_type_template_id_c9139626_ts_true_hoisted_1 = ["action"];
  3555. function contextmenuvue_type_template_id_c9139626_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
  3556. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Teleport"], {
  3557. to: "body"
  3558. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Transition"], {
  3559. name: "dialog-fade",
  3560. onAfterEnter: _ctx.afterEnter,
  3561. onAfterLeave: _ctx.afterLeave
  3562. }, {
  3563. default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
  3564. style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])(_ctx.position),
  3565. onClick: _cache[1] || (_cache[1] = //@ts-ignore
  3566. (...args) => _ctx.handleMenu && _ctx.handleMenu(...args)),
  3567. ref: "eleRef",
  3568. class: "zm-tree-contextmenu"
  3569. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.menus, item => {
  3570. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [_ctx.editable || !['add', 'edit', 'delete'].includes(item.command) ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", {
  3571. class: "zm-tree-menu-item",
  3572. action: item.command,
  3573. key: item.command
  3574. }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(item.name), 9, contextmenuvue_type_template_id_c9139626_ts_true_hoisted_1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 64);
  3575. }), 256))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("textarea", {
  3576. class: "copy-textarea",
  3577. ref: "inputRef",
  3578. "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.copyText = $event)
  3579. }, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.copyText]])], 4), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.modelValue]])]),
  3580. _: 1
  3581. }, 8, ["onAfterEnter", "onAfterLeave"])]);
  3582. }
  3583. // CONCATENATED MODULE: ./src/components/contextmenu/src/contextmenu.vue?vue&type=template&id=c9139626&ts=true
  3584. // CONCATENATED MODULE: ./src/utils/constants.ts
  3585. const UPDATE_MODEL_EVENT = 'update:modelValue';
  3586. // CONCATENATED MODULE: ./src/components/contextmenu/src/use-contextmenu.ts
  3587. const useContextmenu = (defaultProps, {
  3588. emit
  3589. }, refs) => {
  3590. const copyText = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(''); // 递归遍历实现
  3591. function getNodeById(data, props, value) {
  3592. if (data[props.id] === value) {
  3593. return data;
  3594. } else if (Array.isArray(data[props.children])) {
  3595. const list = data[props.children];
  3596. for (let i = 0, len = list.length; i < len; i++) {
  3597. const row = list[i];
  3598. const pNode = getNodeById(row, props, value);
  3599. if (pNode) {
  3600. return pNode;
  3601. }
  3602. }
  3603. }
  3604. } // 移除节点
  3605. function handleDelete() {
  3606. const {
  3607. props,
  3608. data,
  3609. node
  3610. } = defaultProps;
  3611. if (defaultProps.nodeDelete) {
  3612. defaultProps.nodeDelete(node.$$data);
  3613. return;
  3614. }
  3615. if (node.$$root) {
  3616. utils_log.pretty('[提示] ', '根节点不允许删除', 'danger');
  3617. return;
  3618. }
  3619. const {
  3620. id,
  3621. children
  3622. } = props;
  3623. const oldPaNode = getNodeById(data, props, node.pid);
  3624. if (oldPaNode) {
  3625. const list = oldPaNode[children];
  3626. for (let i = 0, len = list.length; i < len; i++) {
  3627. if (list[i][id] === node.id) {
  3628. list.splice(i, 1);
  3629. emit('onNodeDelete', node.$$data, node);
  3630. break;
  3631. }
  3632. }
  3633. }
  3634. }
  3635. function handleMenu(e) {
  3636. const el = e.target;
  3637. if (el.className === 'zm-tree-menu-item') {
  3638. const command = el.getAttribute('action');
  3639. switch (command) {
  3640. case 'copy':
  3641. handleCopy();
  3642. break;
  3643. case 'add':
  3644. handleAdd();
  3645. break;
  3646. case 'edit':
  3647. handleEdit();
  3648. break;
  3649. case 'delete':
  3650. handleDelete();
  3651. break;
  3652. }
  3653. emit('contextmenu', {
  3654. command,
  3655. node: defaultProps.node,
  3656. data: defaultProps.node.$$data
  3657. });
  3658. emit(UPDATE_MODEL_EVENT, false);
  3659. }
  3660. }
  3661. function handleCopy() {
  3662. if (defaultProps.nodeCopy) {
  3663. defaultProps.nodeCopy(defaultProps.node.$$data);
  3664. return;
  3665. }
  3666. copyText.value = defaultProps.node.label;
  3667. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => {
  3668. if (refs.inputRef && refs.inputRef.value) {
  3669. refs.inputRef && refs.inputRef.value.select(); // 选中文本
  3670. navigator.clipboard.writeText(copyText.value).then(function () {
  3671. /* clipboard successfully set */
  3672. utils_log.pretty('[提示] ', '文本复制成功', 'success');
  3673. }, function () {
  3674. /* clipboard write failed */
  3675. utils_log.pretty('[错误] ', '浏览器不支持', 'danger');
  3676. });
  3677. emit('onNodeCopy', copyText.value);
  3678. }
  3679. });
  3680. }
  3681. function handleAdd() {
  3682. if (defaultProps.nodeAdd) {
  3683. defaultProps.nodeAdd(defaultProps.node.$$data);
  3684. return;
  3685. }
  3686. const {
  3687. id,
  3688. pid,
  3689. label,
  3690. expand,
  3691. children
  3692. } = defaultProps.props;
  3693. const {
  3694. node
  3695. } = defaultProps;
  3696. const json = {
  3697. [id]: String(new Date().getTime()),
  3698. [pid]: node.id,
  3699. [label]: '',
  3700. [expand]: false,
  3701. [children]: [],
  3702. newNode: true,
  3703. focused: true
  3704. };
  3705. if (Array.isArray(node.children)) {
  3706. node.$$data[children].push(json);
  3707. } else {
  3708. node.$$data[children] = [json];
  3709. }
  3710. emit('onNodeFocus', json);
  3711. }
  3712. function handleEdit() {
  3713. const {
  3714. nodeEdit,
  3715. node
  3716. } = defaultProps;
  3717. if (nodeEdit) {
  3718. nodeEdit(node.$$data);
  3719. return;
  3720. }
  3721. node.$$focused = true;
  3722. emit('onNodeFocus', node.$$data);
  3723. }
  3724. function handleClose(e) {
  3725. if (defaultProps.modelValue) {
  3726. if (refs.eleRef.value && refs.eleRef.value.contains(e.target)) {
  3727. return false;
  3728. }
  3729. emit('update:modelValue', false);
  3730. }
  3731. }
  3732. function afterEnter() {
  3733. emit('opened');
  3734. }
  3735. function afterLeave() {
  3736. emit('closed');
  3737. }
  3738. const position = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  3739. return {
  3740. left: `${defaultProps.x}px`,
  3741. top: `${defaultProps.y}px`
  3742. };
  3743. });
  3744. const editable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  3745. return !defaultProps.disabled && !defaultProps.node.disabled;
  3746. }); // mounted
  3747. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(() => {
  3748. document.addEventListener('mousedown', handleClose);
  3749. });
  3750. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(() => {
  3751. document.removeEventListener('mousedown', handleClose);
  3752. });
  3753. return {
  3754. position,
  3755. editable,
  3756. handleMenu,
  3757. handleEdit,
  3758. handleClose,
  3759. afterEnter,
  3760. afterLeave
  3761. };
  3762. };
  3763. // CONCATENATED MODULE: ./src/components/contextmenu/src/contextmenus.ts
  3764. const contextmenuProps = buildProps({
  3765. modelValue: {
  3766. type: Boolean,
  3767. required: true
  3768. },
  3769. data: {
  3770. type: Object,
  3771. required: true
  3772. },
  3773. node: {
  3774. type: definePropType(Object),
  3775. required: true
  3776. },
  3777. props: {
  3778. type: definePropType(Object)
  3779. },
  3780. x: Number,
  3781. y: Number,
  3782. menus: {
  3783. type: definePropType(Array)
  3784. },
  3785. nodeAdd: Function,
  3786. nodeDelete: Function,
  3787. nodeEdit: Function,
  3788. nodeCopy: Function,
  3789. disabled: Boolean
  3790. });
  3791. const contextmenuEmits = {
  3792. onNodeDelete: (data, node) => isObject(data) && isObject(node),
  3793. onNodeCopy: str => isString(str),
  3794. contextmenu: arg => isObject(arg),
  3795. onNodeFocus: data => isObject(data),
  3796. opened: () => true,
  3797. closed: () => true,
  3798. 'update:modelValue': value => typeof value === 'boolean'
  3799. };
  3800. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/contextmenu/src/contextmenu.vue?vue&type=script&lang=ts
  3801. /* harmony default export */ var contextmenuvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
  3802. name: 'Contextmenu',
  3803. props: contextmenuProps,
  3804. emits: contextmenuEmits,
  3805. setup(props, ctx) {
  3806. const inputRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
  3807. const eleRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
  3808. const copyText = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])('');
  3809. const oldData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({});
  3810. const contextmenu = useContextmenu(props, ctx, {
  3811. inputRef,
  3812. eleRef
  3813. });
  3814. return {
  3815. eleRef,
  3816. inputRef,
  3817. copyText,
  3818. oldData,
  3819. ...contextmenu
  3820. };
  3821. }
  3822. }));
  3823. // CONCATENATED MODULE: ./src/components/contextmenu/src/contextmenu.vue?vue&type=script&lang=ts
  3824. // CONCATENATED MODULE: ./src/components/contextmenu/src/contextmenu.vue
  3825. const contextmenu_exports_ = /*#__PURE__*/exportHelper_default()(contextmenuvue_type_script_lang_ts, [['render',contextmenuvue_type_template_id_c9139626_ts_true_render]])
  3826. /* harmony default export */ var src_contextmenu = (contextmenu_exports_);
  3827. // CONCATENATED MODULE: ./src/components/contextmenu/index.ts
  3828. /* harmony default export */ var components_contextmenu = (src_contextmenu);
  3829. // CONCATENATED MODULE: ./src/components/tree-org/src/tree.ts
  3830. const menus = [{
  3831. name: '复制文本',
  3832. command: 'copy'
  3833. }, {
  3834. name: '新增节点',
  3835. command: 'add'
  3836. }, {
  3837. name: '编辑节点',
  3838. command: 'edit'
  3839. }, {
  3840. name: '删除节点',
  3841. command: 'delete'
  3842. }];
  3843. const treeProps = buildProps({
  3844. data: {
  3845. type: Object,
  3846. required: true
  3847. },
  3848. center: Boolean,
  3849. props: {
  3850. type: definePropType(Object),
  3851. default: () => ({
  3852. id: 'id',
  3853. pid: 'pid',
  3854. label: 'label',
  3855. expand: 'expand',
  3856. children: 'children'
  3857. })
  3858. },
  3859. toolBar: {
  3860. type: [Object, Boolean],
  3861. default: () => ({
  3862. expand: true,
  3863. scale: true,
  3864. zoom: true,
  3865. restore: true,
  3866. fullscreen: true
  3867. })
  3868. },
  3869. disabled: {
  3870. // 是否禁用编辑
  3871. type: Boolean,
  3872. default: false
  3873. },
  3874. scalable: {
  3875. // 是否可缩放
  3876. type: Boolean,
  3877. default: true
  3878. },
  3879. draggable: {
  3880. // 是否可拖拽移动位置
  3881. type: Boolean,
  3882. default: true
  3883. },
  3884. draggableOnNode: {
  3885. // 是否可拖拽节点移动位置
  3886. type: Boolean,
  3887. default: false
  3888. },
  3889. nodeDraggable: {
  3890. // 节点是否可拖拽
  3891. type: Boolean,
  3892. default: true
  3893. },
  3894. cloneNodeDrag: {
  3895. // 拷贝并拖拽节点
  3896. type: Boolean,
  3897. default: true
  3898. },
  3899. onlyOneNode: {
  3900. // 是否仅拖动当前节点
  3901. type: Boolean,
  3902. default: true
  3903. },
  3904. clickDelay: {
  3905. // 是否仅拖动当前节点
  3906. type: Number,
  3907. default: 260
  3908. },
  3909. lazy: Boolean,
  3910. load: {
  3911. type: definePropType(Function)
  3912. },
  3913. defaultExpandLevel: Number,
  3914. defaultExpandKeys: {
  3915. type: Array,
  3916. default() {
  3917. return [];
  3918. }
  3919. },
  3920. beforeDragEnd: Function,
  3921. horizontal: Boolean,
  3922. selectedKey: {
  3923. type: [Array, String, Number]
  3924. },
  3925. collapsable: Boolean,
  3926. renderContent: Function,
  3927. labelStyle: Object,
  3928. labelClassName: {
  3929. type: [Function, String]
  3930. },
  3931. selectedClassName: {
  3932. type: [Function, String]
  3933. },
  3934. defineMenus: {
  3935. type: definePropType([Array, Function]),
  3936. default() {
  3937. return menus;
  3938. }
  3939. },
  3940. nodeAdd: Function,
  3941. nodeDelete: Function,
  3942. nodeEdit: Function,
  3943. nodeCopy: Function,
  3944. filterNodeMethod: Function
  3945. });
  3946. const treeEmits = {
  3947. 'on-drag': ({
  3948. x,
  3949. y
  3950. }) => isNumber(x) && isNumber(y),
  3951. 'on-drag-stop': ({
  3952. x,
  3953. y
  3954. }) => isNumber(x) && isNumber(y),
  3955. 'on-restore': () => true,
  3956. 'on-zoom': val => isNumber(val),
  3957. 'on-expand': (e, data, node) => e instanceof MouseEvent && isObject(node) && isObject(data),
  3958. 'on-expand-all': bool => typeof bool === 'boolean',
  3959. 'on-node-blur': (e, data, node) => e instanceof FocusEvent && isObject(node) && isObject(data),
  3960. 'on-node-click': (e, data, node) => e instanceof MouseEvent && isObject(node) && isObject(data),
  3961. 'on-node-dblclick': (e, data, node) => e instanceof MouseEvent && isObject(node) && isObject(data),
  3962. 'on-node-mouseenter': (e, data, node) => e instanceof MouseEvent && isObject(node) && isObject(data),
  3963. 'on-node-mouseleave': (e, data, node) => e instanceof MouseEvent && isObject(node) && isObject(data),
  3964. 'on-contextmenu': data => isObject(data),
  3965. 'on-node-copy': str => isString(str),
  3966. 'on-node-delete': node => isObject(node),
  3967. 'on-node-drag-start': node => isObject(node),
  3968. 'on-node-drag': node => isObject(node),
  3969. 'on-node-drag-end': (node, targetNode) => isObject(node) && isObject(targetNode),
  3970. 'on-node-focus': (e, data, node) => e instanceof FocusEvent && isObject(node) && isObject(data)
  3971. };
  3972. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.cause.js
  3973. var es_error_cause = __webpack_require__("d9e2");
  3974. // CONCATENATED MODULE: ./src/components/tree-org/src/use-tree.ts
  3975. const useTree = (props, {
  3976. emit
  3977. }, refs) => {
  3978. const left = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3979. const top = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3980. const autoDragging = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  3981. function onDrag(x, y) {
  3982. stopClick.set(true);
  3983. autoDragging.value = false;
  3984. left.value = x;
  3985. top.value = y;
  3986. emit('on-drag', {
  3987. x,
  3988. y
  3989. });
  3990. }
  3991. function preventOutOfBounds(x, y) {
  3992. const zoom = refs.zoomRef.value;
  3993. const orgchart = refs.treeRef.value;
  3994. let maxX = zoom.clientWidth / 2;
  3995. const maxY = zoom.clientHeight / 2;
  3996. let minY = zoom.clientHeight - orgchart.clientHeight;
  3997. let minX = zoom.clientWidth - orgchart.clientWidth;
  3998. if (minY > 0) {
  3999. minY = 0;
  4000. }
  4001. if (minX > 0) {
  4002. minX = 0;
  4003. }
  4004. if (props.center) {
  4005. const deviation = (zoom.clientWidth - orgchart.clientWidth) / 2;
  4006. minX = minX - deviation;
  4007. maxX = maxX - deviation; // console.log(props.center, minX, 38)
  4008. }
  4009. if (x > maxX) {
  4010. left.value = maxX;
  4011. } else if (x < minX) {
  4012. left.value = minX;
  4013. } else {
  4014. left.value = x;
  4015. }
  4016. if (y < minY) {
  4017. top.value = minY;
  4018. } else if (y > maxY) {
  4019. top.value = maxY;
  4020. } else {
  4021. top.value = y;
  4022. }
  4023. }
  4024. function onDragStop(x, y) {
  4025. preventOutOfBounds(x, y);
  4026. setTimeout(() => {
  4027. stopClick.set(false);
  4028. }, 200);
  4029. emit('on-drag-stop', {
  4030. x,
  4031. y
  4032. });
  4033. }
  4034. const nodeMoving = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  4035. const parenNode = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
  4036. value: {}
  4037. });
  4038. function nodeMouseenter(e, node) {
  4039. if (nodeMoving.value) {
  4040. parenNode.value = node;
  4041. }
  4042. emit('on-node-mouseenter', e, node.$$data, node);
  4043. return true;
  4044. }
  4045. function nodeMouseleave(e, node) {
  4046. if (nodeMoving.value) {
  4047. parenNode.value = null;
  4048. }
  4049. emit('on-node-mouseleave', e, node.$$data, node);
  4050. return true;
  4051. }
  4052. const contextmenu = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  4053. const menuX = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  4054. const menuY = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  4055. const menuData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])({});
  4056. const nodeMenus = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([]);
  4057. function nodeContextmenu(e, node) {
  4058. e.stopPropagation();
  4059. e.preventDefault();
  4060. const {
  4061. defineMenus
  4062. } = props;
  4063. if (Array.isArray(defineMenus)) {
  4064. nodeMenus.value = defineMenus;
  4065. } else if (typeof defineMenus === 'function') {
  4066. nodeMenus.value = defineMenus(e, node) || [];
  4067. }
  4068. contextmenu.value = true;
  4069. menuX.value = e.clientX;
  4070. menuY.value = e.clientY;
  4071. menuData.value = node;
  4072. }
  4073. const scale = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(1);
  4074. function zoomWheel(e) {
  4075. if (!props.scalable) return;
  4076. e.preventDefault(); // 鼠标滚轮缩放
  4077. if (e.deltaY < 0) {
  4078. zoomOrgchart(0.1);
  4079. } else {
  4080. zoomOrgchart(-0.1);
  4081. }
  4082. emit('on-zoom', scale.value);
  4083. }
  4084. function zoomOrgchart(zoom) {
  4085. if (!props.scalable) return;
  4086. const value = Number((Number(scale.value) + zoom).toFixed(1));
  4087. if (zoom > 0) {
  4088. scale.value = Math.min(3, value);
  4089. } else {
  4090. scale.value = Math.max(0.3, value);
  4091. }
  4092. }
  4093. function restoreOrgchart() {
  4094. scale.value = 1;
  4095. left.value = 0;
  4096. top.value = 0;
  4097. emit('on-restore');
  4098. }
  4099. function autoDrag(el, lf, tp) {
  4100. // 计算偏移量,保持根节点相对页面位置不变
  4101. autoDragging.value = true;
  4102. console.log(props.center, props.horizontal, el.offsetLeft, lf);
  4103. if (!props.center || props.horizontal) {
  4104. const x = el.offsetLeft - lf;
  4105. left.value -= x;
  4106. }
  4107. const y = el.offsetTop - tp;
  4108. top.value -= y;
  4109. preventOutOfBounds(left.value, top.value);
  4110. }
  4111. let timer;
  4112. function handleClick(e, node) {
  4113. // 由于鼠标事件执行顺序
  4114. // mouseover--> mousedown-->mouseup-->click -->mouseout
  4115. // 拖拽时会触发node-click
  4116. // 通过 stopClick 判断,如果执行了拖拽,则不再执行node-click
  4117. if (stopClick.get()) return; // 取消上次延时未执行的方法
  4118. clearTimeout(timer); // 执行延时
  4119. timer = setTimeout(() => {
  4120. // 此处为单击事件要执行的代码
  4121. emit('on-node-click', e, node.$$data, node);
  4122. }, props.clickDelay);
  4123. }
  4124. function handleDblclick(e, node) {
  4125. // 取消上次延时未执行的方法
  4126. clearTimeout(timer); // 此处为单击事件要执行的代码
  4127. emit('on-node-dblclick', e, node.$$data, node);
  4128. }
  4129. function handleExpand(e, node) {
  4130. e.stopPropagation();
  4131. const el = document.querySelector(`.is-root_${suffix}`);
  4132. if (el) {
  4133. const left = el.offsetLeft;
  4134. const top = el.offsetTop;
  4135. node.expand = !node.expand;
  4136. let needMove = true;
  4137. if (node.expand) {
  4138. expandedKeys.add(node.id);
  4139. if (props.lazy && props.load) {
  4140. needMove = false;
  4141. loadData(node, props.load, () => {
  4142. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => {
  4143. autoDrag(el, left, top);
  4144. });
  4145. });
  4146. }
  4147. } else if (!node.expand && node.children) {
  4148. expandedKeys.delete(node.id);
  4149. collapse(node.children);
  4150. }
  4151. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => {
  4152. needMove && autoDrag(el, left, top);
  4153. });
  4154. emit('on-expand', e, node.$$data, node);
  4155. }
  4156. }
  4157. function loadData(node, load, cb) {
  4158. load(node, (data, auto) => {
  4159. const {
  4160. children
  4161. } = keys;
  4162. node.isLeaf = !data.length;
  4163. if (data.length) {
  4164. node.$$data[children] = data;
  4165. auto && cb();
  4166. }
  4167. });
  4168. }
  4169. function filter(value) {
  4170. const filterNodeMethod = props.filterNodeMethod;
  4171. if (!filterNodeMethod) throw new Error('[Tree] filterNodeMethod is required when filter');
  4172. const traverse = function (node) {
  4173. const childNodes = node.children || [];
  4174. childNodes.forEach(child => {
  4175. child.$$hidden = !filterNodeMethod.call(child, value, child);
  4176. traverse(child);
  4177. });
  4178. if (node.$$hidden && childNodes.length) {
  4179. let unHidden = true;
  4180. unHidden = childNodes.some(child => !child.$$hidden);
  4181. node.$$hidden = !unHidden;
  4182. }
  4183. if (!value) return;
  4184. if (!node.$$hidden && node.children) node.expand = true;
  4185. };
  4186. traverse(treeData.value);
  4187. }
  4188. const keys = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])(Object.assign({
  4189. id: 'id',
  4190. pid: 'pid',
  4191. label: 'label',
  4192. expand: 'expand',
  4193. children: 'children',
  4194. isLeaf: 'isLeaf'
  4195. }, props.props));
  4196. function handleFocus(e, data, node) {
  4197. emit('on-node-focus', e, data, node);
  4198. }
  4199. function handleBlur(e, data, node) {
  4200. const {
  4201. id,
  4202. label
  4203. } = keys;
  4204. const childNodes = menuData.value.children || [];
  4205. for (let i = childNodes.length; i > 0; i--) {
  4206. const item = childNodes[i - 1];
  4207. if (item[id] === '' && item[label] === '') {
  4208. childNodes.splice(i - 1, 1);
  4209. break;
  4210. }
  4211. }
  4212. emit('on-node-blur', e, data, node);
  4213. }
  4214. const fullscreen = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  4215. function handleFullscreen(e) {
  4216. fullscreen.value = !fullscreen.value;
  4217. if (e === 'esc') {
  4218. return;
  4219. }
  4220. if (fullscreen.value) {
  4221. launchIntoFullscreen();
  4222. } else {
  4223. exitFullscreen();
  4224. }
  4225. }
  4226. function launchIntoFullscreen() {
  4227. // 全屏
  4228. const element = refs.eleRef.value;
  4229. if (element.requestFullscreen) {
  4230. element.requestFullscreen();
  4231. }
  4232. }
  4233. function exitFullscreen() {
  4234. // 退出全屏
  4235. if (document.exitFullscreen) {
  4236. document.exitFullscreen();
  4237. }
  4238. }
  4239. function collapse(list) {
  4240. list.forEach(child => {
  4241. if (child.expand) {
  4242. child.expand = false;
  4243. expandedKeys.delete(child.id);
  4244. }
  4245. child.children && collapse(child.children);
  4246. });
  4247. }
  4248. const expanded = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  4249. function expandChange() {
  4250. expanded.value = !expanded.value;
  4251. if (!expanded.value) {
  4252. expandedKeys.clear();
  4253. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => {
  4254. onDragStop(left.value, top.value);
  4255. });
  4256. }
  4257. toggleExpand(treeData.value, expanded.value);
  4258. emit('on-expand-all', expanded.value);
  4259. }
  4260. function toggleExpand(data, val) {
  4261. if (Array.isArray(data)) {
  4262. data.forEach(item => {
  4263. if (val) {
  4264. expandedKeys.add(item.id);
  4265. }
  4266. item.expand = val;
  4267. if (val) {
  4268. expandedKeys.add(item.id);
  4269. }
  4270. if (item.children) {
  4271. toggleExpand(item.children, val);
  4272. }
  4273. });
  4274. } else {
  4275. if (val) {
  4276. expandedKeys.add(data.id);
  4277. }
  4278. data.expand = val;
  4279. if (val) {
  4280. expandedKeys.add(data.id);
  4281. }
  4282. if (data.children) {
  4283. toggleExpand(data.children, val);
  4284. }
  4285. }
  4286. }
  4287. function setData(data) {
  4288. treeData.value = initNodes(data);
  4289. }
  4290. const zoomStyle = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  4291. return {
  4292. width: `${100 / scale.value}%`,
  4293. height: `${100 / scale.value}%`,
  4294. transform: `scale(${scale.value})`
  4295. };
  4296. });
  4297. const zoomPercent = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  4298. return `${Math.round(scale.value * 100)}%`;
  4299. });
  4300. const dragCancel = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  4301. return props.draggableOnNode && !props.nodeDraggable ? '' : `.tree-org-node__content:not(.is-root_${suffix})>.tree-org-node__inner`;
  4302. });
  4303. const expandTitle = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  4304. return expanded.value ? '收起全部节点' : '展开全部节点';
  4305. });
  4306. const fullTiltle = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  4307. return expanded.value ? '收起全部节点' : '展开全部节点';
  4308. });
  4309. const cloneData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])({});
  4310. const nodeargs = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  4311. const {
  4312. cloneNodeDrag,
  4313. onlyOneNode,
  4314. data
  4315. } = props;
  4316. return {
  4317. drag: props.nodeDraggable,
  4318. dragData: {
  4319. keys,
  4320. nodeMoving,
  4321. stopClick: stopClick,
  4322. parenNode,
  4323. cloneNodeDrag,
  4324. onlyOneNode,
  4325. contextmenu,
  4326. cloneData,
  4327. data
  4328. },
  4329. beforeDragEnd: props.beforeDragEnd,
  4330. initNodes: initNodes,
  4331. emit: emit
  4332. };
  4333. });
  4334. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => props.horizontal, () => {
  4335. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => {
  4336. onDragStop(left.value, top.value);
  4337. });
  4338. });
  4339. let expandedKeys = new Set(props.defaultExpandKeys);
  4340. function getExpandKeys() {
  4341. return [...expandedKeys];
  4342. }
  4343. function setExpandKeys(keys) {
  4344. expandedKeys = new Set(keys);
  4345. setData(props.data);
  4346. }
  4347. function initNodes(nodeData) {
  4348. const {
  4349. defaultExpandLevel = 0
  4350. } = props;
  4351. const data2node = (data, level) => {
  4352. const {
  4353. id,
  4354. label,
  4355. pid,
  4356. expand,
  4357. children,
  4358. isLeaf
  4359. } = keys;
  4360. const cloneData = {};
  4361. Object.keys(data).map(key => {
  4362. if (['hidden', 'disabled', 'className', 'style'].includes(key)) {
  4363. cloneData[key] = data[key];
  4364. }
  4365. });
  4366. const childNodes = data[children];
  4367. const childLevel = level + 1;
  4368. const _expand = data[expand];
  4369. const _id = data[id];
  4370. if (_expand) {
  4371. expandedKeys.add(_id);
  4372. } else if (_expand === undefined && level < defaultExpandLevel) {
  4373. expandedKeys.add(_id);
  4374. }
  4375. return { ...cloneData,
  4376. id: _id,
  4377. label: data[label],
  4378. pid: data[pid],
  4379. expand: expandedKeys.has(_id),
  4380. children: childNodes ? childNodes.map(child => {
  4381. return data2node(child, childLevel);
  4382. }) : undefined,
  4383. isLeaf: data[isLeaf],
  4384. $$level: level,
  4385. $$data: data,
  4386. $$focused: data.focused || false
  4387. };
  4388. };
  4389. return data2node(nodeData, 0);
  4390. }
  4391. const treeData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(initNodes(props.data));
  4392. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => props.data, (newVal, oldVal) => {
  4393. if (newVal !== oldVal) {
  4394. expandedKeys = new Set(props.defaultExpandKeys);
  4395. }
  4396. setData(props.data);
  4397. }, {
  4398. deep: true
  4399. });
  4400. const tools = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
  4401. visible: true,
  4402. data: {
  4403. expand: true,
  4404. scale: true,
  4405. zoom: true,
  4406. restore: true,
  4407. fullscreen: true
  4408. }
  4409. });
  4410. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onBeforeMount"])(() => {
  4411. if (typeof props.toolBar === 'object') {
  4412. Object.assign(tools.data, props.toolBar);
  4413. } else if (!props.toolBar) {
  4414. tools.visible = false;
  4415. }
  4416. });
  4417. const suffix = randomString(6);
  4418. return {
  4419. keys,
  4420. left,
  4421. top,
  4422. menuX,
  4423. menuY,
  4424. suffix,
  4425. nodeMoving,
  4426. zoomStyle,
  4427. tools,
  4428. zoomPercent,
  4429. dragCancel,
  4430. expandTitle,
  4431. fullTiltle,
  4432. nodeargs,
  4433. expanded,
  4434. fullscreen,
  4435. treeData,
  4436. autoDragging,
  4437. contextmenu,
  4438. nodeMenus,
  4439. menuData,
  4440. cloneData,
  4441. filter,
  4442. setData,
  4443. zoomWheel,
  4444. onDrag,
  4445. onDragStop,
  4446. expandChange,
  4447. handleFullscreen,
  4448. zoomOrgchart,
  4449. restoreOrgchart,
  4450. handleExpand,
  4451. getExpandKeys,
  4452. setExpandKeys,
  4453. nodeMouseenter,
  4454. nodeMouseleave,
  4455. nodeContextmenu,
  4456. handleFocus,
  4457. handleBlur,
  4458. handleClick,
  4459. handleDblclick
  4460. };
  4461. };
  4462. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/tree-org/src/tree.vue?vue&type=script&lang=ts
  4463. /* harmony default export */ var treevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
  4464. name: 'vue3TreeOrg',
  4465. components: {
  4466. Tools: components_tools,
  4467. CloneOrg: components_clone_org,
  4468. Draggable: components_draggable,
  4469. Contextmenu: components_contextmenu,
  4470. TreeOrgNode: components_node
  4471. },
  4472. directives: {
  4473. nodedrag: directives_drag
  4474. },
  4475. props: treeProps,
  4476. emits: treeEmits,
  4477. setup(props, ctx) {
  4478. const defaultSlot = !!ctx.slots.default;
  4479. const expandSlot = !!ctx.slots.expand;
  4480. const eleRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
  4481. const treeRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
  4482. const zoomRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
  4483. const treeOrg = useTree(props, ctx, {
  4484. eleRef,
  4485. treeRef,
  4486. zoomRef
  4487. });
  4488. return {
  4489. eleRef,
  4490. treeRef,
  4491. zoomRef,
  4492. defaultSlot,
  4493. expandSlot,
  4494. ...treeOrg
  4495. };
  4496. }
  4497. }));
  4498. // CONCATENATED MODULE: ./src/components/tree-org/src/tree.vue?vue&type=script&lang=ts
  4499. // CONCATENATED MODULE: ./src/components/tree-org/src/tree.vue
  4500. const tree_exports_ = /*#__PURE__*/exportHelper_default()(treevue_type_script_lang_ts, [['render',render]])
  4501. /* harmony default export */ var tree = (tree_exports_);
  4502. // CONCATENATED MODULE: ./src/components/tree-org/index.ts
  4503. /* istanbul ignore next */
  4504. tree.install = function (app) {
  4505. app.component(tree.name, tree);
  4506. };
  4507. /* harmony default export */ var tree_org = (tree);
  4508. // CONCATENATED MODULE: ./src/index.ts
  4509. // 核心插件
  4510. // 组件
  4511. // import '@/styles/index.scss'
  4512. const components = [tree_org];
  4513. const install = function (app) {
  4514. components.forEach(component => {
  4515. app.component(component.name, component);
  4516. });
  4517. app.use(core);
  4518. };
  4519. /* harmony default export */ var src_0 = ({
  4520. install,
  4521. Vue3TreeOrg: tree_org
  4522. });
  4523. // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
  4524. /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (src_0);
  4525. /***/ }),
  4526. /***/ "fc6a":
  4527. /***/ (function(module, exports, __webpack_require__) {
  4528. // toObject with fallback for non-array-like ES3 strings
  4529. var IndexedObject = __webpack_require__("44ad");
  4530. var requireObjectCoercible = __webpack_require__("1d80");
  4531. module.exports = function (it) {
  4532. return IndexedObject(requireObjectCoercible(it));
  4533. };
  4534. /***/ }),
  4535. /***/ "fdbf":
  4536. /***/ (function(module, exports, __webpack_require__) {
  4537. /* eslint-disable es-x/no-symbol -- required for testing */
  4538. var NATIVE_SYMBOL = __webpack_require__("4930");
  4539. module.exports = NATIVE_SYMBOL
  4540. && !Symbol.sham
  4541. && typeof Symbol.iterator == 'symbol';
  4542. /***/ })
  4543. /******/ });
  4544. //# sourceMappingURL=vue3-tree-org.common.js.map