hiprint.bundle.js 413 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567
  1. /**
  2. * jQuery Hiprint 2.5.3
  3. *
  4. * Copyright (c) 2016-2019 www.hinnn.com. All rights reserved.
  5. *
  6. * Licensed under the LGPL or commercial licenses
  7. * To use it on other terms please contact us: hinnn.com@gmail.com
  8. *
  9. */
  10. function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return !!right[Symbol.hasInstance](left); } else { return left instanceof right; } }
  11. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  12. var hiprint = function (t) {
  13. var e = {};
  14. function n(i) {
  15. if (e[i]) return e[i].exports;
  16. var o = e[i] = {
  17. i: i,
  18. l: !1,
  19. exports: {}
  20. };
  21. return t[i].call(o.exports, o, o.exports, n), o.l = !0, o.exports;
  22. }
  23. return n.m = t, n.c = e, n.d = function (t, e, i) {
  24. n.o(t, e) || Object.defineProperty(t, e, {
  25. enumerable: !0,
  26. get: i
  27. });
  28. }, n.r = function (t) {
  29. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
  30. value: "Module"
  31. }), Object.defineProperty(t, "__esModule", {
  32. value: !0
  33. });
  34. }, n.t = function (t, e) {
  35. if (1 & e && (t = n(t)), 8 & e) return t;
  36. if (4 & e && "object" == _typeof(t) && t && t.__esModule) return t;
  37. var i = Object.create(null);
  38. if (n.r(i), Object.defineProperty(i, "default", {
  39. enumerable: !0,
  40. value: t
  41. }), 2 & e && "string" != typeof t) for (var o in t) {
  42. n.d(i, o, function (e) {
  43. return t[e];
  44. }.bind(null, o));
  45. }
  46. return i;
  47. }, n.n = function (t) {
  48. var e = t && t.__esModule ? function () {
  49. return t.default;
  50. } : function () {
  51. return t;
  52. };
  53. return n.d(e, "a", e), e;
  54. }, n.o = function (t, e) {
  55. return Object.prototype.hasOwnProperty.call(t, e);
  56. }, n.p = "/", n(n.s = 21);
  57. }([function (t, e, n) {
  58. "use strict";
  59. var i;
  60. n.d(e, "a", function () {
  61. return hinnn;
  62. }), window.hinnn = {}, hinnn.event = (i = {}, {
  63. on: function on(t, e) {
  64. i[t] || (i[t] = []), i[t].push(e);
  65. },
  66. id: 0,
  67. off: function off(t, e) {
  68. var n = i[t];
  69. if (n) {
  70. for (var o = -1, r = 0; r < n.length; r++) {
  71. if (n[r] === e) {
  72. o = r;
  73. break;
  74. }
  75. }
  76. o < 0 || i[t].splice(o, 1);
  77. }
  78. },
  79. trigger: function trigger(t) {
  80. var e = i[t];
  81. if (e && e.length) for (var n = Array.prototype.slice.call(arguments, 1), o = 0; o < e.length; o++) {
  82. e[o].apply(this, n);
  83. }
  84. },
  85. clear: function clear(t) {
  86. i[t] = [];
  87. },
  88. getId: function getId() {
  89. return this.id += 1, this.id;
  90. },
  91. getNameWithId: function getNameWithId(t) {
  92. return t + "-" + this.getId();
  93. }
  94. }), hinnn.form = {
  95. serialize: function serialize(t) {
  96. var e = $(t).serializeArray(),
  97. n = {};
  98. return $.each(e, function () {
  99. n[this.name] ? "[object Array]" == Object.prototype.toString.call(n[this.name]) ? n[this.name].push(this.value) : n[this.name] = [n[this.name], this.value] : n[this.name] = this.value;
  100. }), n;
  101. }
  102. }, hinnn.pt = {
  103. toPx: function toPx(t) {
  104. return t * (this.getDpi() / 72);
  105. },
  106. dpi: 0,
  107. getDpi: function getDpi() {
  108. if (!this.dpi) {
  109. var _t2 = document.createElement("DIV");
  110. _t2.style.cssText = "width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden", document.body.appendChild(_t2), this.dpi = _t2.offsetHeight;
  111. }
  112. return this.dpi;
  113. }
  114. }, hinnn.px = {
  115. toPt: function toPt(t) {
  116. return t * (72 / this.getDpi());
  117. },
  118. dpi: 0,
  119. getDpi: function getDpi() {
  120. if (!this.dpi) {
  121. var _t3 = document.createElement("DIV");
  122. _t3.style.cssText = "width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden", document.body.appendChild(_t3), this.dpi = _t3.offsetHeight;
  123. }
  124. return this.dpi;
  125. }
  126. }, hinnn.mm = {
  127. toPt: function toPt(t) {
  128. return 72 / 25.4 * t;
  129. },
  130. toPx: function toPx(t) {
  131. return hinnn.pt.toPx(hinnn.mm.toPt(t));
  132. }
  133. }, hinnn.throttle = function (t, e, n) {
  134. var i,
  135. o,
  136. r,
  137. a = null,
  138. p = 0;
  139. n || (n = {});
  140. var s = function s() {
  141. p = !1 === n.leading ? 0 : _.now(), a = null, r = t.apply(i, o), a || (i = o = null);
  142. };
  143. return function () {
  144. var l = _.now();
  145. p || !1 !== n.leading || (p = l);
  146. var u = e - (l - p);
  147. return i = this, o = arguments, u <= 0 || u > e ? (a && (clearTimeout(a), a = null), p = l, r = t.apply(i, o), a || (i = o = null)) : a || !1 === n.trailing || (a = setTimeout(s, u)), r;
  148. };
  149. }, hinnn.debounce = function (t, e, n) {
  150. var i,
  151. o,
  152. r,
  153. a,
  154. p,
  155. s = function s() {
  156. var l = _.now() - a;
  157. l < e && l >= 0 ? i = setTimeout(s, e - l) : (i = null, n || (p = t.apply(r, o), i || (r = o = null)));
  158. };
  159. return function () {
  160. r = this, o = arguments, a = _.now();
  161. var l = n && !i;
  162. return i || (i = setTimeout(s, e)), l && (p = t.apply(r, o), r = o = null), p;
  163. };
  164. }, hinnn.toUtf8 = function (t) {
  165. var e, n, i, o;
  166. for (e = "", i = t.length, n = 0; n < i; n++) {
  167. (o = t.charCodeAt(n)) >= 1 && o <= 127 ? e += t.charAt(n) : o > 2047 ? (e += String.fromCharCode(224 | o >> 12 & 15), e += String.fromCharCode(128 | o >> 6 & 63), e += String.fromCharCode(128 | o >> 0 & 63)) : (e += String.fromCharCode(192 | o >> 6 & 31), e += String.fromCharCode(128 | o >> 0 & 63));
  168. }
  169. return e;
  170. }, hinnn.groupBy = function (t, e, n) {
  171. var i = {};
  172. return t.forEach(function (t) {
  173. var o = JSON.stringify(n(t));
  174. i[o] || (i[o] = {
  175. rows: []
  176. }, e.forEach(function (e) {
  177. i[o][e] = t[e];
  178. })), i[o].rows.push(t);
  179. }), Object.keys(i).map(function (t) {
  180. return i[t];
  181. });
  182. }, hinnn.orderBy = function (t, e) {
  183. if (t.length <= 1) return t;
  184. var n = Math.floor(t.length / 2),
  185. i = t.splice(n, 1)[0],
  186. o = [],
  187. r = [];
  188. var _iteratorNormalCompletion = true;
  189. var _didIteratorError = false;
  190. var _iteratorError = undefined;
  191. try {
  192. for (var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
  193. var _n = _step.value;
  194. e(_n) < e(i) ? o.push(_n) : r.push(_n);
  195. }
  196. } catch (err) {
  197. _didIteratorError = true;
  198. _iteratorError = err;
  199. } finally {
  200. try {
  201. if (!_iteratorNormalCompletion && _iterator.return != null) {
  202. _iterator.return();
  203. }
  204. } finally {
  205. if (_didIteratorError) {
  206. throw _iteratorError;
  207. }
  208. }
  209. }
  210. return this.orderBy(o, e).concat([i], this.orderBy(r, e));
  211. }, hinnn.dateFormat = function (t, e) {
  212. if (t) try {
  213. var o = "string" == typeof t ? new Date(t) : t;
  214. var n = {
  215. "M+": o.getMonth() + 1,
  216. "d+": o.getDate(),
  217. "H+": o.getHours(),
  218. "m+": o.getMinutes(),
  219. "s+": o.getSeconds(),
  220. "q+": Math.floor((o.getMonth() + 3) / 3),
  221. S: o.getMilliseconds()
  222. };
  223. for (var i in /(y+)/.test(e) && (e = e.replace(RegExp.$1, (o.getFullYear() + "").substr(4 - RegExp.$1.length))), n) {
  224. new RegExp("(" + i + ")").test(e) && (e = e.replace(RegExp.$1, 1 == RegExp.$1.length ? n[i] : ("00" + n[i]).substr(("" + n[i]).length)));
  225. }
  226. return e;
  227. } catch (t) {
  228. return console.log(t), "";
  229. }
  230. return "";
  231. };
  232. }, function (t, e, n) {
  233. "use strict";
  234. n.d(e, "a", function () {
  235. return o;
  236. });
  237. var i = n(9),
  238. o = function () {
  239. function t() {
  240. this.providers = [], this.movingDistance = 1.5, this.paperHeightTrim = 1, this.text = {
  241. supportOptions: [{
  242. name: "title",
  243. hidden: !1,
  244. title: ""
  245. }, {
  246. name: "field",
  247. hidden: !1
  248. }, {
  249. name: "testData",
  250. hidden: !1
  251. }, {
  252. name: "dataType",
  253. hidden: !1
  254. }, {
  255. name: "fontFamily",
  256. hidden: !1
  257. }, {
  258. name: "fontSize",
  259. hidden: !1
  260. }, {
  261. name: "fontWeight",
  262. hidden: !1
  263. }, {
  264. name: "letterSpacing",
  265. hidden: !1
  266. }, {
  267. name: "color",
  268. hidden: !1
  269. }, {
  270. name: "textDecoration",
  271. hidden: !1
  272. }, {
  273. name: "textAlign",
  274. hidden: !1
  275. }, {
  276. name: "textContentVerticalAlign",
  277. hidden: !1
  278. }, {
  279. name: "lineHeight",
  280. hidden: !1
  281. }, {
  282. name: "textType",
  283. hidden: !1
  284. }, {
  285. name: "barcodeMode",
  286. hidden: !1
  287. }, {
  288. name: "hideTitle",
  289. hidden: !1
  290. }, {
  291. name: "showInPage",
  292. hidden: !1
  293. }, {
  294. name: "unShowInPage",
  295. hidden: !1
  296. }, {
  297. name: "fixed",
  298. hidden: !1
  299. }, {
  300. name: "axis",
  301. hidden: !1
  302. }, {
  303. name: "transform",
  304. hidden: !1
  305. }, {
  306. name: "optionsGroup",
  307. hidden: !1
  308. }, {
  309. name: "borderLeft",
  310. hidden: !1
  311. }, {
  312. name: "borderTop",
  313. hidden: !1
  314. }, {
  315. name: "borderRight",
  316. hidden: !1
  317. }, {
  318. name: "borderBottom",
  319. hidden: !1
  320. }, {
  321. name: "borderWidth",
  322. hidden: !1
  323. }, {
  324. name: "borderColor",
  325. hidden: !1
  326. }, {
  327. name: "contentPaddingLeft",
  328. hidden: !1
  329. }, {
  330. name: "contentPaddingTop",
  331. hidden: !1
  332. }, {
  333. name: "contentPaddingRight",
  334. hidden: !1
  335. }, {
  336. name: "contentPaddingBottom",
  337. hidden: !1
  338. }, {
  339. name: "backgroundColor",
  340. hidden: !1
  341. }, {
  342. name: "formatter",
  343. hidden: !1
  344. }, {
  345. name: "styler",
  346. hidden: !1
  347. }],
  348. default: {
  349. fontFamily: void 0,
  350. fontSize: void 0,
  351. fontWeight: "",
  352. letterSpacing: void 0,
  353. textAlign: void 0,
  354. textType: "text",
  355. hideTitle: !1,
  356. height: 9.75,
  357. lineHeight: void 0,
  358. width: 120
  359. }
  360. }, this.image = {
  361. supportOptions: [{
  362. name: "field",
  363. hidden: !1
  364. }, {
  365. name: "src",
  366. hidden: !1
  367. }, {
  368. name: "showInPage",
  369. hidden: !1
  370. }, {
  371. name: "fixed",
  372. hidden: !1
  373. }, {
  374. name: "axis",
  375. hidden: !1
  376. }, {
  377. name: "transform",
  378. hidden: !1
  379. }, {
  380. name: "formatter",
  381. hidden: !1
  382. }, {
  383. name: "styler",
  384. hidden: !1
  385. }],
  386. default: {}
  387. }, this.longText = {
  388. supportOptions: [{
  389. name: "title",
  390. hidden: !1
  391. }, {
  392. name: "field",
  393. hidden: !1
  394. }, {
  395. name: "testData",
  396. hidden: !1
  397. }, {
  398. name: "fontFamily",
  399. hidden: !1
  400. }, {
  401. name: "fontSize",
  402. hidden: !1
  403. }, {
  404. name: "fontWeight",
  405. hidden: !1
  406. }, {
  407. name: "letterSpacing",
  408. hidden: !1
  409. }, {
  410. name: "textAlign",
  411. hidden: !1
  412. }, {
  413. name: "lineHeight",
  414. hidden: !1
  415. }, {
  416. name: "color",
  417. hidden: !1
  418. }, {
  419. name: "hideTitle",
  420. hidden: !1
  421. }, {
  422. name: "longTextIndent",
  423. hidden: !1
  424. }, {
  425. name: "leftSpaceRemoved",
  426. hidden: !1
  427. }, {
  428. name: "showInPage",
  429. hidden: !1
  430. }, {
  431. name: "unShowInPage",
  432. hidden: !1
  433. }, {
  434. name: "fixed",
  435. hidden: !1
  436. }, {
  437. name: "axis",
  438. hidden: !1
  439. }, {
  440. name: "lHeight",
  441. hidden: !1
  442. }, {
  443. name: "transform",
  444. hidden: !1
  445. }, {
  446. name: "optionsGroup",
  447. hidden: !1
  448. }, {
  449. name: "borderLeft",
  450. hidden: !1
  451. }, {
  452. name: "borderTop",
  453. hidden: !1
  454. }, {
  455. name: "borderRight",
  456. hidden: !1
  457. }, {
  458. name: "borderBottom",
  459. hidden: !1
  460. }, {
  461. name: "borderWidth",
  462. hidden: !1
  463. }, {
  464. name: "borderColor",
  465. hidden: !1
  466. }, {
  467. name: "contentPaddingLeft",
  468. hidden: !1
  469. }, {
  470. name: "contentPaddingTop",
  471. hidden: !1
  472. }, {
  473. name: "contentPaddingRight",
  474. hidden: !1
  475. }, {
  476. name: "contentPaddingBottom",
  477. hidden: !1
  478. }, {
  479. name: "backgroundColor",
  480. hidden: !1
  481. }, {
  482. name: "formatter",
  483. hidden: !1
  484. }, {
  485. name: "styler",
  486. hidden: !1
  487. }],
  488. default: {
  489. fontFamily: void 0,
  490. fontSize: void 0,
  491. fontWeight: "",
  492. letterSpacing: void 0,
  493. textAlign: void 0,
  494. hideTitle: !1,
  495. height: 42,
  496. lineHeight: void 0,
  497. width: 550
  498. }
  499. }, this.table = {
  500. supportOptions: [{
  501. name: "field",
  502. hidden: !1
  503. }, {
  504. name: "fontFamily",
  505. hidden: !1
  506. }, {
  507. name: "fontSize",
  508. hidden: !1
  509. }, {
  510. name: "lineHeight",
  511. hidden: !1
  512. }, {
  513. name: "textAlign",
  514. hidden: !1
  515. }, {
  516. name: "gridColumns",
  517. hidden: !1
  518. }, {
  519. name: "gridColumnsGutter",
  520. hidden: !1
  521. }, {
  522. name: "tableBorder",
  523. hidden: !1
  524. }, {
  525. name: "tableHeaderBorder",
  526. hidden: !1
  527. }, {
  528. name: "tableHeaderCellBorder",
  529. hidden: !1
  530. }, {
  531. name: "tableHeaderRowHeight",
  532. hidden: !1
  533. }, {
  534. name: "tableHeaderBackground",
  535. hidden: !1
  536. }, {
  537. name: "tableHeaderFontSize",
  538. hidden: !1
  539. }, {
  540. name: "tableHeaderFontWeight",
  541. hidden: !1
  542. }, {
  543. name: "tableBodyRowHeight",
  544. hidden: !1
  545. }, {
  546. name: "tableBodyRowBorder",
  547. hidden: !1
  548. }, {
  549. name: "tableBodyCellBorder",
  550. hidden: !1
  551. }, {
  552. name: "axis",
  553. hidden: !1
  554. }, {
  555. name: "lHeight",
  556. hidden: !1
  557. }, {
  558. name: "autoCompletion",
  559. hidden: !1
  560. }, {
  561. name: "columns",
  562. hidden: !1
  563. }, {
  564. name: "styler",
  565. hidden: !1
  566. }, {
  567. name: "rowStyler",
  568. hidden: !1
  569. }, {
  570. name: "tableFooterRepeat",
  571. hidden: !1
  572. }, {
  573. name: "footerFormatter",
  574. hidden: !1
  575. }, {
  576. name: "gridColumnsFooterFormatter",
  577. hidden: !1
  578. }],
  579. default: {
  580. fontFamily: void 0,
  581. fontSize: void 0,
  582. fontWeight: "",
  583. textAlign: void 0,
  584. tableBorder: void 0,
  585. tableHeaderBorder: void 0,
  586. tableHeaderCellBorder: void 0,
  587. tableHeaderBackground: void 0,
  588. tableHeaderRowHeight: void 0,
  589. tableHeaderFontWeight: void 0,
  590. tableBodyCellBorder: void 0,
  591. tableBodyRowHeight: void 0,
  592. letterSpacing: "",
  593. lineHeight: void 0,
  594. width: 550
  595. }
  596. }, this.tableCustom = {
  597. supportOptions: [{
  598. name: "field",
  599. hidden: !1
  600. }, {
  601. name: "fontFamily",
  602. hidden: !1
  603. }, {
  604. name: "fontSize",
  605. hidden: !1
  606. }, {
  607. name: "textAlign",
  608. hidden: !1
  609. }, {
  610. name: "tableBorder",
  611. hidden: !1
  612. }, {
  613. name: "tableHeaderBorder",
  614. hidden: !1
  615. }, {
  616. name: "tableHeaderCellBorder",
  617. hidden: !1
  618. }, {
  619. name: "tableHeaderRowHeight",
  620. hidden: !1
  621. }, {
  622. name: "tableHeaderFontSize",
  623. hidden: !1
  624. }, {
  625. name: "tableHeaderFontWeight",
  626. hidden: !1
  627. }, {
  628. name: "tableHeaderBackground",
  629. hidden: !1
  630. }, {
  631. name: "tableBodyRowHeight",
  632. hidden: !1
  633. }, {
  634. name: "tableBodyRowBorder",
  635. hidden: !1
  636. }, {
  637. name: "tableBodyCellBorder",
  638. hidden: !1
  639. }, {
  640. name: "axis",
  641. hidden: !1
  642. }, {
  643. name: "lHeight",
  644. hidden: !1
  645. }, {
  646. name: "autoCompletion",
  647. hidden: !1
  648. }, {
  649. name: "tableFooterRepeat",
  650. hidden: !1
  651. }],
  652. default: {
  653. fontFamily: void 0,
  654. fontSize: void 0,
  655. fontWeight: "",
  656. textAlign: void 0,
  657. tableBorder: void 0,
  658. tableHeaderBorder: void 0,
  659. tableHeaderCellBorder: void 0,
  660. tableHeaderBackground: void 0,
  661. tableHeaderRowHeight: void 0,
  662. tableHeaderFontWeight: void 0,
  663. tableBodyCellBorder: void 0,
  664. tableBodyRowHeight: void 0,
  665. letterSpacing: "",
  666. lineHeight: void 0,
  667. width: 550
  668. }
  669. }, this.hline = {
  670. supportOptions: [{
  671. name: "borderColor",
  672. hidden: !1
  673. }, {
  674. name: "borderWidth",
  675. hidden: !1
  676. }, {
  677. name: "showInPage",
  678. hidden: !1
  679. }, {
  680. name: "fixed",
  681. hidden: !1
  682. }, {
  683. name: "axis",
  684. hidden: !1
  685. }, {
  686. name: "transform",
  687. hidden: !1
  688. }, {
  689. name: "borderStyle",
  690. hidden: !1
  691. }],
  692. default: {
  693. borderWidth: .75,
  694. height: 9,
  695. width: 90
  696. }
  697. }, this.vline = {
  698. supportOptions: [{
  699. name: "borderColor",
  700. hidden: !1
  701. }, {
  702. name: "borderWidth",
  703. hidden: !1
  704. }, {
  705. name: "showInPage",
  706. hidden: !1
  707. }, {
  708. name: "fixed",
  709. hidden: !1
  710. }, {
  711. name: "axis",
  712. hidden: !1
  713. }, {
  714. name: "transform",
  715. hidden: !1
  716. }, {
  717. name: "borderStyle",
  718. hidden: !1
  719. }],
  720. default: {
  721. borderWidth: void 0,
  722. height: 90,
  723. width: 9
  724. }
  725. }, this.rect = {
  726. supportOptions: [{
  727. name: "borderColor",
  728. hidden: !1
  729. }, {
  730. name: "borderWidth",
  731. hidden: !1
  732. }, {
  733. name: "showInPage",
  734. hidden: !1
  735. }, {
  736. name: "fixed",
  737. hidden: !1
  738. }, {
  739. name: "axis",
  740. hidden: !1
  741. }, {
  742. name: "transform",
  743. hidden: !1
  744. }, {
  745. name: "borderStyle",
  746. hidden: !1
  747. }],
  748. default: {
  749. borderWidth: void 0,
  750. height: 90,
  751. width: 90
  752. }
  753. }, this.oval = {
  754. supportOptions: [{
  755. name: "borderColor",
  756. hidden: !1
  757. }, {
  758. name: "borderWidth",
  759. hidden: !1
  760. }, {
  761. name: "showInPage",
  762. hidden: !1
  763. }, {
  764. name: "fixed",
  765. hidden: !1
  766. }, {
  767. name: "axis",
  768. hidden: !1
  769. }, {
  770. name: "transform",
  771. hidden: !1
  772. }, {
  773. name: "borderStyle",
  774. hidden: !1
  775. }],
  776. default: {
  777. borderWidth: void 0,
  778. height: 90,
  779. width: 90
  780. }
  781. }, this.html = {
  782. supportOptions: [{
  783. name: "showInPage",
  784. hidden: !1
  785. }, {
  786. name: "unShowInPage",
  787. hidden: !1
  788. }, {
  789. name: "fixed",
  790. hidden: !1
  791. }, {
  792. name: "axis",
  793. hidden: !1
  794. }, {
  795. name: "formatter",
  796. hidden: !1
  797. }],
  798. default: {
  799. height: 90,
  800. width: 90
  801. }
  802. }, this.tableColumn = {
  803. supportOptions: [{
  804. name: "title",
  805. hidden: !1
  806. }, {
  807. name: "align",
  808. hidden: !1
  809. }, {
  810. name: "halign",
  811. hidden: !1
  812. }, {
  813. name: "vAlign",
  814. hidden: !1
  815. }, {
  816. name: "paddingLeft",
  817. hidden: !1
  818. }, {
  819. name: "paddingRight",
  820. hidden: !1
  821. }, {
  822. name: "formatter2",
  823. hidden: !1
  824. }, {
  825. name: "styler2",
  826. hidden: !1
  827. }],
  828. default: {
  829. height: 90,
  830. width: 90
  831. }
  832. };
  833. }
  834. return t.prototype.init = function (t) {
  835. t && $.extend(this, t);
  836. }, Object.defineProperty(t, "instance", {
  837. get: function get() {
  838. return t._instance || (t._instance = new t(), window.HIPRINT_CONFIG && $.extend(t._instance, HIPRINT_CONFIG), t._instance.optionItems && t._instance.optionItems.forEach(function (t) {
  839. i.a.registerItem(t);
  840. })), t._instance;
  841. },
  842. enumerable: !0,
  843. configurable: !0
  844. }), t;
  845. }();
  846. }, function (t, e, n) {
  847. "use strict";
  848. var i = function () {
  849. function t(t) {
  850. this.printElement = t;
  851. }
  852. return t.prototype.updatePosition = function (t, e) {
  853. this.left = t, this.top = e;
  854. }, t;
  855. }();
  856. n.d(e, "a", function () {
  857. return o;
  858. });
  859. var o = function () {
  860. function t() {
  861. this.printTemplateContainer = {}, this.A1 = {
  862. width: 841,
  863. height: 594
  864. }, this.A2 = {
  865. width: 420,
  866. height: 594
  867. }, this.A3 = {
  868. width: 420,
  869. height: 297
  870. }, this.A4 = {
  871. width: 210,
  872. height: 297
  873. }, this.A5 = {
  874. width: 210,
  875. height: 148
  876. }, this.A6 = {
  877. width: 105,
  878. height: 148
  879. }, this.A7 = {
  880. width: 105,
  881. height: 74
  882. }, this.A8 = {
  883. width: 52,
  884. height: 74
  885. }, this.B1 = {
  886. width: 1e3,
  887. height: 707
  888. }, this.B2 = {
  889. width: 500,
  890. height: 707
  891. }, this.B3 = {
  892. width: 500,
  893. height: 353
  894. }, this.B4 = {
  895. width: 250,
  896. height: 353
  897. }, this.B5 = {
  898. width: 250,
  899. height: 176
  900. }, this.B6 = {
  901. width: 125,
  902. height: 176
  903. }, this.B7 = {
  904. width: 125,
  905. height: 88
  906. }, this.B8 = {
  907. width: 62,
  908. height: 88
  909. }, this.dragLengthCNum = function (t, e) {
  910. var n = .75 * t;
  911. return e && (e = e), Math.round(n / e) * e;
  912. };
  913. }
  914. return Object.defineProperty(t, "instance", {
  915. get: function get() {
  916. return this._instance || (this._instance = new t()), this._instance;
  917. },
  918. enumerable: !0,
  919. configurable: !0
  920. }), t.prototype.getDragingPrintElement = function () {
  921. return t.instance.dragingPrintElement;
  922. }, t.prototype.setDragingPrintElement = function (e) {
  923. t.instance.dragingPrintElement = new i(e);
  924. }, t.prototype.guid = function () {
  925. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (t) {
  926. var e = 16 * Math.random() | 0;
  927. return ("x" == t ? e : 3 & e | 8).toString(16);
  928. });
  929. }, t.prototype.imageToBase64 = function (t) {
  930. if (-1 == $(t).attr("src").indexOf("base64")) try {
  931. var e = document.createElement("canvas"),
  932. n = new Image();
  933. n.src = t.attr("src"), e.width = n.width, e.height = n.height, e.getContext("2d").drawImage(n, 0, 0), t.attr("src", e.toDataURL("image/png"));
  934. } catch (e) {
  935. try {
  936. this.xhrLoadImage(t);
  937. } catch (t) {
  938. console.log(t);
  939. }
  940. }
  941. }, t.prototype.xhrLoadImage = function (t) { }, t.prototype.transformImg = function (t) {
  942. var e = this;
  943. t.map(function (t, n) {
  944. e.imageToBase64($(n));
  945. });
  946. }, t.prototype.getPrintTemplateById = function (e) {
  947. return t.instance.printTemplateContainer[e];
  948. }, t.prototype.setPrintTemplateById = function (e, n) {
  949. return t.instance.printTemplateContainer[e] = n;
  950. }, t;
  951. }();
  952. }, function (t, e, n) {
  953. "use strict";
  954. var i = function () {
  955. return function () { };
  956. }();
  957. n.d(e, "a", function () {
  958. return o;
  959. });
  960. var o = function () {
  961. function t(t) {
  962. t = t || {}, this.left = t.left, this.top = t.top, this.topInDesign = this.top, this.height = t.height, this.width = t.width, this.init(t);
  963. }
  964. return t.prototype.setDefault = function (t) {
  965. this.defaultOptions = t, this.initSize();
  966. }, t.prototype.initSize = function () {
  967. this.width || this.setWidth(this.defaultOptions.width), this.height || this.setHeight(this.defaultOptions.height);
  968. }, t.prototype.initSizeByHtml = function (t, e) {
  969. this.width || this.setWidth(t), this.height || this.setHeight(e);
  970. }, t.prototype.getLeft = function () {
  971. return this.left;
  972. }, t.prototype.displayLeft = function () {
  973. return this.left + "pt";
  974. }, t.prototype.setLeft = function (t) {
  975. null != t && (this.left = t);
  976. }, t.prototype.getTop = function () {
  977. return this.top;
  978. }, t.prototype.getTopInDesign = function () {
  979. return this.topInDesign;
  980. }, t.prototype.displayTop = function () {
  981. return this.top + "pt";
  982. }, t.prototype.setTop = function (t) {
  983. null != t && (this.top = t);
  984. }, t.prototype.copyDesignTopFromTop = function () {
  985. this.topInDesign = this.top;
  986. }, t.prototype.getHeight = function () {
  987. return this.height;
  988. }, t.prototype.displayHeight = function () {
  989. return this.height + "pt";
  990. }, t.prototype.setHeight = function (t) {
  991. null != t && (this.height = t);
  992. }, t.prototype.getWidth = function () {
  993. return this.width;
  994. }, t.prototype.displayWidth = function () {
  995. return this.width + "pt";
  996. }, t.prototype.setWidth = function (t) {
  997. null != t && (this.width = t);
  998. }, t.prototype.getValueFromOptionsOrDefault = function (t) {
  999. return null == this[t] ? this.defaultOptions[t] : this[t];
  1000. }, t.prototype.getPrintElementOptionEntity = function () {
  1001. var t = new i(),
  1002. e = this;
  1003. return Object.keys(this).filter(function (t) {
  1004. return "topInDesign" != t;
  1005. }).forEach(function (n) {
  1006. if ("number" != typeof e[n] && "string" != typeof e[n] && _typeof(e[n]) != _typeof(!0) || (t[n] = e[n]), "style" == n) {
  1007. t.style = {};
  1008. var i = e[n];
  1009. if (i) Object.keys(i).forEach(function (e) {
  1010. "number" != typeof i[e] && "string" != typeof i[e] || (t.style[e] = i[e]);
  1011. });
  1012. }
  1013. }), t;
  1014. }, t.prototype.init = function (t) {
  1015. var e = this;
  1016. t && Object.keys(t).forEach(function (n) {
  1017. e[n] = t[n];
  1018. });
  1019. }, t;
  1020. }();
  1021. }, function (module, __webpack_exports__, __webpack_require__) {
  1022. "use strict";
  1023. __webpack_require__.d(__webpack_exports__, "a", function () {
  1024. return BasePrintElement;
  1025. });
  1026. var _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17),
  1027. _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1),
  1028. _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9),
  1029. _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6),
  1030. _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0),
  1031. _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8),
  1032. _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2),
  1033. BasePrintElement = function () {
  1034. function BasePrintElement(t) {
  1035. this.printElementType = t, this.id = _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.guid();
  1036. }
  1037. return BasePrintElement.prototype.getConfigOptionsByName = function (t) {
  1038. return _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance[t];
  1039. }, BasePrintElement.prototype.getProxyTarget = function (t) {
  1040. t && this.SetProxyTargetOption(t);
  1041. var e = this.getData(),
  1042. n = this.createTarget(this.getTitle(), e);
  1043. return this.updateTargetSize(n), this.css(n, e), n;
  1044. }, BasePrintElement.prototype.SetProxyTargetOption = function (t) {
  1045. this.options.getPrintElementOptionEntity();
  1046. $.extend(this.options, t);
  1047. }, BasePrintElement.prototype.showInPage = function (t, e) {
  1048. var n = this.options.showInPage,
  1049. i = this.options.unShowInPage;
  1050. if (n) {
  1051. if ("first" == n) return 0 == t;
  1052. if (t == e - 1 && "last" == i) return !1;
  1053. if ("odd" == n) return (0 != t || "first" != i) && t % 2 == 0;
  1054. if ("even" == n) return t % 2 == 1;
  1055. if ("last" == n) return t == e - 1;
  1056. }
  1057. return (0 != t || "first" != i) && (t != e - 1 || "last" != i);
  1058. }, BasePrintElement.prototype.setTemplateId = function (t) {
  1059. this.templateId = t;
  1060. }, BasePrintElement.prototype.setPanel = function (t) {
  1061. this.panel = t;
  1062. }, BasePrintElement.prototype.getField = function () {
  1063. return this.options.field || this.printElementType.field;
  1064. }, BasePrintElement.prototype.getTitle = function () {
  1065. return this.printElementType.title;
  1066. }, BasePrintElement.prototype.updateSizeAndPositionOptions = function (t, e, n, i) {
  1067. this.options.setLeft(t), this.options.setTop(e), this.options.copyDesignTopFromTop(), this.options.setWidth(n), this.options.setHeight(i), _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger("hiprintTemplateDataChanged_" + this.templateId);
  1068. }, BasePrintElement.prototype.initSizeByHtml = function (t) {
  1069. if (t && t.length) {
  1070. this.createTempContainer();
  1071. var e = t.clone();
  1072. this.getTempContainer().append(e), this.options.initSizeByHtml(parseInt(_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.px.toPt(e.width()).toString()), parseInt(_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.px.toPt(e.height()).toString())), this.removeTempContainer();
  1073. }
  1074. }, BasePrintElement.prototype.updateTargetSize = function (t) {
  1075. t.css("width", this.options.displayWidth()), t.css("height", this.options.displayHeight());
  1076. }, BasePrintElement.prototype.updateTargetWidth = function (t) {
  1077. t.css("width", this.options.displayWidth());
  1078. }, BasePrintElement.prototype.getDesignTarget = function (t) {
  1079. var e = this;
  1080. return this.designTarget = this.getHtml(t)[0].target, this.designPaper = t, this.designTarget.click(function () {
  1081. _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger(e.getPrintElementSelectEventKey(), {
  1082. printElement: e
  1083. });
  1084. }), this.designTarget;
  1085. }, BasePrintElement.prototype.getPrintElementSelectEventKey = function () {
  1086. return "PrintElementSelectEventKey_" + this.templateId;
  1087. }, BasePrintElement.prototype.design = function (t, e) {
  1088. var n = this;
  1089. this.designTarget.hidraggable({
  1090. axis: n.options.axis && t && t.axisEnabled ? n.options.axis : void 0,
  1091. onDrag: function onDrag(t, i, o) {
  1092. n.updateSizeAndPositionOptions(i, o), n.createLineOfPosition(e);
  1093. },
  1094. moveUnit: "pt",
  1095. minMove: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance,
  1096. onBeforeDrag: function onBeforeDrag(t) {
  1097. _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !0, n.designTarget.focus(), n.createLineOfPosition(e);
  1098. },
  1099. onStopDrag: function onStopDrag(t) {
  1100. _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !1, n.removeLineOfPosition();
  1101. }
  1102. }), this.designTarget.hireizeable({
  1103. showPoints: n.getReizeableShowPoints(),
  1104. onBeforeResize: function onBeforeResize() {
  1105. _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !0;
  1106. },
  1107. onResize: function onResize(t, i, o, r, a) {
  1108. n.onResize(t, i, o, r, a), n.createLineOfPosition(e);
  1109. },
  1110. onStopResize: function onStopResize() {
  1111. _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !1, n.removeLineOfPosition();
  1112. }
  1113. }), this.bingCopyEvent(this.designTarget), this.bingKeyboardMoveEvent(this.designTarget, e);
  1114. }, BasePrintElement.prototype.getPrintElementEntity = function (t) {
  1115. return t ? new _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__.a(void 0, this.options.getPrintElementOptionEntity(), this.printElementType.getPrintElementTypeEntity()) : new _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__.a(this.printElementType.tid, this.options.getPrintElementOptionEntity());
  1116. }, BasePrintElement.prototype.submitOption = function () {
  1117. var t = this;
  1118. this.getPrintElementOptionItems().forEach(function (e) {
  1119. var n = e.getValue();
  1120. n && "object" == _typeof(n) ? Object.keys(n).forEach(function (e) {
  1121. t.options[e] = n[e];
  1122. }) : t.options[e.name] = n;
  1123. }), this.updateDesignViewFromOptions(), _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger("hiprintTemplateDataChanged_" + this.templateId);
  1124. }, BasePrintElement.prototype.getReizeableShowPoints = function () {
  1125. return ["s", "e"];
  1126. }, BasePrintElement.prototype.onResize = function (t, e, n, i, o) {
  1127. this.updateSizeAndPositionOptions(o, i, n, e);
  1128. }, BasePrintElement.prototype.getOrderIndex = function () {
  1129. return this.options.getTop();
  1130. }, BasePrintElement.prototype.getHtml = function (t, e, n) {
  1131. var i = 0;
  1132. this.setCurrenttemplateData(e);
  1133. var o = [],
  1134. r = this.getBeginPrintTopInPaperByReferenceElement(t),
  1135. a = t.getPaperFooter(i);
  1136. this.isHeaderOrFooter() || this.isFixed() || r > a && (o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
  1137. target: void 0,
  1138. printLine: void 0
  1139. })), r = r - a + t.paperHeader, i++ , a = t.getPaperFooter(i));
  1140. var p = this.getData(e),
  1141. s = this.createTarget(this.getTitle(), p, n);
  1142. return this.updateTargetSize(s), this.css(s, p), s.css("position", "absolute"), s.css("left", this.options.displayLeft()), s.css("top", r + "pt"), o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
  1143. target: s,
  1144. printLine: r + this.options.getHeight()
  1145. })), o;
  1146. }, BasePrintElement.prototype.getHtml2 = function (t, e, n) {
  1147. var i = 0;
  1148. this.setCurrenttemplateData(e);
  1149. var o = [],
  1150. r = this.getBeginPrintTopInPaperByReferenceElement(t),
  1151. a = t.getPaperFooter(i);
  1152. this.isHeaderOrFooter() || this.isFixed() || (r > a && (o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
  1153. target: void 0,
  1154. printLine: void 0
  1155. })), r = r - a + t.paperHeader, i++ , a = t.getPaperFooter(i)), r <= a && r + this.options.getHeight() > a && (o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
  1156. target: void 0,
  1157. printLine: void 0
  1158. })), r = t.paperHeader, i++ , a = t.getPaperFooter(i)));
  1159. var p = this.getData(e),
  1160. s = this.createTarget(this.getTitle(), p);
  1161. return this.updateTargetSize(s), this.css(s, p), s.css("position", "absolute"), s.css("left", this.options.displayLeft()), s.css("top", r + "pt"), o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
  1162. target: s,
  1163. printLine: r + this.options.getHeight(),
  1164. referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__.a({
  1165. top: this.options.getTop(),
  1166. left: this.options.getLeft(),
  1167. height: this.options.getHeight(),
  1168. width: this.options.getWidth(),
  1169. beginPrintPaperIndex: t.index,
  1170. bottomInLastPaper: r + this.options.getHeight(),
  1171. printTopInPaper: r
  1172. })
  1173. })), o;
  1174. }, BasePrintElement.prototype.getBeginPrintTopInPaperByReferenceElement = function (t) {
  1175. var e = this.options.getTop();
  1176. return this.isHeaderOrFooter() || this.isFixed() ? e : t.referenceElement.isPositionLeftOrRight(e) ? t.referenceElement.printTopInPaper + (e - t.referenceElement.top) : t.referenceElement.bottomInLastPaper + (e - (t.referenceElement.top + t.referenceElement.height));
  1177. }, BasePrintElement.prototype.css = function (t, e) {
  1178. var n = this,
  1179. i = [],
  1180. o = this.getConfigOptions();
  1181. if (o) {
  1182. var r = o.supportOptions;
  1183. r && r.forEach(function (e) {
  1184. var o = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(e.name);
  1185. if (o && o.css) {
  1186. var r = o.css(t, n.options.getValueFromOptionsOrDefault(e.name));
  1187. r && i.push(r);
  1188. }
  1189. });
  1190. }
  1191. this.stylerCss(t, e);
  1192. }, BasePrintElement.prototype.stylerCss = function (t, e) {
  1193. var n = this.getStyler();
  1194. if (n) {
  1195. var i = n(e, this.options, t, this._currenttemplateData);
  1196. if (i) Object.keys(i).forEach(function (e) {
  1197. t.css(e, i[e]);
  1198. });
  1199. }
  1200. }, BasePrintElement.prototype.getData = function (t) {
  1201. return t ? t[this.getField()] || "" : this.printElementType.getData();
  1202. }, BasePrintElement.prototype.getPrintElementOptionItems = function () {
  1203. if (this._printElementOptionItems) return this._printElementOptionItems;
  1204. var t = [],
  1205. e = this.getConfigOptions();
  1206. if (e) {
  1207. var n = e.supportOptions;
  1208. n && n.filter(function (t) {
  1209. return !t.hidden;
  1210. }).forEach(function (e) {
  1211. var n = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(e.name);
  1212. t.push(n);
  1213. });
  1214. }
  1215. return this._printElementOptionItems = this.filterOptionItems(t.concat()), this._printElementOptionItems;
  1216. }, BasePrintElement.prototype.getPrintElementOptionItemsByName = function (t) {
  1217. var e = [],
  1218. n = this.getConfigOptionsByName(t);
  1219. if (n) {
  1220. var i = n.supportOptions;
  1221. i && i.filter(function (t) {
  1222. return !t.hidden;
  1223. }).forEach(function (t) {
  1224. var n = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(t.name);
  1225. e.push(n);
  1226. });
  1227. }
  1228. return e.concat();
  1229. }, BasePrintElement.prototype.filterOptionItems = function (t) {
  1230. return this.printElementType.field ? t.filter(function (t) {
  1231. return "field" != t.name;
  1232. }) : t;
  1233. }, BasePrintElement.prototype.createTempContainer = function () {
  1234. this.removeTempContainer(), $("body").append($('<div class="hiprint_temp_Container hiprint-printPaper" style="overflow:hidden;height: 0px;box-sizing: border-box;"></div>'));
  1235. }, BasePrintElement.prototype.removeTempContainer = function () {
  1236. $(".hiprint_temp_Container").remove();
  1237. }, BasePrintElement.prototype.getTempContainer = function () {
  1238. return $(".hiprint_temp_Container");
  1239. }, BasePrintElement.prototype.isHeaderOrFooter = function () {
  1240. return this.options.getTopInDesign() < this.panel.paperHeader || this.options.getTopInDesign() >= this.panel.paperFooter;
  1241. }, BasePrintElement.prototype.delete = function () {
  1242. this.designTarget && this.designTarget.remove();
  1243. }, BasePrintElement.prototype.setCurrenttemplateData = function (t) {
  1244. this._currenttemplateData = t;
  1245. }, BasePrintElement.prototype.isFixed = function () {
  1246. return this.options.fixed;
  1247. }, BasePrintElement.prototype.onRendered = function (t, e) {
  1248. this.printElementType && this.printElementType.onRendered && this.printElementType.onRendered(e, this.options, t.getTarget());
  1249. }, BasePrintElement.prototype.createLineOfPosition = function (t) {
  1250. var e = $(".toplineOfPosition" + this.id),
  1251. n = $(".leftlineOfPosition" + this.id),
  1252. i = $(".rightlineOfPosition" + this.id),
  1253. o = $(".bottomlineOfPosition" + this.id);
  1254. if (e.length ? e.css("top", this.options.displayTop()) : ((e = $('<div class="toplineOfPosition' + this.id + '" style="border:0;border-top:1px dashed rgb(169, 169, 169);position: absolute; width: 100%;"></div>')).css("top", this.options.displayTop()), e.css("width", t.displayWidth()), this.designTarget.parents(".hiprint-printPaper-content").append(e)), n.length) n.css("left", this.options.displayLeft()); else {
  1255. var r = $('<div class="leftlineOfPosition' + this.id + '" style="border:0;border-left:1px dashed rgb(169, 169, 169);position: absolute;height: 100%;"></div>');
  1256. r.css("left", this.options.displayLeft()), r.css("height", t.displayHeight()), this.designTarget.parents(".hiprint-printPaper-content").append(r);
  1257. }
  1258. if (i.length) i.css("left", this.options.getLeft() + this.options.getWidth() + "pt"); else {
  1259. var a = $('<div class="rightlineOfPosition' + this.id + '" style="border:0;border-left:1px dashed rgb(169, 169, 169);position: absolute;height: 100%;"></div>');
  1260. a.css("left", this.options.getLeft() + this.options.getWidth() + "pt"), a.css("height", t.displayHeight()), this.designTarget.parents(".hiprint-printPaper-content").append(a);
  1261. }
  1262. if (o.length) o.css("top", this.options.getTop() + this.options.getHeight() + "pt"); else {
  1263. var p = $('<div class="bottomlineOfPosition' + this.id + '" style="border:0;border-top:1px dashed rgb(169, 169, 169);position: absolute;width: 100%;"></div>');
  1264. p.css("top", this.options.getTop() + this.options.getHeight() + "pt"), p.css("width", t.displayWidth()), this.designTarget.parents(".hiprint-printPaper-content").append(p);
  1265. }
  1266. }, BasePrintElement.prototype.removeLineOfPosition = function () {
  1267. $(".toplineOfPosition" + this.id).remove(), $(".leftlineOfPosition" + this.id).remove(), $(".rightlineOfPosition" + this.id).remove(), $(".bottomlineOfPosition" + this.id).remove();
  1268. }, BasePrintElement.prototype.getFields = function () {
  1269. var t = this.printElementType.getFields();
  1270. return t || (t = _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.getPrintTemplateById(this.templateId).getFields());
  1271. }, BasePrintElement.prototype.bingCopyEvent = function (t) { }, BasePrintElement.prototype.getFormatter = function () {
  1272. var formatter = void 0;
  1273. if (this.printElementType.formatter && (formatter = this.printElementType.formatter), this.options.formatter) try {
  1274. var s = "formatter=" + this.options.formatter;
  1275. eval(s);
  1276. } catch (t) {
  1277. console.log(t);
  1278. }
  1279. return formatter;
  1280. }, BasePrintElement.prototype.getStyler = function () {
  1281. var fnstyler = void 0;
  1282. if (this.printElementType.styler && (fnstyler = this.printElementType.styler), this.options.styler) try {
  1283. var s = "fnstyler=" + this.options.styler;
  1284. eval(s);
  1285. } catch (t) {
  1286. console.log(t);
  1287. }
  1288. return fnstyler;
  1289. }, BasePrintElement.prototype.bingKeyboardMoveEvent = function (t, e) {
  1290. var n = this,
  1291. i = void 0,
  1292. o = void 0;
  1293. t.attr("tabindex", "1"), t.keydown(function (r) {
  1294. switch (r.keyCode) {
  1295. case 37:
  1296. i = n.options.getLeft(), n.updateSizeAndPositionOptions(i - _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance), t.css("left", n.options.displayLeft()), n.createLineOfPosition(e), r.preventDefault();
  1297. break;
  1298. case 38:
  1299. o = n.options.getTop(), n.updateSizeAndPositionOptions(void 0, o - _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance), t.css("top", n.options.displayTop()), n.createLineOfPosition(e), r.preventDefault();
  1300. break;
  1301. case 39:
  1302. i = n.options.getLeft(), n.updateSizeAndPositionOptions(i + _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance), t.css("left", n.options.displayLeft()), n.createLineOfPosition(e), r.preventDefault();
  1303. break;
  1304. case 40:
  1305. o = n.options.getTop(), n.updateSizeAndPositionOptions(void 0, o + _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance), t.css("top", n.options.displayTop()), n.createLineOfPosition(e), r.preventDefault();
  1306. }
  1307. });
  1308. }, BasePrintElement.prototype.inRect = function (t) {
  1309. var e = this.designTarget.offset().left,
  1310. n = this.designTarget.offset().top;
  1311. return t.minX < e && t.minY < n && t.maxX > e && t.maxY > n;
  1312. }, BasePrintElement.prototype.multipleSelect = function (t) {
  1313. t ? this.designTarget.addClass("multipleSelect") : this.designTarget.removeClass("multipleSelect");
  1314. }, BasePrintElement.prototype.updatePositionByMultipleSelect = function (t, e) {
  1315. this.updateSizeAndPositionOptions(t + this.options.getLeft(), e + this.options.getTop()), this.designTarget.css("left", this.options.displayLeft()), this.designTarget.css("top", this.options.displayTop());
  1316. }, BasePrintElement;
  1317. }();
  1318. }, function (t, e, n) {
  1319. "use strict";
  1320. var i = function () {
  1321. function t() { }
  1322. return t.prototype.init = function (t) {
  1323. this.target = $('<input type="text" class="hitable-editor-text" value="" />'), t.getTarget().append(this.target), this.target.focus();
  1324. }, t.prototype.getValue = function () {
  1325. return this.target.val();
  1326. }, t.prototype.setValue = function (t) {
  1327. this.target.val(t);
  1328. }, t.prototype.destroy = function () {
  1329. this.target.remove();
  1330. }, t;
  1331. }(),
  1332. o = function () {
  1333. function t() {
  1334. this.text = new i();
  1335. }
  1336. return Object.defineProperty(t, "Instance", {
  1337. get: function get() {
  1338. return t._instance || (t._instance = new t()), t._instance;
  1339. },
  1340. enumerable: !0,
  1341. configurable: !0
  1342. }), t;
  1343. }(),
  1344. r = function () {
  1345. function t() { }
  1346. return Object.defineProperty(t, "Instance", {
  1347. get: function get() {
  1348. return o._instance || (t._instance = new t()), t._instance;
  1349. },
  1350. enumerable: !0,
  1351. configurable: !0
  1352. }), t.prototype.createEditor = function (t) {
  1353. return $.extend({}, o.Instance[t]);
  1354. }, t;
  1355. }(),
  1356. a = n(10),
  1357. p = n(14),
  1358. s = n(11),
  1359. l = function () {
  1360. function t() { }
  1361. return t.prototype.init = function (t, e) {
  1362. var n = this;
  1363. this.tableOptions = e, this.title = t.title, this.field = t.field, t.getTarget().unbind("dblclick.hitable").bind("dblclick.hitable", function () {
  1364. t.isEditing = !0, n.beginEdit(t);
  1365. });
  1366. }, t.prototype.getDisplayHtml = function () {
  1367. return this.title;
  1368. }, t.prototype.beginEdit = function (t) {
  1369. var e = this;
  1370. this.editor = r.Instance.createEditor("text"), t.getTarget().html(""), this.editor.init(t), (this.title || this.field) && (this.tableOptions.options.isEnableEditField ? this.editor.setValue((this.title || "") + "#" + (this.field || "")) : this.editor.setValue(this.title || "")), $(this.editor.target).keydown(function (n) {
  1371. 13 == n.keyCode && e.endEdit(t);
  1372. }), $(this.editor.target).blur(function (n) {
  1373. e.endEdit(t);
  1374. }), this.tableOptions.editingCell && this.tableOptions.editingCell.id != t.id && this.tableOptions.editingCell.innerElement.endEdit(this.tableOptions.editingCell), this.tableOptions.editingCell = t;
  1375. }, t.prototype.endEdit = function (t) {
  1376. var e = this.editor.getValue();
  1377. if (e) {
  1378. if (this.tableOptions.options.isEnableEditField) {
  1379. var n = e.split("#");
  1380. t.title = this.title = n[0], n.length > 0 && (t.field = this.field = n[1]);
  1381. } else t.title = this.title = e;
  1382. } else this.tableOptions.options.isEnableEditField ? (t.title = this.title = "", t.field = this.field = "") : t.title = this.title = "";
  1383. this.editor.destroy(), t.getTarget().html(this.title);
  1384. }, t;
  1385. }(),
  1386. u = function () {
  1387. return function (t) {
  1388. this.title = t.title, this.field = t.field, this.width = t.width, this.align = t.align, this.halign = t.halign, this.vAlign = t.vAlign, this.colspan = t.colspan, this.rowspan = t.rowspan, this.checked = t.checked, this.columnId = t.columnId, this.formatter2 = t.formatter2, this.styler2 = t.styler2;
  1389. };
  1390. }(),
  1391. d = function () {
  1392. function t() {
  1393. this.id = s.a.createId();
  1394. }
  1395. return t.prototype.init = function (t, e, n, i) {
  1396. this.isHead = i, this.rowId = n, this.isEditing = !1;
  1397. var o = /^[0-9]*$/;
  1398. this.target = t, this.tableOptions = e;
  1399. var r = this.target.attr("colspan");
  1400. this.colspan = o.test(r) ? parseInt(r) : 1;
  1401. var a = this.target.attr("rowspan");
  1402. this.rowspan = o.test(a) ? parseInt(a) : 1, this.initEvent(), this.isHead && this.initInnerEelement();
  1403. }, t.prototype.beginEdit = function () {
  1404. if (!this.isEditing && this.tableOptions.isEnableEdit && this.tableOptions.onBeforEdit(this)) {
  1405. var t = this.getValue();
  1406. this.editor = r.Instance.createEditor("text"), this.isEditing = !0, this.tableOptions.editingCell = this, this.target.html(""), this.editor.init(this), this.editor.setValue(t);
  1407. }
  1408. }, t.prototype.endEdit = function () {
  1409. this.isEditing = !1;
  1410. var t = this.editor.getValue();
  1411. this.editor.destroy(), this.target.html(t);
  1412. }, t.prototype.getTarget = function () {
  1413. return this.target;
  1414. }, t.prototype.getValue = function () {
  1415. return this.target.html();
  1416. }, t.prototype.setValue = function (t) { }, t.prototype.initInnerEelement = function () {
  1417. this.innerElement = new l(), this.innerElement.init(this, this.tableOptions);
  1418. }, t.prototype.initEvent = function () { }, t.prototype.isXYinCell = function (t, e) {
  1419. var n = new a.b({
  1420. x: t,
  1421. y: e,
  1422. height: 0,
  1423. width: 0
  1424. });
  1425. return this.isOverlap(n);
  1426. }, t.prototype.getTableRect = function () {
  1427. return new a.b({
  1428. x: this.target.offset().left,
  1429. y: this.target.offset().top,
  1430. height: this.target[0].offsetHeight,
  1431. width: this.target[0].offsetWidth
  1432. });
  1433. }, t.prototype.isOverlap = function (t) {
  1434. var e = this.getTableRect();
  1435. return t.x + t.width > e.x && e.x + e.width > t.x && t.y + t.height > e.y && e.y + e.height > t.y;
  1436. }, t.prototype.isInRect = function (t) {
  1437. var e = t.rect,
  1438. n = this.getTableRect();
  1439. if (e.x + e.width > n.x && n.x + n.width > e.x && e.y + e.height > n.y && n.y + n.height > e.y) {
  1440. var i = p.a.mergeRect(e, n);
  1441. return JSON.stringify(e) == JSON.stringify(i) || (t.changed = !0, t.rect = i, !0);
  1442. }
  1443. return !1;
  1444. }, t.prototype.isSelected = function () {
  1445. return this.target.hasClass("selected");
  1446. }, t.prototype.select = function () {
  1447. this.target.addClass("selected");
  1448. }, t.prototype.isHeader = function () {
  1449. return !1;
  1450. }, t.prototype.setAlign = function (t) {
  1451. this.align = t, t ? this.target.css("text-align", t) : this.target[0].style.textAlign = "";
  1452. }, t.prototype.setVAlign = function (t) {
  1453. this.vAlign = t, t ? this.target.css("vertical-align", t) : this.target[0].style.verticalAlign = "";
  1454. }, t.prototype.getEntity = function () {
  1455. return new u(this);
  1456. }, t;
  1457. }();
  1458. n.d(e, "a", function () {
  1459. return f;
  1460. });
  1461. var _c,
  1462. h = (_c = function c(t, e) {
  1463. return (_c = Object.setPrototypeOf || _instanceof({
  1464. __proto__: []
  1465. }, Array) && function (t, e) {
  1466. t.__proto__ = e;
  1467. } || function (t, e) {
  1468. for (var n in e) {
  1469. e.hasOwnProperty(n) && (t[n] = e[n]);
  1470. }
  1471. })(t, e);
  1472. }, function (t, e) {
  1473. function n() {
  1474. this.constructor = t;
  1475. }
  1476. _c(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n());
  1477. }),
  1478. f = function (t) {
  1479. function e(e) {
  1480. var n = this;
  1481. return e = e || {}, (n = t.call(this) || this).width = e.width ? parseFloat(e.width.toString()) : 100, n.title = e.title, n.descTitle = e.descTitle, n.field = e.field, n.fixed = e.fixed, n.rowspan = e.rowspan ? parseInt(e.rowspan) : 1, n.colspan = e.colspan ? parseInt(e.colspan) : 1, n.align = e.align, n.halign = e.halign, n.vAlign = e.vAlign, n.formatter = e.formatter, n.styler = e.styler, n.formatter2 = e.formatter2, n.styler2 = e.styler2, n.checkbox = e.checkbox, n.checked = 0 != e.checked, n.columnId = e.columnId || e.field, n;
  1482. }
  1483. return h(e, t), e.prototype.css = function (t) { }, e;
  1484. }(d);
  1485. }, function (t, e, n) {
  1486. "use strict";
  1487. n.d(e, "a", function () {
  1488. return i;
  1489. });
  1490. var i = function () {
  1491. return function (t) {
  1492. this.printLine = t.printLine, this.target = t.target, this.referenceElement = t.referenceElement;
  1493. };
  1494. }();
  1495. }, function (module, __webpack_exports__, __webpack_require__) {
  1496. "use strict";
  1497. __webpack_require__.d(__webpack_exports__, "a", function () {
  1498. return TableExcelHelper;
  1499. });
  1500. var _ReconsitutionTableColumns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19),
  1501. _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0),
  1502. TableExcelHelper = function () {
  1503. function TableExcelHelper() { }
  1504. return TableExcelHelper.createTableHead = function (t, e) {
  1505. for (var n = TableExcelHelper.reconsitutionTableColumnTree(t), i = $("<thead></thead>"), o = TableExcelHelper.getColumnsWidth(n, e), r = function r(t) {
  1506. var e = $("<tr></tr>");
  1507. n[t].forEach(function (t) {
  1508. var n = $("<td></td>");
  1509. t.id && n.attr("id", t.id), t.columnId && n.attr("column-id", t.columnId), (t.align || t.halign) && n.css("text-align", t.halign || t.align), t.vAlign && n.css("vertical-align", t.vAlign), t.colspan > 1 && n.attr("colspan", t.colspan), t.rowspan > 1 && n.attr("rowspan", t.rowspan), n.html(t.title), o[t.id] ? (t.hasWidth = !0, t.targetWidth = o[t.id], n.attr("haswidth", "haswidth"), n.css("width", o[t.id] + "pt")) : t.hasWidth = !1, e.append(n);
  1510. }), i.append(e);
  1511. }, a = 0; a < n.totalLayer; a++) {
  1512. r(a);
  1513. }
  1514. return TableExcelHelper.syncTargetWidthToOption(t), i;
  1515. }, TableExcelHelper.createTableFooter = function (t, e, n, i, o, r) {
  1516. var a = $("<tfoot></tfoot>"),
  1517. p = this.getFooterFormatter(n, i);
  1518. return p && a.append(p(n, e, o, r)), a;
  1519. }, TableExcelHelper.createTableRow = function (t, e, n, i) {
  1520. var o = TableExcelHelper.reconsitutionTableColumnTree(t),
  1521. r = $("<tbody></tbody>");
  1522. (e || (e = []), i.groupFields.length) ? _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_1__.a.groupBy(e, i.groupFields, function (t) {
  1523. var e = {};
  1524. return i.groupFields.forEach(function (n) {
  1525. return e[n] = t[n];
  1526. }), e;
  1527. }).forEach(function (t) {
  1528. if (i.groupFormatter) {
  1529. var e = $("<tr><td colspan=" + o.colspan + "></td></tr>");
  1530. e.find("td").append(i.groupFormatter(t, n)), r.append(e);
  1531. }
  1532. if (t.rows.forEach(function (t) {
  1533. var e = TableExcelHelper.createRowTarget(o, t, n, i);
  1534. r.append(e);
  1535. }), i.groupFooterFormatter) {
  1536. var a = $("<tr><td colspan=" + o.colspan + "></td></tr>");
  1537. a.find("td").append(i.groupFooterFormatter(t, n)), r.append(a);
  1538. }
  1539. }) : e.forEach(function (t) {
  1540. var e = TableExcelHelper.createRowTarget(o, t, n, i);
  1541. r.append(e);
  1542. });
  1543. return r;
  1544. }, TableExcelHelper.createRowTarget = function (t, e, n, i) {
  1545. var o = $("<tr></tr>");
  1546. o.data("rowData", e), t.rowColumns.forEach(function (t, i) {
  1547. var r = $("<td></td>");
  1548. t.field && r.attr("field", t.field), t.align && r.css("text-align", t.align), t.vAlign && r.css("vertical-align", t.vAlign);
  1549. var a = TableExcelHelper.getColumnFormatter(t),
  1550. p = a ? a(e[t.field], e, i, n) : e[t.field];
  1551. r.html(p);
  1552. var s = TableExcelHelper.getColumnStyler(t);
  1553. if (s) {
  1554. var l = s(e[t.field], e, i, n);
  1555. if (l) Object.keys(l).forEach(function (t) {
  1556. r.css(t, l[t]);
  1557. });
  1558. }
  1559. o.append(r);
  1560. });
  1561. var r = TableExcelHelper.getRowStyler(n, i);
  1562. if (r) {
  1563. var a = r(e, n);
  1564. if (a) Object.keys(a).forEach(function (t) {
  1565. o.css(t, a[t]);
  1566. });
  1567. }
  1568. return o;
  1569. }, TableExcelHelper.createEmptyRowTarget = function (t) {
  1570. var e = TableExcelHelper.reconsitutionTableColumnTree(t),
  1571. n = $("<tr></tr>");
  1572. return e.rowColumns.forEach(function (t, e) {
  1573. var i = $("<td></td>");
  1574. t.field && i.attr("field", t.field), t.align && i.css("text-align", t.align), t.vAlign && i.css("vertical-align", t.vAlign), n.append(i);
  1575. }), n;
  1576. }, TableExcelHelper.getColumnsWidth = function (t, e) {
  1577. var n = {},
  1578. i = TableExcelHelper.allAutoWidth(t),
  1579. o = TableExcelHelper.allFixedWidth(t);
  1580. return t.rowColumns.forEach(function (t) {
  1581. if (t.fixed) n[t.id] = t.width; else {
  1582. var r = e - o,
  1583. a = t.width / i * (r > 0 ? r : 0);
  1584. n[t.id] = a;
  1585. }
  1586. }), n;
  1587. }, TableExcelHelper.resizeTableCellWidth = function (t, e, n) {
  1588. var i = TableExcelHelper.reconsitutionTableColumnTree(e),
  1589. o = TableExcelHelper.getColumnsWidth(i, n);
  1590. t.find("thead tr td[haswidth]").map(function (t, e) {
  1591. var n = $(e).attr("id"),
  1592. i = o[n];
  1593. $(e).css("width", i + "pt");
  1594. });
  1595. }, TableExcelHelper.allAutoWidth = function (t) {
  1596. var e = 0;
  1597. return t.rowColumns.forEach(function (t) {
  1598. e += t.fixed ? 0 : t.width;
  1599. }), e;
  1600. }, TableExcelHelper.allFixedWidth = function (t) {
  1601. var e = 0;
  1602. return t.rowColumns.forEach(function (t) {
  1603. e += t.fixed ? t.width : 0;
  1604. }), e;
  1605. }, TableExcelHelper.reconsitutionTableColumnTree = function (t, e, n) {
  1606. var i = e || new _ReconsitutionTableColumns__WEBPACK_IMPORTED_MODULE_0__.a();
  1607. i.colspan = 0;
  1608. for (var o = function o(e) {
  1609. i.totalLayer = e + 1, i[e] = t[e].columns, 0 == e && t[e].columns.forEach(function (t) {
  1610. 0 == e && (i.colspan += t.colspan);
  1611. });
  1612. }, r = 0; r < t.length; r++) {
  1613. o(r);
  1614. }
  1615. return i.rowColumns = TableExcelHelper.getOrderdColumns(i), i;
  1616. }, TableExcelHelper.syncTargetWidthToOption = function (t) {
  1617. t.forEach(function (t) {
  1618. t.columns.forEach(function (t) {
  1619. t.hasWidth && (t.width = t.targetWidth);
  1620. });
  1621. });
  1622. }, TableExcelHelper.getFooterFormatter = function (options, tablePrintElementType) {
  1623. var footerFormatter = void 0;
  1624. if (tablePrintElementType.footerFormatter && (footerFormatter = tablePrintElementType.footerFormatter), options.footerFormatter) try {
  1625. var s = "footerFormatter=" + options.footerFormatter;
  1626. eval(s);
  1627. } catch (t) {
  1628. console.log(t);
  1629. }
  1630. return footerFormatter;
  1631. }, TableExcelHelper.getRowStyler = function (options, tablePrintElementType) {
  1632. var rowStyler = void 0;
  1633. if (tablePrintElementType.rowStyler && (rowStyler = tablePrintElementType.rowStyler), options.rowStyler) try {
  1634. var s = "rowStyler=" + options.rowStyler;
  1635. eval(s);
  1636. } catch (t) {
  1637. console.log(t);
  1638. }
  1639. return rowStyler;
  1640. }, TableExcelHelper.getColumnStyler = function (column) {
  1641. var styler = void 0;
  1642. if (column.styler && (styler = column.styler), column.styler2) try {
  1643. var s = "styler=" + column.styler2;
  1644. eval(s);
  1645. } catch (t) {
  1646. console.log(t);
  1647. }
  1648. return styler;
  1649. }, TableExcelHelper.getColumnFormatter = function (column) {
  1650. var formatter = void 0;
  1651. if (column.formatter && (formatter = column.formatter), column.formatter2) try {
  1652. var s = "formatter=" + column.formatter2;
  1653. eval(s);
  1654. } catch (t) {
  1655. console.log(t);
  1656. }
  1657. return formatter;
  1658. }, TableExcelHelper.getOrderdColumns = function (t) {
  1659. for (var e = {}, n = function n(_n2) {
  1660. t[_n2].forEach(function (t) {
  1661. for (var i = 0; i < t.rowspan; i++) {
  1662. e[_n2 + i] = e[_n2 + i] ? e[_n2 + i] : [], e[_n2 + i].push(t);
  1663. }
  1664. });
  1665. }, i = 0; i < t.totalLayer; i++) {
  1666. n(i);
  1667. }
  1668. return e[t.totalLayer - 1];
  1669. }, TableExcelHelper;
  1670. }();
  1671. }, function (t, e, n) {
  1672. "use strict";
  1673. n.d(e, "a", function () {
  1674. return i;
  1675. });
  1676. var i = function () {
  1677. function t(t) {
  1678. this.top = t.top, this.left = t.left, this.height = t.height, this.width = t.width, this.bottomInLastPaper = t.bottomInLastPaper, this.beginPrintPaperIndex = t.beginPrintPaperIndex, this.printTopInPaper = t.printTopInPaper, this.endPrintPaperIndex = t.endPrintPaperIndex;
  1679. }
  1680. return t.prototype.isPositionLeftOrRight = function (t) {
  1681. return this.top <= t && this.top + this.height > t;
  1682. }, t;
  1683. }();
  1684. }, function (t, e, n) {
  1685. "use strict";
  1686. var i = function () {
  1687. function t() {
  1688. this.name = "lineHeight";
  1689. }
  1690. return t.prototype.css = function (t, e) {
  1691. if (t && t.length) {
  1692. if (e) return t.css("line-height", e + "pt"), "line-height:" + e + "pt";
  1693. t[0].style.lineHeight = "";
  1694. }
  1695. return null;
  1696. }, t.prototype.createTarget = function () {
  1697. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体行高\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n <option value="22.5" >22.5pt</option>\n <option value="23.25" >23.25pt</option>\n <option value="24" >24pt</option>\n <option value="24.75" >24.75pt</option>\n <option value="25.5" >25.5pt</option>\n <option value="26.25" >26.25pt</option>\n <option value="27" >27pt</option>\n <option value="27.75" >27.75pt</option>\n <option value="28.5" >28.5pt</option>\n <option value="29.25" >29.25pt</option>\n <option value="30" >30pt</option>\n <option value="30.75" >30.75pt</option>\n <option value="31.5" >31.5pt</option>\n <option value="32.25" >32.25pt</option>\n <option value="33" >33pt</option>\n <option value="33.75" >33.75pt</option>\n <option value="34.5" >34.5pt</option>\n <option value="35.25" >35.25pt</option>\n <option value="36" >36pt</option>\n </select>\n </div>\n </div>'), this.target;
  1698. }, t.prototype.getValue = function () {
  1699. var t = this.target.find("select").val();
  1700. if (t) return parseFloat(t.toString());
  1701. }, t.prototype.setValue = function (t) {
  1702. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1703. this.target.find("select").val(t);
  1704. }, t.prototype.destroy = function () {
  1705. this.target.remove();
  1706. }, t;
  1707. }(),
  1708. o = function () {
  1709. function t() {
  1710. this.name = "fontFamily";
  1711. }
  1712. return t.prototype.createTarget = function () {
  1713. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="SimSun" >宋体</option>\n <option value="Microsoft YaHei" >微软雅黑</option>\n </select>\n </div>\n </div>'), this.target;
  1714. }, t.prototype.css = function (t, e) {
  1715. if (t && t.length) {
  1716. if (e) return t.css("font-family", e), "font-family:" + e;
  1717. t[0].style.fontFamily = "";
  1718. }
  1719. return null;
  1720. }, t.prototype.getValue = function () {
  1721. var t = this.target.find("select").val();
  1722. if (t) return t.toString();
  1723. }, t.prototype.setValue = function (t) {
  1724. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1725. this.target.find("select").val(t);
  1726. }, t.prototype.destroy = function () {
  1727. this.target.remove();
  1728. }, t;
  1729. }(),
  1730. r = function () {
  1731. function t() {
  1732. this.name = "fontSize";
  1733. }
  1734. return t.prototype.css = function (t, e) {
  1735. if (t && t.length) {
  1736. if (e) return t.css("font-size", e + "pt"), "font-size:" + e + "pt";
  1737. t[0].style.fontSize = "";
  1738. }
  1739. return null;
  1740. }, t.prototype.createTarget = function () {
  1741. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体大小\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  1742. }, t.prototype.getValue = function () {
  1743. var t = this.target.find("select").val();
  1744. if (t) return parseFloat(t.toString());
  1745. }, t.prototype.setValue = function (t) {
  1746. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1747. this.target.find("select").val(t);
  1748. }, t.prototype.destroy = function () {
  1749. this.target.remove();
  1750. }, t;
  1751. }(),
  1752. a = function () {
  1753. function t() {
  1754. this.name = "fontWeight";
  1755. }
  1756. return t.prototype.css = function (t, e) {
  1757. if (t && t.length) {
  1758. if (e) return t.css("font-weight", e), "font-weight:" + e;
  1759. t[0].style.fontWeight = "";
  1760. }
  1761. return null;
  1762. }, t.prototype.createTarget = function () {
  1763. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体粗细\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="lighter" >更细</option>\n <option value="bold" >粗体</option>\n <option value="bolder" >粗体+</option>\n <option value="100" >100</option>\n <option value="200" >200</option>\n <option value="300" >300</option>\n <option value="400" >400</option>\n <option value="500" >500</option>\n <option value="600" >600</option>\n <option value="700" >700</option>\n <option value="800" >800</option>\n <option value="900" >900</option>\n </select>\n </div>\n </div>'), this.target;
  1764. }, t.prototype.getValue = function () {
  1765. var t = this.target.find("select").val();
  1766. if (t) return t.toString();
  1767. }, t.prototype.setValue = function (t) {
  1768. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1769. this.target.find("select").val(t);
  1770. }, t.prototype.destroy = function () {
  1771. this.target.remove();
  1772. }, t;
  1773. }(),
  1774. p = function () {
  1775. function t() {
  1776. this.name = "letterSpacing";
  1777. }
  1778. return t.prototype.css = function (t, e) {
  1779. if (t && t.length) {
  1780. if (e) return t.css("letter-spacing", e + "pt"), "letter-spacing:" + e + "pt";
  1781. t[0].style.letterSpacing = "";
  1782. }
  1783. return null;
  1784. }, t.prototype.createTarget = function () {
  1785. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字间距\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n </select>\n </div>\n </div>'), this.target;
  1786. }, t.prototype.getValue = function () {
  1787. var t = this.target.find("select").val();
  1788. if (t) return parseFloat(t.toString());
  1789. }, t.prototype.setValue = function (t) {
  1790. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1791. this.target.find("select").val(t);
  1792. }, t.prototype.destroy = function () {
  1793. this.target.remove();
  1794. }, t;
  1795. }(),
  1796. s = function () {
  1797. function t() {
  1798. this.name = "textAlign";
  1799. }
  1800. return t.prototype.css = function (t, e) {
  1801. if (t && t.length) {
  1802. if (e) return t.css("text-align", e), "justify" == e ? (t.css("text-align-last", "justify"), t.css("text-justify", "distribute-all-lines")) : (t[0].style.textAlignLast = "", t[0].style.textJustify = ""), "text-align:" + e;
  1803. t[0].style.textAlign = "", t[0].style.textAlignLast = "", t[0].style.textJustify = "";
  1804. }
  1805. return null;
  1806. }, t.prototype.createTarget = function () {
  1807. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 左右对齐\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="" >居左</option>\n <option value="center" >居中</option>\n <option value="right" >居右</option>\n <option value="justify" >两端对齐</option>\n </select>\n </div>\n </div>'), this.target;
  1808. }, t.prototype.getValue = function () {
  1809. var t = this.target.find("select").val();
  1810. if (t) return t.toString();
  1811. }, t.prototype.setValue = function (t) {
  1812. this.target.find("select").val(t);
  1813. }, t.prototype.destroy = function () {
  1814. this.target.remove();
  1815. }, t;
  1816. }(),
  1817. l = function () {
  1818. function t() {
  1819. this.name = "hideTitle";
  1820. }
  1821. return t.prototype.createTarget = function () {
  1822. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 标题显示隐藏\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="false" >显示</option>\n <option value="true" >隐藏</option>\n </select>\n </div>\n </div>'), this.target;
  1823. }, t.prototype.getValue = function () {
  1824. if ("true" == this.target.find("select").val()) return !0;
  1825. }, t.prototype.setValue = function (t) {
  1826. this.target.find("select").val((null == t ? "" : t).toString());
  1827. }, t.prototype.destroy = function () {
  1828. this.target.remove();
  1829. }, t;
  1830. }(),
  1831. u = function () {
  1832. function t() {
  1833. this.name = "tableBorder";
  1834. }
  1835. return t.prototype.css = function (t, e) {
  1836. if (t.find("table").length) {
  1837. if ("border" == e) return t.find("table").css("border", "1px solid"), "border:1px solid";
  1838. "noBorder" == e ? t.find("table").css("border", "0px solid") : t.find("table")[0].style.border = "";
  1839. }
  1840. return null;
  1841. }, t.prototype.createTarget = function () {
  1842. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表格边框\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="border" >有边框</option>\n <option value="noBorder" >无边框</option>\n </select>\n </div>\n </div>'), this.target;
  1843. }, t.prototype.getValue = function () {
  1844. var t = this.target.find("select").val();
  1845. if (t) return t.toString();
  1846. }, t.prototype.setValue = function (t) {
  1847. this.target.find("select").val(t);
  1848. }, t.prototype.destroy = function () {
  1849. this.target.remove();
  1850. }, t;
  1851. }(),
  1852. d = function () {
  1853. function t() {
  1854. this.name = "tableHeaderBorder";
  1855. }
  1856. return t.prototype.css = function (t, e) {
  1857. if (t.find("thead tr").length) {
  1858. if ("border" == e) return t.find("thead tr").css("border", "1px solid"), "border:1pt solid";
  1859. "noBorder" == e ? t.find("thead tr").css("border", "0px solid") : "topBorder" == e ? (t.find("thead tr").css("border", "0px solid"), t.find("thead tr").css("border-top", "1px solid")) : "bottomBorder" == e ? (t.find("thead tr").css("border", "0px solid"), t.find("thead tr").css("border-bottom", "1px solid")) : "topBottomBorder" == e ? (t.find("thead tr").css("border", "0px solid"), t.find("thead tr").css("border-top", "1px solid"), t.find("thead tr").css("border-bottom", "1px solid")) : t.find("thead tr").map(function (t, e) {
  1860. e.style.border = "";
  1861. });
  1862. }
  1863. return null;
  1864. }, t.prototype.createTarget = function () {
  1865. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表头边框\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option> \n <option value="border" >有边框</option>\n <option value="noBorder" >无边框</option>\n <option value="topBorder" >上边框</option>\n <option value="bottomBorder" >下边框</option>\n <option value="topBottomBorder" >上下边框</option>\n </select>\n </div>\n </div>'), this.target;
  1866. }, t.prototype.getValue = function () {
  1867. var t = this.target.find("select").val();
  1868. if (t) return t.toString();
  1869. }, t.prototype.setValue = function (t) {
  1870. this.target.find("select").val(t);
  1871. }, t.prototype.destroy = function () {
  1872. this.target.remove();
  1873. }, t;
  1874. }(),
  1875. c = function () {
  1876. function t() {
  1877. this.name = "tableHeaderCellBorder";
  1878. }
  1879. return t.prototype.css = function (t, e) {
  1880. if (t.find("thead tr td").length) {
  1881. if ("border" == e) return t.find("thead tr td").css("border", "1px solid"), "border:1px solid";
  1882. "noBorder" == e ? t.find("thead tr td").css("border", "0px solid") : t.find("thead tr td").map(function (t, e) {
  1883. e.style.border = "";
  1884. });
  1885. }
  1886. return null;
  1887. }, t.prototype.createTarget = function () {
  1888. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表头单元格边框\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option> \n <option value="border" >有边框</option>\n <option value="noBorder" >无边框</option>\n \n </select>\n </div>\n </div>'), this.target;
  1889. }, t.prototype.getValue = function () {
  1890. var t = this.target.find("select").val();
  1891. if (t) return t.toString();
  1892. }, t.prototype.setValue = function (t) {
  1893. this.target.find("select").val(t);
  1894. }, t.prototype.destroy = function () {
  1895. this.target.remove();
  1896. }, t;
  1897. }(),
  1898. h = function () {
  1899. function t() {
  1900. this.name = "tableHeaderRowHeight";
  1901. }
  1902. return t.prototype.css = function (t, e) {
  1903. if (t.find("thead tr td").length) {
  1904. if (e) return t.find("thead tr td:not([rowspan])").css("height", e + "pt"), "height:" + e + "pt";
  1905. t.find("thead tr td").map(function (t, e) {
  1906. e.style.height = "";
  1907. });
  1908. }
  1909. return null;
  1910. }, t.prototype.createTarget = function () {
  1911. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表头行高\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n \n <option value="" >默认</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n <option value="22.5" >22.5pt</option>\n <option value="23.25" >23.25pt</option>\n <option value="24" >24pt</option>\n <option value="24.75" >24.75pt</option>\n <option value="25.5" >25.5pt</option>\n <option value="26.25" >26.25pt</option>\n <option value="27" >27pt</option>\n <option value="27.75" >27.75pt</option>\n <option value="28.5" >28.5pt</option>\n <option value="29.25" >29.25pt</option>\n <option value="30" >30pt</option>\n <option value="30.75" >30.75pt</option>\n <option value="31.5" >31.5pt</option>\n <option value="32.25" >32.25pt</option>\n <option value="33" >33pt</option>\n <option value="33.75" >33.75pt</option>\n <option value="34.5" >34.5pt</option>\n <option value="35.25" >35.25pt</option>\n <option value="36" >36pt</option>\n </select>\n </div>\n </div>'), this.target;
  1912. }, t.prototype.getValue = function () {
  1913. var t = this.target.find("select").val();
  1914. if (t) return parseFloat(t.toString());
  1915. }, t.prototype.setValue = function (t) {
  1916. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1917. this.target.find("select").val(t);
  1918. }, t.prototype.destroy = function () {
  1919. this.target.remove();
  1920. }, t;
  1921. }(),
  1922. f = function () {
  1923. function t() {
  1924. this.name = "tableHeaderFontSize";
  1925. }
  1926. return t.prototype.css = function (t, e) {
  1927. if (t.find("thead").length) {
  1928. if (e) return t.find("thead").css("font-size", e + "pt"), "font-size:" + e + "pt";
  1929. t.find("thead").map(function (t, e) {
  1930. e.style.fontSize = "";
  1931. });
  1932. }
  1933. return null;
  1934. }, t.prototype.createTarget = function () {
  1935. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表头字体大小\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  1936. }, t.prototype.getValue = function () {
  1937. var t = this.target.find("select").val();
  1938. if (t) return parseFloat(t.toString());
  1939. }, t.prototype.setValue = function (t) {
  1940. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1941. this.target.find("select").val(t);
  1942. }, t.prototype.destroy = function () {
  1943. this.target.remove();
  1944. }, t;
  1945. }(),
  1946. g = function () {
  1947. function t() {
  1948. this.name = "tableHeaderFontWeight";
  1949. }
  1950. return t.prototype.css = function (t, e) {
  1951. if (t.find("thead").length) {
  1952. if (e) return t.find("thead tr td").css("font-weight", e), "font-weight:" + e;
  1953. t.find("thead tr td").map(function (t, e) {
  1954. e.style.fontWeight = "";
  1955. });
  1956. }
  1957. return null;
  1958. }, t.prototype.createTarget = function () {
  1959. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表头字体粗细\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit"> \n <option value="" >默认</option>\n <option value="lighter" >更细</option>\n <option value="bold" >粗体</option>\n <option value="bolder" >粗体+</option>\n <option value="100" >100</option>\n <option value="200" >200</option>\n <option value="300" >300</option>\n <option value="400" >400</option>\n <option value="500" >500</option>\n <option value="600" >600</option>\n <option value="700" >700</option>\n <option value="800" >800</option>\n <option value="900" >900</option>\n </select>\n </div>\n </div>'), this.target;
  1960. }, t.prototype.getValue = function () {
  1961. var t = this.target.find("select").val();
  1962. if (t) return t;
  1963. }, t.prototype.setValue = function (t) {
  1964. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1965. this.target.find("select").val(t);
  1966. }, t.prototype.destroy = function () {
  1967. this.target.remove();
  1968. }, t;
  1969. }(),
  1970. m = function () {
  1971. function t() {
  1972. this.name = "tableBodyCellBorder";
  1973. }
  1974. return t.prototype.css = function (t, e) {
  1975. if (t.find("tbody tr td").length) {
  1976. if ("border" == e) return t.find("tbody tr td").css("border", "1px solid"), "border:1px solid";
  1977. "noBorder" == e ? t.find("tbody tr td").css("border", "0px solid") : t.find("tbody tr td").map(function (t, e) {
  1978. e.style.border = "";
  1979. });
  1980. }
  1981. return null;
  1982. }, t.prototype.createTarget = function () {
  1983. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表体单元格\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="border" >有边框</option>\n <option value="noBorder" >无边框</option>\n </select>\n </div>\n </div>'), this.target;
  1984. }, t.prototype.getValue = function () {
  1985. var t = this.target.find("select").val();
  1986. if (t) return t.toString();
  1987. }, t.prototype.setValue = function (t) {
  1988. this.target.find("select").val(t);
  1989. }, t.prototype.destroy = function () {
  1990. this.target.remove();
  1991. }, t;
  1992. }(),
  1993. v = function () {
  1994. function t() {
  1995. this.name = "tableBodyRowHeight";
  1996. }
  1997. return t.prototype.css = function (t, e) {
  1998. if (t.find("tbody tr td").length) {
  1999. if (e) return t.find("tbody tr td:not([rowspan])").css("height", e + "pt"), "height:" + e + "pt";
  2000. t.find("tbody tr td").map(function (t, e) {
  2001. e.style.height = "";
  2002. });
  2003. }
  2004. return null;
  2005. }, t.prototype.createTarget = function () {
  2006. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表体行高\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n <option value="22.5" >22.5pt</option>\n <option value="23.25" >23.25pt</option>\n <option value="24" >24pt</option>\n <option value="24.75" >24.75pt</option>\n <option value="25.5" >25.5pt</option>\n <option value="26.25" >26.25pt</option>\n <option value="27" >27pt</option>\n <option value="27.75" >27.75pt</option>\n <option value="28.5" >28.5pt</option>\n <option value="29.25" >29.25pt</option>\n <option value="30" >30pt</option>\n <option value="30.75" >30.75pt</option>\n <option value="31.5" >31.5pt</option>\n <option value="32.25" >32.25pt</option>\n <option value="33" >33pt</option>\n <option value="33.75" >33.75pt</option>\n <option value="34.5" >34.5pt</option>\n <option value="35.25" >35.25pt</option>\n <option value="36" >36pt</option>\n </select>\n </div>\n </div>'), this.target;
  2007. }, t.prototype.getValue = function () {
  2008. var t = this.target.find("select").val();
  2009. if (t) return parseFloat(t.toString());
  2010. }, t.prototype.setValue = function (t) {
  2011. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2012. this.target.find("select").val(t);
  2013. }, t.prototype.destroy = function () {
  2014. this.target.remove();
  2015. }, t;
  2016. }(),
  2017. y = function () {
  2018. function t() {
  2019. this.name = "tableHeaderBackground";
  2020. }
  2021. return t.prototype.css = function (t, e) {
  2022. if (t.find("thead").length) {
  2023. if (e) return t.find("thead").css("background", e), "background:" + e;
  2024. t.find("thead").map(function (t, e) {
  2025. e.style.background = "";
  2026. });
  2027. }
  2028. return null;
  2029. }, t.prototype.createTarget = function () {
  2030. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表头背景\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" class="auto-submit" />\n </div>\n </div>'), this.target;
  2031. }, t.prototype.getValue = function () {
  2032. var t = this.target.find("input").val();
  2033. if (t) return t.toString();
  2034. }, t.prototype.setValue = function (t) {
  2035. this.target.find("input").minicolors({
  2036. defaultValue: t || "",
  2037. theme: "bootstrap"
  2038. }), this.target.find("input").val(t);
  2039. }, t.prototype.destroy = function () {
  2040. this.target.remove();
  2041. }, t;
  2042. }(),
  2043. b = function () {
  2044. function t() {
  2045. this.name = "borderWidth";
  2046. }
  2047. return t.prototype.createTarget = function () {
  2048. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 边框大小\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2049. }, t.prototype.css = function (t, e) {
  2050. if (t && t.length) {
  2051. if (e) return t.css("border-width", e + "pt"), "border-width:" + e + "pt";
  2052. t[0].style.borderWidth = "";
  2053. }
  2054. return null;
  2055. }, t.prototype.getValue = function () {
  2056. var t = this.target.find("select").val();
  2057. if (t) return t.toString();
  2058. }, t.prototype.setValue = function (t) {
  2059. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2060. this.target.find("select").val(t);
  2061. }, t.prototype.destroy = function () {
  2062. this.target.remove();
  2063. }, t;
  2064. }(),
  2065. E = function () {
  2066. function t() {
  2067. this.name = "barcodeMode";
  2068. }
  2069. return t.prototype.createTarget = function () {
  2070. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 条形码格式\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="CODE128A" >CODE128A</option>\n <option value="CODE128B" >CODE128B</option>\n <option value="CODE128C" >CODE128C</option>\n <option value="CODE39" >CODE39</option>\n <option value="EAN-13" >EAN-13</option>\n <option value="EAN-8" >EAN-8</option>\n <option value="EAN-5" >EAN-5</option>\n <option value="EAN-2" >EAN-2</option>\n <option value="UPC(A)" >UPC(A)</option>\n <option value="ITF" >ITF</option>\n <option value="ITF-14" >ITF-14</option>\n <option value="MSI" >MSI</option>\n <option value="MSI10" >MSI10</option>\n <option value="MSI11" >MSI11</option>\n <option value="MSI1010" >MSI1010</option>\n <option value="MSI1110" >MSI1110</option>\n <option value="Pharmacode" >Pharmacode</option>\n </select>\n </div>\n </div>'), this.target;
  2071. }, t.prototype.getValue = function () {
  2072. var t = this.target.find("select").val();
  2073. return t || void 0;
  2074. }, t.prototype.setValue = function (t) {
  2075. this.target.find("select").val(t);
  2076. }, t.prototype.destroy = function () {
  2077. this.target.remove();
  2078. }, t;
  2079. }(),
  2080. T = function () {
  2081. function t() {
  2082. this.name = "color";
  2083. }
  2084. return t.prototype.css = function (t, e) {
  2085. if (t && t.length) {
  2086. if (e) return t.css("color", e), "color:" + e;
  2087. t[0].style.color = "";
  2088. }
  2089. return null;
  2090. }, t.prototype.createTarget = function () {
  2091. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体颜色\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" class="auto-submit"/>\n </div>\n </div>'), this.target;
  2092. }, t.prototype.getValue = function () {
  2093. var t = this.target.find("input").val();
  2094. if (t) return t.toString();
  2095. }, t.prototype.setValue = function (t) {
  2096. this.target.find("input").minicolors({
  2097. defaultValue: t || "",
  2098. theme: "bootstrap"
  2099. }), this.target.find("input").val(t);
  2100. }, t.prototype.destroy = function () {
  2101. this.target.remove();
  2102. }, t;
  2103. }(),
  2104. P = function () {
  2105. function t() {
  2106. this.name = "textDecoration";
  2107. }
  2108. return t.prototype.createTarget = function () {
  2109. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 文本修饰\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="underline" >下划线。</option>\n <option value="overline" >上划线</option>\n <option value="line-through" >穿梭线</option>\n \n </select>\n </div>\n </div>'), this.target;
  2110. }, t.prototype.css = function (t, e) {
  2111. if (t && t.length) {
  2112. if (e) return t.css("text-decoration", e), "text-decoration:" + e;
  2113. t[0].style.textDecoration = "";
  2114. }
  2115. return null;
  2116. }, t.prototype.getValue = function () {
  2117. var t = this.target.find("select").val();
  2118. if (t) return t.toString();
  2119. }, t.prototype.setValue = function (t) {
  2120. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2121. this.target.find("select").val(t);
  2122. }, t.prototype.destroy = function () {
  2123. this.target.remove();
  2124. }, t;
  2125. }(),
  2126. _ = function () {
  2127. function t() {
  2128. this.name = "field";
  2129. }
  2130. return t.prototype.createTarget = function (t) {
  2131. var e = void 0;
  2132. if (t && (e = t.getFields()), e) {
  2133. this.isSelect = !0;
  2134. var n = ' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 字段名\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >请选择字段</option>';
  2135. e.forEach(function (t, e) {
  2136. n += ' <option value="' + (t.field || "") + '" >' + (t.text || "") + "</option>";
  2137. }), n += " </select>\n </div>\n </div>", this.target = $(n);
  2138. } else {
  2139. this.isSelect = !1;
  2140. this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 字段名\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="请输入字段名" class="auto-submit">\n </div>\n </div>');
  2141. }
  2142. return this.target;
  2143. }, t.prototype.getValue = function () {
  2144. return (this.isSelect ? this.target.find("select").val() : this.target.find("input").val()) || void 0;
  2145. }, t.prototype.setValue = function (t) {
  2146. this.isSelect ? t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"), this.target.find("select").val(t)) : this.target.find("input").val(t);
  2147. }, t.prototype.destroy = function () {
  2148. this.target.remove();
  2149. }, t;
  2150. }(),
  2151. w = function () {
  2152. function t() {
  2153. this.name = "title";
  2154. }
  2155. return t.prototype.createTarget = function () {
  2156. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 标题\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:50px;" placeholder="请输入标题" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  2157. }, t.prototype.getValue = function () {
  2158. var t = this.target.find("textarea").val();
  2159. if (t) return t;
  2160. }, t.prototype.setValue = function (t) {
  2161. this.target.find("textarea").val(t);
  2162. }, t.prototype.destroy = function () {
  2163. this.target.remove();
  2164. }, t;
  2165. }(),
  2166. x = function () {
  2167. function t() {
  2168. this.name = "testData";
  2169. }
  2170. return t.prototype.createTarget = function () {
  2171. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 测试数据\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="仅字段名称存在时有效" class="auto-submit" >\n </div>\n </div>'), this.target;
  2172. }, t.prototype.getValue = function () {
  2173. var t = this.target.find("input").val();
  2174. if (t) return t.toString();
  2175. }, t.prototype.setValue = function (t) {
  2176. this.target.find("input").val(t);
  2177. }, t.prototype.destroy = function () {
  2178. this.target.remove();
  2179. }, t;
  2180. }(),
  2181. C = function () {
  2182. function t() {
  2183. this.name = "src";
  2184. }
  2185. return t.prototype.createTarget = function () {
  2186. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 图片地址\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="请输入图片地址" class="auto-submit">\n </div>\n </div>'), this.target;
  2187. }, t.prototype.getValue = function () {
  2188. var t = this.target.find("input").val();
  2189. if (t) return t.toString();
  2190. }, t.prototype.setValue = function (t) {
  2191. this.target.find("input").val(t);
  2192. }, t.prototype.destroy = function () {
  2193. this.target.remove();
  2194. }, t;
  2195. }(),
  2196. O = function () {
  2197. function t() {
  2198. this.name = "borderColor";
  2199. }
  2200. return t.prototype.css = function (t, e) {
  2201. if (t && t.length) {
  2202. if (e) return t.css("border-color", e), "border-color:" + e;
  2203. t[0].style.borderColor = "";
  2204. }
  2205. return null;
  2206. }, t.prototype.createTarget = function () {
  2207. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 边框颜色\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" class="auto-submit" />\n </div>\n </div>'), this.target;
  2208. }, t.prototype.getValue = function () {
  2209. var t = this.target.find("input").val();
  2210. if (t) return t.toString();
  2211. }, t.prototype.setValue = function (t) {
  2212. this.target.find("input").minicolors({
  2213. defaultValue: t || "",
  2214. theme: "bootstrap"
  2215. }), this.target.find("input").val(t);
  2216. }, t.prototype.destroy = function () {
  2217. this.target.remove();
  2218. }, t;
  2219. }(),
  2220. H = function () {
  2221. function t() {
  2222. this.name = "paperNumberFormat";
  2223. }
  2224. return t.prototype.createTarget = function () {
  2225. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 页码格式\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="paperNo-paperCount" class="auto-submit">\n </div>\n </div>'), this.target;
  2226. }, t.prototype.getValue = function () {
  2227. var t = this.target.find("input").val();
  2228. if (t) return t.toString();
  2229. }, t.prototype.setValue = function (t) {
  2230. this.target.find("input").val(t);
  2231. }, t.prototype.destroy = function () {
  2232. this.target.remove();
  2233. }, t;
  2234. }(),
  2235. D = function () {
  2236. function t() {
  2237. this.name = "paperNumberDisabled";
  2238. }
  2239. return t.prototype.createTarget = function () {
  2240. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 启用/禁用\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="false" >启用</option>\n <option value="true" >禁用</option>\n </select>\n </div>\n </div>'), this.target;
  2241. }, t.prototype.getValue = function () {
  2242. if ("true" == this.target.find("select").val()) return !0;
  2243. }, t.prototype.setValue = function (t) {
  2244. this.target.find("select").val(t);
  2245. }, t.prototype.destroy = function () {
  2246. this.target.remove();
  2247. }, t;
  2248. }(),
  2249. I = function () {
  2250. function t() {
  2251. this.name = "longTextIndent";
  2252. }
  2253. return t.prototype.css = function (t, e) {
  2254. return null;
  2255. }, t.prototype.createTarget = function () {
  2256. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 每行缩进\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n <option value="22.5" >22.5pt</option>\n <option value="23.25" >23.25pt</option>\n <option value="24" >24pt</option>\n <option value="24.75" >24.75pt</option>\n <option value="25.5" >25.5pt</option>\n <option value="26.25" >26.25pt</option>\n <option value="27" >27pt</option>\n <option value="27.75" >27.75pt</option>\n <option value="28.5" >28.5pt</option>\n <option value="29.25" >29.25pt</option>\n <option value="30" >30pt</option>\n <option value="30.75" >30.75pt</option>\n <option value="31.5" >31.5pt</option>\n <option value="32.25" >32.25pt</option>\n <option value="33" >33pt</option>\n <option value="33.75" >33.75pt</option>\n <option value="34.5" >34.5pt</option>\n <option value="35.25" >35.25pt</option>\n <option value="36" >36pt</option>\n </select>\n </div>\n </div>'), this.target;
  2257. }, t.prototype.getValue = function () {
  2258. var t = this.target.find("select").val();
  2259. if (t) return parseFloat(t.toString());
  2260. }, t.prototype.setValue = function (t) {
  2261. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2262. this.target.find("select").val(t);
  2263. }, t.prototype.destroy = function () {
  2264. this.target.remove();
  2265. }, t;
  2266. }(),
  2267. R = function () {
  2268. function t() {
  2269. this.name = "showInPage";
  2270. }
  2271. return t.prototype.createTarget = function () {
  2272. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 显示规则\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="first" >首页</option>\n <option value="odd" >奇数页</option>\n <option value="even" >偶数页</option>\n <option value="last" >尾页</option>\n </select>\n </div>\n </div>'), this.target;
  2273. }, t.prototype.getValue = function () {
  2274. var t = this.target.find("select").val();
  2275. if (t) return t.toString();
  2276. }, t.prototype.setValue = function (t) {
  2277. this.target.find("select").val(t);
  2278. }, t.prototype.destroy = function () {
  2279. this.target.remove();
  2280. }, t;
  2281. }(),
  2282. M = function () {
  2283. function t() {
  2284. this.name = "panelPaperRule";
  2285. }
  2286. return t.prototype.createTarget = function () {
  2287. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 打印规则\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="odd" >保持奇数</option>\n <option value="even" >保持偶数</option>\n </select>\n </div>\n </div>'), this.target;
  2288. }, t.prototype.getValue = function () {
  2289. var t = this.target.find("select").val();
  2290. if (t) return t.toString();
  2291. }, t.prototype.setValue = function (t) {
  2292. this.target.find("select").val(t);
  2293. }, t.prototype.destroy = function () {
  2294. this.target.remove();
  2295. }, t;
  2296. }(),
  2297. S = function () {
  2298. function t() {
  2299. this.name = "leftSpaceRemoved";
  2300. }
  2301. return t.prototype.createTarget = function () {
  2302. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 移除段落左侧空白\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="true" >移除</option>\n <option value="false" >不移除</option>\n </select>\n </div>\n </div>'), this.target;
  2303. }, t.prototype.getValue = function () {
  2304. if ("false" == this.target.find("select").val()) return !1;
  2305. }, t.prototype.setValue = function (t) {
  2306. this.target.find("select").val((null == t ? "" : t).toString());
  2307. }, t.prototype.destroy = function () {
  2308. this.target.remove();
  2309. }, t;
  2310. }(),
  2311. B = function () {
  2312. function t() {
  2313. this.name = "firstPaperFooter";
  2314. }
  2315. return t.prototype.createTarget = function () {
  2316. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 首页页尾\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="首页页尾" class="auto-submit">\n </div>\n </div>'), this.target;
  2317. }, t.prototype.getValue = function () {
  2318. var t = this.target.find("input").val();
  2319. if (t) return parseFloat(t.toString());
  2320. }, t.prototype.setValue = function (t) {
  2321. this.target.find("input").val(t);
  2322. }, t.prototype.destroy = function () {
  2323. this.target.remove();
  2324. }, t;
  2325. }(),
  2326. F = function () {
  2327. function t() {
  2328. this.name = "lastPaperFooter";
  2329. }
  2330. return t.prototype.createTarget = function () {
  2331. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 尾页页尾\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="尾页页尾" class="auto-submit">\n </div>\n </div>'), this.target;
  2332. }, t.prototype.getValue = function () {
  2333. var t = this.target.find("input").val();
  2334. if (t) return parseFloat(t.toString());
  2335. }, t.prototype.setValue = function (t) {
  2336. this.target.find("input").val(t);
  2337. }, t.prototype.destroy = function () {
  2338. this.target.remove();
  2339. }, t;
  2340. }(),
  2341. L = function () {
  2342. function t() {
  2343. this.name = "evenPaperFooter";
  2344. }
  2345. return t.prototype.createTarget = function () {
  2346. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 偶数页页尾\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="偶数页页尾" class="auto-submit">\n </div>\n </div>'), this.target;
  2347. }, t.prototype.getValue = function () {
  2348. var t = this.target.find("input").val();
  2349. if (t) return parseFloat(t.toString());
  2350. }, t.prototype.setValue = function (t) {
  2351. this.target.find("input").val(t);
  2352. }, t.prototype.destroy = function () {
  2353. this.target.remove();
  2354. }, t;
  2355. }(),
  2356. A = function () {
  2357. function t() {
  2358. this.name = "oddPaperFooter";
  2359. }
  2360. return t.prototype.createTarget = function () {
  2361. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 奇数页页尾\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="奇数页页尾" class="auto-submit" >\n </div>\n </div>'), this.target;
  2362. }, t.prototype.getValue = function () {
  2363. var t = this.target.find("input").val();
  2364. if (t) return parseFloat(t.toString());
  2365. }, t.prototype.setValue = function (t) {
  2366. this.target.find("input").val(t);
  2367. }, t.prototype.destroy = function () {
  2368. this.target.remove();
  2369. }, t;
  2370. }(),
  2371. z = function () {
  2372. function t() {
  2373. this.name = "fixed";
  2374. }
  2375. return t.prototype.createTarget = function () {
  2376. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 位置固定\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="false" >否</option>\n <option value="true" >是</option>\n </select>\n </div>\n </div>'), this.target;
  2377. }, t.prototype.getValue = function () {
  2378. if ("true" == this.target.find("select").val()) return !0;
  2379. }, t.prototype.setValue = function (t) {
  2380. this.target.find("select").val((null == t ? "" : t).toString());
  2381. }, t.prototype.destroy = function () {
  2382. this.target.remove();
  2383. }, t;
  2384. }(),
  2385. k = function () {
  2386. function t() {
  2387. this.name = "axis";
  2388. }
  2389. return t.prototype.createTarget = function () {
  2390. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 拖动方向\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="v" >横向</option>\n <option value="h" >竖向</option>\n </select>\n </div>\n </div>'), this.target;
  2391. }, t.prototype.getValue = function () {
  2392. var t = this.target.find("select").val();
  2393. return t || void 0;
  2394. }, t.prototype.setValue = function (t) {
  2395. this.target.find("select").val(t);
  2396. }, t.prototype.destroy = function () {
  2397. this.target.remove();
  2398. }, t;
  2399. }(),
  2400. N = function () {
  2401. function t() {
  2402. this.name = "leftOffset";
  2403. }
  2404. return t.prototype.createTarget = function () {
  2405. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 左偏移\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="偏移量pt" class="auto-submit" >\n </div>\n </div>'), this.target;
  2406. }, t.prototype.getValue = function () {
  2407. var t = this.target.find("input").val();
  2408. if (t) return parseFloat(t.toString());
  2409. }, t.prototype.setValue = function (t) {
  2410. this.target.find("input").val(t);
  2411. }, t.prototype.destroy = function () {
  2412. this.target.remove();
  2413. }, t;
  2414. }(),
  2415. V = function () {
  2416. function t() {
  2417. this.name = "lHeight";
  2418. }
  2419. return t.prototype.createTarget = function () {
  2420. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 最低高度\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="文本过短或为空时的高度" class="auto-submit">\n </div>\n </div>'), this.target;
  2421. }, t.prototype.getValue = function () {
  2422. var t = this.target.find("input").val();
  2423. if (t) return parseFloat(t.toString());
  2424. }, t.prototype.setValue = function (t) {
  2425. this.target.find("input").val(t);
  2426. }, t.prototype.destroy = function () {
  2427. this.target.remove();
  2428. }, t;
  2429. }(),
  2430. W = function () {
  2431. function t() {
  2432. this.name = "unShowInPage";
  2433. }
  2434. return t.prototype.createTarget = function () {
  2435. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 隐藏规则\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="first" >首页</option>\n <option value="last" >尾页</option>\n </select>\n </div>\n </div>'), this.target;
  2436. }, t.prototype.getValue = function () {
  2437. var t = this.target.find("select").val();
  2438. if (t) return t;
  2439. }, t.prototype.setValue = function (t) {
  2440. this.target.find("select").val(t);
  2441. }, t.prototype.destroy = function () {
  2442. this.target.remove();
  2443. }, t;
  2444. }(),
  2445. j = function () {
  2446. function t() {
  2447. this.name = "tableBodyRowBorder";
  2448. }
  2449. return t.prototype.css = function (t, e) {
  2450. if (t.find("tbody tr").length) {
  2451. if ("border" == e) return t.find("tbody tr").css("border", "1px solid"), "border:1pt solid";
  2452. "noBorder" == e ? t.find("tbody tr").css("border", "0px solid") : "topBorder" == e ? (t.find("tbody tr").css("border", "0px solid"), t.find("tbody tr").css("border-top", "1px solid")) : "bottomBorder" == e ? (t.find("tbody tr").css("border", "0px solid"), t.find("tbody tr").css("border-bottom", "1px solid")) : "topBottomBorder" == e ? (t.find("tbody tr").css("border", "0px solid"), t.find("tbody tr").css("border-top", "1px solid"), t.find("tbody tr").css("border-bottom", "1px solid")) : t.find("tbody tr").map(function (t, e) {
  2453. e.style.border = "";
  2454. });
  2455. }
  2456. return null;
  2457. }, t.prototype.createTarget = function () {
  2458. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表体行边框\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option> \n <option value="border" >有边框</option>\n <option value="noBorder" >无边框</option>\n <option value="topBorder" >上边框</option>\n <option value="bottomBorder" >下边框</option>\n <option value="topBottomBorder" >上下边框</option>\n </select>\n </div>\n </div>'), this.target;
  2459. }, t.prototype.getValue = function () {
  2460. var t = this.target.find("select").val();
  2461. if (t) return t.toString();
  2462. }, t.prototype.setValue = function (t) {
  2463. this.target.find("select").val(t);
  2464. }, t.prototype.destroy = function () {
  2465. this.target.remove();
  2466. }, t;
  2467. }(),
  2468. U = function () {
  2469. function t() {
  2470. this.name = "transform";
  2471. }
  2472. return t.prototype.css = function (t, e) {
  2473. if (t && t.length) {
  2474. var n = t.find(".hiprint-printElement-content");
  2475. if (e) return n.css("transform", "rotate(" + e + "deg)"), n.css("-ms-transform", "rotate(" + e + "deg)"), n.css("-moz-transform", "rotate(" + e + "deg)"), n.css("-webkit-transform", "rotate(" + e + "deg)"), n.css("-o-transform", "rotate(" + e + "deg)"), "transform:rotate(" + e + "deg)";
  2476. n.length && (n[0].style.transform = "");
  2477. }
  2478. return null;
  2479. }, t.prototype.createTarget = function () {
  2480. return this.target = $('<div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 旋转角度\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" class="auto-submit"/>\n </div>\n </div>'), this.target;
  2481. }, t.prototype.getValue = function () {
  2482. var t = this.target.find("input").val();
  2483. if (t) return parseFloat(t.toString());
  2484. }, t.prototype.setValue = function (t) {
  2485. this.target.find("input").val(t);
  2486. }, t.prototype.destroy = function () {
  2487. this.target.remove();
  2488. }, t;
  2489. }(),
  2490. K = function () {
  2491. function t() {
  2492. this.name = "optionsGroup";
  2493. }
  2494. return t.prototype.createTarget = function () {
  2495. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 边框设置\n </div>\n \n </div>'), this.target;
  2496. }, t.prototype.getValue = function () { }, t.prototype.setValue = function (t) { }, t.prototype.destroy = function () {
  2497. this.target.remove();
  2498. }, t;
  2499. }(),
  2500. G = function () {
  2501. function t() {
  2502. this.name = "borderTop";
  2503. }
  2504. return t.prototype.css = function (t, e) {
  2505. if (t && t.length) {
  2506. if (e) return t.css("border-top-style", e), "border-top:1px";
  2507. t[0].style.borderTopStyle = "", t[0].style.borderTopWidth = "";
  2508. }
  2509. return null;
  2510. }, t.prototype.createTarget = function () {
  2511. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 上边框\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >否</option>\n <option value="solid" >实线</option>\n <option value="dotted" >虚线</option>\n </select>\n </div>\n </div>'), this.target;
  2512. }, t.prototype.getValue = function () {
  2513. var t = this.target.find("select").val();
  2514. if (t) return t;
  2515. }, t.prototype.setValue = function (t) {
  2516. this.target.find("select").val(t);
  2517. }, t.prototype.destroy = function () {
  2518. this.target.remove();
  2519. }, t;
  2520. }(),
  2521. q = function () {
  2522. function t() {
  2523. this.name = "borderLeft";
  2524. }
  2525. return t.prototype.css = function (t, e) {
  2526. if (t && t.length) {
  2527. if (e) return t.css("border-left-style", e), "border-left:1px";
  2528. t[0].style.borderLeftStyle = "", t[0].style.borderLeftWidth = "";
  2529. }
  2530. return null;
  2531. }, t.prototype.createTarget = function () {
  2532. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 左边框\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >否</option>\n <option value="solid" >实线</option>\n <option value="dotted" >虚线</option>\n </select>\n </div>\n </div>'), this.target;
  2533. }, t.prototype.getValue = function () {
  2534. var t = this.target.find("select").val();
  2535. if (t) return t;
  2536. }, t.prototype.setValue = function (t) {
  2537. this.target.find("select").val(t);
  2538. }, t.prototype.destroy = function () {
  2539. this.target.remove();
  2540. }, t;
  2541. }(),
  2542. X = function () {
  2543. function t() {
  2544. this.name = "borderRight";
  2545. }
  2546. return t.prototype.css = function (t, e) {
  2547. if (t && t.length) {
  2548. if (e) return t.css("border-right-style", e), "border-right:1px";
  2549. t[0].style.borderRightStyle = "", t[0].style.borderRightWidth = "";
  2550. }
  2551. return null;
  2552. }, t.prototype.createTarget = function () {
  2553. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 右边框\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >否</option>\n <option value="solid" >实线</option>\n <option value="dotted" >虚线</option>\n </select>\n </div>\n </div>'), this.target;
  2554. }, t.prototype.getValue = function () {
  2555. var t = this.target.find("select").val();
  2556. if (t) return t;
  2557. }, t.prototype.setValue = function (t) {
  2558. this.target.find("select").val(t);
  2559. }, t.prototype.destroy = function () {
  2560. this.target.remove();
  2561. }, t;
  2562. }(),
  2563. Y = function () {
  2564. function t() {
  2565. this.name = "borderBottom";
  2566. }
  2567. return t.prototype.css = function (t, e) {
  2568. if (t && t.length) {
  2569. if (e) return t.css("border-bottom-style", e), "border-bottom-style:1px solid";
  2570. t[0].style.borderBottomStyle = "", t[0].style.borderBottomWidth = "";
  2571. }
  2572. return null;
  2573. }, t.prototype.createTarget = function () {
  2574. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 下边框\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >否</option>\n <option value="solid" >实线</option>\n <option value="dotted" >虚线</option>\n </select>\n </div>\n </div>'), this.target;
  2575. }, t.prototype.getValue = function () {
  2576. var t = this.target.find("select").val();
  2577. if (t) return t;
  2578. }, t.prototype.setValue = function (t) {
  2579. this.target.find("select").val(t);
  2580. }, t.prototype.destroy = function () {
  2581. this.target.remove();
  2582. }, t;
  2583. }(),
  2584. J = function () {
  2585. function t() {
  2586. this.name = "contentPaddingLeft";
  2587. }
  2588. return t.prototype.css = function (t, e) {
  2589. var n = t.find(".hiprint-printElement-content");
  2590. if (n && n.length) {
  2591. if (e) return n.css("padding-left", e + "pt"), "padding-left";
  2592. n[0].style.paddingLeft = "";
  2593. }
  2594. return null;
  2595. }, t.prototype.createTarget = function () {
  2596. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 左内边距\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2597. }, t.prototype.getValue = function () {
  2598. var t = this.target.find("select").val();
  2599. if (t) return parseFloat(t.toString());
  2600. }, t.prototype.setValue = function (t) {
  2601. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2602. this.target.find("select").val(t);
  2603. }, t.prototype.destroy = function () {
  2604. this.target.remove();
  2605. }, t;
  2606. }(),
  2607. Q = function () {
  2608. function t() {
  2609. this.name = "contentPaddingTop";
  2610. }
  2611. return t.prototype.css = function (t, e) {
  2612. var n = t.find(".hiprint-printElement-content");
  2613. if (n && n.length) {
  2614. if (e) return n.css("padding-top", e + "pt"), "padding-top";
  2615. n[0].style.paddingTop = "";
  2616. }
  2617. return null;
  2618. }, t.prototype.createTarget = function () {
  2619. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 上内边距\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2620. }, t.prototype.getValue = function () {
  2621. var t = this.target.find("select").val();
  2622. if (t) return parseFloat(t.toString());
  2623. }, t.prototype.setValue = function (t) {
  2624. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2625. this.target.find("select").val(t);
  2626. }, t.prototype.destroy = function () {
  2627. this.target.remove();
  2628. }, t;
  2629. }(),
  2630. Z = function () {
  2631. function t() {
  2632. this.name = "contentPaddingRight";
  2633. }
  2634. return t.prototype.css = function (t, e) {
  2635. var n = t.find(".hiprint-printElement-content");
  2636. if (n && n.length) {
  2637. if (e) return n.css("padding-right", e + "pt"), "padding-right";
  2638. n[0].style.paddingRight = "";
  2639. }
  2640. return null;
  2641. }, t.prototype.createTarget = function () {
  2642. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 右内边距\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2643. }, t.prototype.getValue = function () {
  2644. var t = this.target.find("select").val();
  2645. if (t) return parseFloat(t.toString());
  2646. }, t.prototype.setValue = function (t) {
  2647. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2648. this.target.find("select").val(t);
  2649. }, t.prototype.destroy = function () {
  2650. this.target.remove();
  2651. }, t;
  2652. }(),
  2653. tt = function () {
  2654. function t() {
  2655. this.name = "contentPaddingBottom";
  2656. }
  2657. return t.prototype.css = function (t, e) {
  2658. var n = t.find(".hiprint-printElement-content");
  2659. if (n && n.length) {
  2660. if (e) return n.css("padding-bottom", e + "pt"), "padding-bottom";
  2661. n[0].style.paddingBottom = "";
  2662. }
  2663. return null;
  2664. }, t.prototype.createTarget = function () {
  2665. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 下内边距\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2666. }, t.prototype.getValue = function () {
  2667. var t = this.target.find("select").val();
  2668. if (t) return parseFloat(t.toString());
  2669. }, t.prototype.setValue = function (t) {
  2670. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2671. this.target.find("select").val(t);
  2672. }, t.prototype.destroy = function () {
  2673. this.target.remove();
  2674. }, t;
  2675. }(),
  2676. et = function () {
  2677. function t() {
  2678. this.name = "borderStyle";
  2679. }
  2680. return t.prototype.css = function (t, e) {
  2681. if (t && t.length) {
  2682. if (e) return t.css("border-style", e), "border-style:1px";
  2683. t[0].style.borderStyle = "";
  2684. }
  2685. return null;
  2686. }, t.prototype.createTarget = function () {
  2687. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 边框样式\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="solid" >实线</option>\n <option value="dotted" >虚线</option>\n </select>\n </div>\n </div>'), this.target;
  2688. }, t.prototype.getValue = function () {
  2689. var t = this.target.find("select").val();
  2690. if (t) return t;
  2691. }, t.prototype.setValue = function (t) {
  2692. this.target.find("select").val(t);
  2693. }, t.prototype.destroy = function () {
  2694. this.target.remove();
  2695. }, t;
  2696. }(),
  2697. nt = function () {
  2698. function t() {
  2699. this.name = "backgroundColor";
  2700. }
  2701. return t.prototype.css = function (t, e) {
  2702. if (t && t.length) {
  2703. if (e) return t.css("background-color", e), "background-color:" + e;
  2704. t[0].style.backgroundColor = "";
  2705. }
  2706. return null;
  2707. }, t.prototype.createTarget = function () {
  2708. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 背景颜色\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" class="auto-submit"/>\n </div>\n </div>'), this.target;
  2709. }, t.prototype.getValue = function () {
  2710. var t = this.target.find("input").val();
  2711. if (t) return t.toString();
  2712. }, t.prototype.setValue = function (t) {
  2713. this.target.find("input").minicolors({
  2714. defaultValue: t || "",
  2715. theme: "bootstrap"
  2716. }), this.target.find("input").val(t);
  2717. }, t.prototype.destroy = function () {
  2718. this.target.remove();
  2719. }, t;
  2720. }(),
  2721. it = function () {
  2722. function t() {
  2723. this.name = "orient";
  2724. }
  2725. return t.prototype.createTarget = function () {
  2726. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 纸张方向(仅自定义纸质有效)\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="1" >纵向</option>\n <option value="2" >横向</option>\n </select>\n </div>\n </div>'), this.target;
  2727. }, t.prototype.getValue = function () {
  2728. var t = this.target.find("select").val();
  2729. if (t) return parseFloat(t.toString());
  2730. }, t.prototype.setValue = function (t) {
  2731. this.target.find("select").val(t);
  2732. }, t.prototype.destroy = function () {
  2733. this.target.remove();
  2734. }, t;
  2735. }(),
  2736. ot = function () {
  2737. function t() {
  2738. this.name = "textContentVerticalAlign";
  2739. }
  2740. return t.prototype.createTarget = function () {
  2741. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 上下对齐\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="middle" >垂直居中</option>\n <option value="bottom" >底部</option>\n \n </select>\n </div>\n </div>'), this.target;
  2742. }, t.prototype.css = function (t, e) {
  2743. if (t && t.length) {
  2744. if (e) return "middle" === e && t.addClass("hiprint-text-content-middle"), "bottom" === e && t.addClass("hiprint-text-content-bottom"), "";
  2745. t.removeClass("hiprint-text-content-middle"), t.removeClass("hiprint-text-content-bottom");
  2746. }
  2747. return null;
  2748. }, t.prototype.getValue = function () {
  2749. var t = this.target.find("select").val();
  2750. if (t) return t.toString();
  2751. }, t.prototype.setValue = function (t) {
  2752. this.target.find("select").val(t);
  2753. }, t.prototype.destroy = function () {
  2754. this.target.remove();
  2755. }, t;
  2756. }(),
  2757. rt = n(5),
  2758. at = function () {
  2759. function t() {
  2760. this.name = "columns";
  2761. }
  2762. return t.prototype.createTarget = function () {
  2763. $('<div class="indicator"></div>').appendTo("body");
  2764. return " </ul>\n </div>\n </div>", this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div>\n <ul class="hiprint-option-table-selected-columns"> </ul>\n </div>\n </div>'), this.target;
  2765. }, t.prototype.getValue = function () {
  2766. return this.buildData();
  2767. }, t.prototype.setValue = function (t, e, n) {
  2768. var i = this,
  2769. o = this;
  2770. this.value = t, this.options = e, this.printElementType = n;
  2771. var r = n.columns[0].filter(function (e) {
  2772. return 0 == t[0].columns.filter(function (t) {
  2773. return e.columnId == t.columnId;
  2774. }).length;
  2775. }).map(function (t) {
  2776. var e = new rt.a(t);
  2777. return e.checked = !1, e;
  2778. });
  2779. this.allColumns = t[0].columns.concat(r), t && 1 == t.length && (this.target.find("ul").html(this.allColumns.map(function (t, e) {
  2780. return '<li class="hiprint-option-table-selected-item"> <div class="hi-pretty p-default">\n ' + (t.checked ? '<input type="checkbox" checked column-id="' + (t.columnId || "") + '" />' : '<input type="checkbox" column-id="' + (t.columnId || "") + '" />') + '\n <div class="state">\n <label></label>\n </div>\n </div><span class="column-title">' + (t.title || t.descTitle || "") + "</span></li>";
  2781. }).join("")), this.target.find("input").change(function () {
  2782. i.submit();
  2783. }), this.printElementType.columnDisplayIndexEditable && this.target.find("li").hidraggable({
  2784. revert: !0,
  2785. handle: ".column-title",
  2786. moveUnit: "pt",
  2787. deltaX: 0,
  2788. deltaY: 0
  2789. }).hidroppable({
  2790. onDragOver: function onDragOver(t, e) {
  2791. $(this).css("border-bottom-color", "red");
  2792. },
  2793. onDragLeave: function onDragLeave(t, e) {
  2794. $(this).css("border-bottom-color", "");
  2795. },
  2796. onDrop: function onDrop(t, e) {
  2797. $(e).insertAfter(this), $(this).css("border-bottom-color", ""), o.submit();
  2798. }
  2799. }));
  2800. }, t.prototype.buildData = function () {
  2801. var t = this,
  2802. e = [];
  2803. return this.allColumns.filter(function (t) {
  2804. t.checked = !1;
  2805. }), (this.printElementType.columnDisplayEditable ? this.target.find("input:checked") : this.target.find("input")).map(function (n, i) {
  2806. var o = $(i).attr("column-id"),
  2807. r = t.options.makeColumnObj();
  2808. if (r[o]) r[o].checked = !0, e.push(r[o]); else {
  2809. var a = t.printElementType.getColumnByColumnId(o);
  2810. if (a) {
  2811. var p = new rt.a(a);
  2812. p.checked = !0, e.push(p);
  2813. }
  2814. }
  2815. }), this.value[0].columns = e, this.value;
  2816. }, t.prototype.destroy = function () {
  2817. this.target.remove();
  2818. }, t;
  2819. }(),
  2820. pt = function () {
  2821. function t() {
  2822. this.name = "textType";
  2823. }
  2824. return t.prototype.createTarget = function () {
  2825. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 打印类型\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="" >文本</option>\n <option value="barcode" >条形码</option>\n <option value="qrcode" >二维码</option>\n </select>\n </div>\n </div>'), this.target;
  2826. }, t.prototype.getValue = function () {
  2827. var t = this.target.find("select").val();
  2828. if (t) return t;
  2829. }, t.prototype.setValue = function (t) {
  2830. this.target.find("select").val(t);
  2831. }, t.prototype.destroy = function () {
  2832. this.target.remove();
  2833. }, t;
  2834. }(),
  2835. st = function () {
  2836. function t() {
  2837. this.name = "topOffset";
  2838. }
  2839. return t.prototype.createTarget = function () {
  2840. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 顶部偏移\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="偏移量pt" class="auto-submit">\n </div>\n </div>'), this.target;
  2841. }, t.prototype.getValue = function () {
  2842. var t = this.target.find("input").val();
  2843. if (t) return parseFloat(t.toString());
  2844. }, t.prototype.setValue = function (t) {
  2845. this.target.find("input").val(t);
  2846. }, t.prototype.destroy = function () {
  2847. this.target.remove();
  2848. }, t;
  2849. }(),
  2850. lt = function () {
  2851. function t() {
  2852. this.name = "gridColumns";
  2853. }
  2854. return t.prototype.createTarget = function () {
  2855. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 一行多组\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="2" >一行二列</option>\n <option value="3" >一行三列</option>\n <option value="4" >一行四列</option>\n </select>\n </div>\n </div>'), this.target;
  2856. }, t.prototype.getValue = function () {
  2857. var t = this.target.find("select").val();
  2858. if (t) return parseFloat(t.toString());
  2859. }, t.prototype.setValue = function (t) {
  2860. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2861. this.target.find("select").val(t);
  2862. }, t.prototype.destroy = function () {
  2863. this.target.remove();
  2864. }, t;
  2865. }(),
  2866. ut = function () {
  2867. function t() {
  2868. this.name = "gridColumnsGutter";
  2869. }
  2870. return t.prototype.createTarget = function () {
  2871. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 一行多组间隔\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.25" >7.25pt</option>\n <option value="8.5" >8.5pt</option>\n <option value="9" >9pt</option>\n </select>\n </div>\n </div>'), this.target;
  2872. }, t.prototype.getValue = function () {
  2873. var t = this.target.find("select").val();
  2874. if (t) return parseFloat(t.toString());
  2875. }, t.prototype.css = function (t, e) {
  2876. if (t && t.length) {
  2877. if (e) return t.find(".table-grid-row").css("margin-left", "-" + e + "pt").css("margin-right", "-" + e + "pt"), t.find(".tableGridColumnsGutterRow").css("padding-left", e + "pt").css("padding-right", e + "pt"), null;
  2878. t.find(".table-grid-row").map(function (t, e) {
  2879. e.style.marginLeft = "", e.style.marginRight = "";
  2880. }), t.find(".tableGridColumnsGutterRow").map(function (t, e) {
  2881. e.style.paddingLeft = "", e.style.paddingRight = "";
  2882. });
  2883. }
  2884. return null;
  2885. }, t.prototype.setValue = function (t) {
  2886. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2887. this.target.find("select").val(t);
  2888. }, t.prototype.destroy = function () {
  2889. this.target.remove();
  2890. }, t;
  2891. }(),
  2892. dt = function () {
  2893. function t() {
  2894. this.name = "paddingLeft";
  2895. }
  2896. return t.prototype.css = function (t, e) {
  2897. var n = t;
  2898. if (n && n.length) {
  2899. if (e) return n.css("padding-left", e + "pt"), "padding-left";
  2900. n[0].style.paddingLeft = "";
  2901. }
  2902. return null;
  2903. }, t.prototype.createTarget = function () {
  2904. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 左内边距\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2905. }, t.prototype.getValue = function () {
  2906. var t = this.target.find("select").val();
  2907. if (t) return parseFloat(t.toString());
  2908. }, t.prototype.setValue = function (t) {
  2909. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2910. this.target.find("select").val(t);
  2911. }, t.prototype.destroy = function () {
  2912. this.target.remove();
  2913. }, t;
  2914. }(),
  2915. ct = function () {
  2916. function t() {
  2917. this.name = "paddingRight";
  2918. }
  2919. return t.prototype.css = function (t, e) {
  2920. var n = t;
  2921. if (n && n.length) {
  2922. if (e) return n.css("padding-right", e + "pt"), "padding-right";
  2923. n[0].style.paddingRight = "";
  2924. }
  2925. return null;
  2926. }, t.prototype.createTarget = function () {
  2927. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 右内边距\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2928. }, t.prototype.getValue = function () {
  2929. var t = this.target.find("select").val();
  2930. if (t) return parseFloat(t.toString());
  2931. }, t.prototype.setValue = function (t) {
  2932. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2933. this.target.find("select").val(t);
  2934. }, t.prototype.destroy = function () {
  2935. this.target.remove();
  2936. }, t;
  2937. }(),
  2938. ht = function () {
  2939. function t() {
  2940. this.name = "dataType";
  2941. }
  2942. return t.prototype.createTarget = function () {
  2943. var t = this;
  2944. return this.target = $('\n <div class="hiprint-option-item-row">\n <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 数据类型\n </div>\n <div class="hiprint-option-item-field">\n <select class="hiprint-option-item-datatype">\n <option value="" >默认</option>\n <option value="datetime" >日期时间</option>\n <option value="boolean" >布尔</option>\n </select>\n </div>\n </div>\n <div class="hiprint-option-item ">\n <div class="hiprint-option-item-label ">\n 格式\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit hiprint-option-item-datatype-select-format">\n <option value="" >默认</option>\n \n </select>\n <input class="auto-submit hiprint-option-item-datatype-input-format" type="text" data-type="boolean" placeholder="true:false">\n </div>\n </div>\n </div>\n '), $(this.target.find(".hiprint-option-item-datatype")).change(function () {
  2945. var e = $(t.target.find(".hiprint-option-item-datatype")).val();
  2946. t.loadFormatSelectByDataType(e), t.submit(t.getValue());
  2947. }), this.target;
  2948. }, t.prototype.getValue = function () {
  2949. var t = this.target.find(".hiprint-option-item-datatype").val();
  2950. if (t) {
  2951. var e = this.target.find(".hiprint-option-item-datatype-format").val();
  2952. return {
  2953. dataType: t,
  2954. format: e || void 0
  2955. };
  2956. }
  2957. return {
  2958. dataType: void 0,
  2959. format: void 0
  2960. };
  2961. }, t.prototype.setValue = function (t, e) {
  2962. this.target.find(".hiprint-option-item-datatype").val(e.dataType || ""), this.loadFormatSelectByDataType(e.dataType), this.target.find(".hiprint-option-item-datatype-format").val(e.format || "");
  2963. }, t.prototype.destroy = function () {
  2964. this.target.remove();
  2965. }, t.prototype.loadFormatSelectByDataType = function (t) {
  2966. "boolean" === t ? (this.target.find(".hiprint-option-item-datatype-select-format").removeClass("hiprint-option-item-datatype-format").hide().val(""), this.target.find(".hiprint-option-item-datatype-input-format").addClass("hiprint-option-item-datatype-format").show()) : "datetime" === t ? (this.target.find(".hiprint-option-item-datatype-select-format").addClass("hiprint-option-item-datatype-format").show(), this.target.find(".hiprint-option-item-datatype-input-format").removeClass("hiprint-option-item-datatype-format").hide().val(""), this.target.find(".hiprint-option-item-datatype-select-format").html('\n <option value="" >默认</option>\n <option value="M/d" >M/d</option>\n <option value="MM/dd" >MM/dd</option>\n <option value="yy/M/d" >yy/M/d</option>\n <option value="yy/MM/dd" >yy/MM/dd</option>\n <option value="yyyy/M/d" >yyyy/M/d</option>\n <option value="yyyy/MM/dd" >yyyy/MM/dd</option>\n <option value="yy/M/d H:m" >yy/M/d H:m</option>\n <option value="yy/M/d H:m:s" >yy/M/d H:m:s</option>\n <option value="yy/M/d HH:mm" >yy/M/d HH:mm</option>\n <option value="yy/M/d HH:mm:ss" >yy/M/d HH:mm:ss</option>\n <option value="yy/MM/dd H:m" >yy/MM/dd H:m</option>\n <option value="yy/MM/dd H:m:s" >yy/MM/dd H:m:s</option>\n <option value="yy/MM/dd HH:mm" >yy/MM/dd HH:mm</option>\n <option value="yy/MM/dd HH:mm:ss" >yy/MM/dd HH:mm:ss</option>\n <option value="yyyy/M/d H:m" >yyyy/M/dd H:m</option>\n <option value="yyyy/M/d H:m:s" >yyyy/M/d H:m:s</option>\n <option value="yyyy/M/d HH:mm" >yyyy/M/d HH:mm</option>\n <option value="yyyy/M/d HH:mm:ss" >yyyy/M/d HH:mm:ss</option>\n <option value="yyyy/MM/dd H:m" >yyyy/MM/dd H:m</option>\n <option value="yyyy/MM/dd H:m:s" >yyyy/MM/dd H:m:s</option>\n <option value="yyyy/MM/dd HH:mm" >yyyy/MM/dd HH:mm</option>\n <option value="yyyy/MM/dd HH:mm:ss" >yyyy/MM/dd HH:mm:ss</option>\n\n <option value="M-d" >M-d</option>\n <option value="MM-dd" >MM-dd</option>\n <option value="yy-M-d" >yy-M-d</option>\n <option value="yy-MM-dd" >yy-MM-dd</option>\n <option value="yyyy-M-d" >yyyy-M-d</option>\n <option value="yyyy-MM-dd" >yyyy-MM-dd</option>\n <option value="yy-M-d H:m" >yy-M-d H:m</option>\n <option value="yy-M-d H:m:s" >yy-M-d H:m:s</option>\n <option value="yy-M-d HH:mm" >yy-M-d HH:mm</option>\n <option value="yy-M-d HH:mm:ss" >yy-M-d HH:mm:ss</option>\n <option value="yy-MM-dd H:m" >yy-MM-dd H:m</option>\n <option value="yy-MM-dd H:m:s" >yy-MM-dd H:m:s</option>\n <option value="yy-MM-dd HH:mm" >yy-MM-dd HH:mm</option>\n <option value="yy-MM-dd HH:mm:ss" >yy-MM-dd HH:mm:ss</option>\n <option value="yyyy-M-d H:m" >yyyy-M-d H:m</option>\n <option value="yyyy-M-d H:m:s" >yyyy-M-d H:m:s</option>\n <option value="yyyy-M-d HH:mm" >yyyy-M-d HH:mm</option>\n <option value="yyyy-M-d HH:mm:ss" >yyyy-M-d HH:mm:ss</option>\n <option value="yyyy-MM-dd H:m" >yyyy-MM-dd H:m</option>\n <option value="yyyy-MM-dd H:m:s" >yyyy-MM-dd H:m:s</option>\n <option value="yyyy-MM-dd HH:mm" >yyyy-MM-dd HH:mm</option>\n <option value="yyyy-MM-dd HH:mm:ss" >yyyy-MM-dd HH:mm:ss</option>\n ')) : (this.target.find(".hiprint-option-item-datatype-select-format").show(), this.target.find(".hiprint-option-item-datatype-input-format").hide().val(""), this.target.find(".hiprint-option-item-datatype-format").html('\n <option value="" >默认</option>\n '));
  2967. }, t;
  2968. }(),
  2969. ft = function () {
  2970. function t() {
  2971. this.name = "formatter";
  2972. }
  2973. return t.prototype.createTarget = function () {
  2974. var t = ' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 格式化函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="' + (this.placeholder || "") + '" class="auto-submit"></textarea>\n </div>\n </div>';
  2975. return this.target = $(t), this.target;
  2976. }, t.prototype.getValue = function () {
  2977. var t = this.target.find("textarea").val();
  2978. if (t) return t;
  2979. }, t.prototype.setValue = function (t) {
  2980. this.target.find("textarea").val(t);
  2981. }, t.prototype.destroy = function () {
  2982. this.target.remove();
  2983. }, t;
  2984. }(),
  2985. gt = function () {
  2986. function t() {
  2987. this.name = "styler";
  2988. }
  2989. return t.prototype.createTarget = function () {
  2990. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 样式函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="function(value, options, target,templateData){}" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  2991. }, t.prototype.getValue = function () {
  2992. var t = this.target.find("textarea").val();
  2993. if (t) return t;
  2994. }, t.prototype.setValue = function (t) {
  2995. this.target.find("textarea").val(t);
  2996. }, t.prototype.destroy = function () {
  2997. this.target.remove();
  2998. }, t;
  2999. }(),
  3000. mt = function () {
  3001. function t() {
  3002. this.name = "footerFormatter";
  3003. }
  3004. return t.prototype.createTarget = function () {
  3005. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 表格脚函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="function(options,rows,data){ return \'<tr></tr>\' }; }" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  3006. }, t.prototype.getValue = function () {
  3007. var t = this.target.find("textarea").val();
  3008. if (t) return t;
  3009. }, t.prototype.setValue = function (t) {
  3010. this.target.find("textarea").val(t);
  3011. }, t.prototype.destroy = function () {
  3012. this.target.remove();
  3013. }, t;
  3014. }(),
  3015. vt = function () {
  3016. function t() {
  3017. this.name = "gridColumnsFooterFormatter";
  3018. }
  3019. return t.prototype.createTarget = function () {
  3020. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 多组表格脚函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="function(options,rows,data){ return \'\' }; }" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  3021. }, t.prototype.getValue = function () {
  3022. var t = this.target.find("textarea").val();
  3023. if (t) return t;
  3024. }, t.prototype.setValue = function (t) {
  3025. this.target.find("textarea").val(t);
  3026. }, t.prototype.destroy = function () {
  3027. this.target.remove();
  3028. }, t;
  3029. }(),
  3030. yt = function () {
  3031. function t() {
  3032. this.name = "rowStyler";
  3033. }
  3034. return t.prototype.createTarget = function () {
  3035. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 行样式函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="请输入标题" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  3036. }, t.prototype.getValue = function () {
  3037. var t = this.target.find("textarea").val();
  3038. if (t) return t;
  3039. }, t.prototype.setValue = function (t) {
  3040. this.target.find("textarea").val(t);
  3041. }, t.prototype.destroy = function () {
  3042. this.target.remove();
  3043. }, t;
  3044. }(),
  3045. bt = function () {
  3046. function t() {
  3047. this.name = "align";
  3048. }
  3049. return t.prototype.createTarget = function () {
  3050. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 单元格左右对齐\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="left" >居左</option>\n <option value="center" >居中</option>\n <option value="right" >居右</option>\n <option value="justify" >两端对齐</option>\n </select>\n </div>\n </div>'), this.target;
  3051. }, t.prototype.getValue = function () {
  3052. var t = this.target.find("select").val();
  3053. if (t) return t.toString();
  3054. }, t.prototype.setValue = function (t) {
  3055. this.target.find("select").val(t);
  3056. }, t.prototype.destroy = function () {
  3057. this.target.remove();
  3058. }, t;
  3059. }(),
  3060. Et = function () {
  3061. function t() {
  3062. this.name = "vAlign";
  3063. }
  3064. return t.prototype.createTarget = function () {
  3065. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 单元格上下对齐\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="top" >上</option>\n <option value="middle" >中</option>\n <option value="bottom" >居右</option>\n \n </select>\n </div>\n </div>'), this.target;
  3066. }, t.prototype.getValue = function () {
  3067. var t = this.target.find("select").val();
  3068. if (t) return t.toString();
  3069. }, t.prototype.setValue = function (t) {
  3070. this.target.find("select").val(t);
  3071. }, t.prototype.destroy = function () {
  3072. this.target.remove();
  3073. }, t;
  3074. }(),
  3075. Tt = function () {
  3076. function t() {
  3077. this.name = "halign";
  3078. }
  3079. return t.prototype.createTarget = function () {
  3080. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表格头单元格左右对齐\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="left" >居左</option>\n <option value="center" >居中</option>\n <option value="right" >居右</option>\n <option value="justify" >两端对齐</option>\n </select>\n </div>\n </div>'), this.target;
  3081. }, t.prototype.getValue = function () {
  3082. var t = this.target.find("select").val();
  3083. if (t) return t.toString();
  3084. }, t.prototype.setValue = function (t) {
  3085. this.target.find("select").val(t);
  3086. }, t.prototype.destroy = function () {
  3087. this.target.remove();
  3088. }, t;
  3089. }(),
  3090. Pt = function () {
  3091. function t() {
  3092. this.name = "styler2";
  3093. }
  3094. return t.prototype.createTarget = function () {
  3095. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 单元格样式函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="function(value,row,index,options){ return {color:\'red\' }; }" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  3096. }, t.prototype.getValue = function () {
  3097. var t = this.target.find("textarea").val();
  3098. if (t) return t;
  3099. }, t.prototype.setValue = function (t) {
  3100. this.target.find("textarea").val(t);
  3101. }, t.prototype.destroy = function () {
  3102. this.target.remove();
  3103. }, t;
  3104. }(),
  3105. _t = function () {
  3106. function t() {
  3107. this.name = "formatter2";
  3108. }
  3109. return t.prototype.createTarget = function () {
  3110. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 单元格格式化函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="function(value,row,index,options){ return \'\'; }" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  3111. }, t.prototype.getValue = function () {
  3112. var t = this.target.find("textarea").val();
  3113. if (t) return t;
  3114. }, t.prototype.setValue = function (t) {
  3115. this.target.find("textarea").val(t);
  3116. }, t.prototype.destroy = function () {
  3117. this.target.remove();
  3118. }, t;
  3119. }(),
  3120. wt = function () {
  3121. function t() {
  3122. this.name = "autoCompletion";
  3123. }
  3124. return t.prototype.createTarget = function () {
  3125. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 自动补全\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="true" >是</option>\n <option value="false" >否</option>\n </select>\n </div>\n </div>'), this.target;
  3126. }, t.prototype.getValue = function () {
  3127. if ("true" == this.target.find("select").val()) return !0;
  3128. }, t.prototype.setValue = function (t) {
  3129. this.target.find("select").val((null == t ? "" : t).toString());
  3130. }, t.prototype.destroy = function () {
  3131. this.target.remove();
  3132. }, t;
  3133. }(),
  3134. xt = function () {
  3135. function t() {
  3136. this.name = "tableFooterRepeat";
  3137. }
  3138. return t.prototype.createTarget = function () {
  3139. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表格脚显示\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="no" >不显示</option>\n <option value="page" >每页显示</option>\n <option value="last" >最后显示</option>\n </select>\n </div>\n </div>'), this.target;
  3140. }, t.prototype.getValue = function () {
  3141. var t = this.target.find("select").val();
  3142. if (t) return t.toString();
  3143. }, t.prototype.setValue = function (t) {
  3144. this.target.find("select").val(t);
  3145. }, t.prototype.destroy = function () {
  3146. this.target.remove();
  3147. }, t;
  3148. }();
  3149. n.d(e, "a", function () {
  3150. return Ct;
  3151. });
  3152. var Ct = function () {
  3153. function t() { }
  3154. return t.init = function () {
  3155. t.printElementOptionItems || (t.printElementOptionItems = {}, t._printElementOptionItems.forEach(function (e) {
  3156. t.printElementOptionItems[e.name] = e;
  3157. }));
  3158. }, t.registerItem = function (e) {
  3159. if (!e.name) throw new Error("styleItem must have name");
  3160. t.init(), t.printElementOptionItems[e.name] = e;
  3161. }, t.getItem = function (e) {
  3162. return t.init(), t.printElementOptionItems[e];
  3163. }, t._printElementOptionItems = [new o(), new r(), new a(), new p(), new i(), new s(), new l(), new pt(), new u(), new d(), new c(), new h(), new f(), new g(), new m(), new v(), new y(), new b(), new E(), new T(), new P(), new _(), new w(), new x(), new C(), new O(), new H(), new D(), new I(), new R(), new M(), new S(), new B(), new F(), new L(), new A(), new z(), new k(), new st(), new N(), new V(), new W(), new j(), new U(), new K(), new G(), new q(), new X(), new Y(), new Q(), new J(), new Z(), new tt(), new et(), new nt(), new it(), new ot(), new at(), new lt(), new ut(), new dt(), new ct(), new ht(), new ft(), new gt(), new mt(), new vt(), new yt(), new bt(), new Tt(), new Et(), new Pt(), new _t(), new wt(), new xt()], t;
  3164. }();
  3165. }, function (t, e, n) {
  3166. "use strict";
  3167. n.d(e, "a", function () {
  3168. return o;
  3169. }), n.d(e, "b", function () {
  3170. return r;
  3171. });
  3172. var i = n(14),
  3173. o = function () {
  3174. function t(t, e) {
  3175. this.selectedCells = [], this.rows = t, this.tableTatget = e;
  3176. }
  3177. return t.prototype.clear = function () {
  3178. this.tableTatget.find("td").removeClass("selected");
  3179. }, t.prototype.setSingleSelect = function (t) {
  3180. this.startCell = t, this.selectedCells = [];
  3181. }, t.prototype.getSingleSelect = function () {
  3182. if (this.selectedCells.length) {
  3183. if (1 == this.selectedCells.length) return 1 == this.selectedCells[0].length ? this.selectedCells[0][0] : void 0;
  3184. if (this.selectedCells.length > 1) return;
  3185. }
  3186. return this.startCell;
  3187. }, t.prototype.singleSelectByXY = function (t, e) {
  3188. var n = this.getCellByXY(t, e);
  3189. n && (this.clear(), n && (n.cell.select(), this.startCell = n, this.selectedCells = []));
  3190. }, t.prototype.multipleSelectByXY = function (t, e) {
  3191. this.clear();
  3192. var n = [];
  3193. if (this.startCell) {
  3194. var o = this.getCellByXY(t, e);
  3195. if (o) {
  3196. var r = i.a.mergeRect(this.startCell.cell.getTableRect(), o.cell.getTableRect());
  3197. this.selectByRect(new a(r), n);
  3198. }
  3199. }
  3200. this.selectedCells = n;
  3201. }, t.prototype.selectByRect = function (t, e) {
  3202. this.rows.forEach(function (n, i) {
  3203. var o = [];
  3204. n.columns.forEach(function (e) {
  3205. e.isInRect(t) && (o.push(new p(i, e)), e.select());
  3206. }), o.length && e.push(o);
  3207. }), t.changed && (t.changed = !1, e.splice(0, e.length), this.selectByRect(t, e));
  3208. }, t.prototype.getSelectedCells = function () {
  3209. return this.selectedCells;
  3210. }, t.prototype.getCellByXY = function (t, e) {
  3211. var n;
  3212. return this.rows.forEach(function (i, o) {
  3213. var r = i.columns.filter(function (n) {
  3214. return n.isXYinCell(t, e);
  3215. });
  3216. r.length && (n = new p(o, r[0]));
  3217. }), n;
  3218. }, t;
  3219. }(),
  3220. r = function () {
  3221. return function (t) {
  3222. this.x = t.x, this.y = t.y, this.height = t.height, this.width = t.width;
  3223. };
  3224. }(),
  3225. a = function () {
  3226. return function (t) {
  3227. this.rect = t;
  3228. };
  3229. }(),
  3230. p = function () {
  3231. return function (t, e) {
  3232. this.rowIndex = t, this.cell = e;
  3233. };
  3234. }();
  3235. }, function (t, e, n) {
  3236. "use strict";
  3237. n.d(e, "a", function () {
  3238. return i;
  3239. });
  3240. var i = function () {
  3241. function t() { }
  3242. return t.createId = function () {
  3243. return this.id += 1, this.id;
  3244. }, t.id = 1, t;
  3245. }();
  3246. }, function (t, e, n) {
  3247. "use strict";
  3248. n.d(e, "a", function () {
  3249. return p;
  3250. });
  3251. var _i,
  3252. o = n(5),
  3253. r = n(13),
  3254. a = (_i = function i(t, e) {
  3255. return (_i = Object.setPrototypeOf || _instanceof({
  3256. __proto__: []
  3257. }, Array) && function (t, e) {
  3258. t.__proto__ = e;
  3259. } || function (t, e) {
  3260. for (var n in e) {
  3261. e.hasOwnProperty(n) && (t[n] = e[n]);
  3262. }
  3263. })(t, e);
  3264. }, function (t, e) {
  3265. function n() {
  3266. this.constructor = t;
  3267. }
  3268. _i(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n());
  3269. }),
  3270. p = function (t) {
  3271. function e(e) {
  3272. var n = t.call(this) || this;
  3273. (n.columns = [], e && e.constructor === Array) ? (e || []).forEach(function (t) {
  3274. n.columns.push(new o.a(t));
  3275. }) : e.columns && (e.columns || []).forEach(function (t) {
  3276. n.columns.push(new o.a(t));
  3277. });
  3278. return n;
  3279. }
  3280. return a(e, t), e.prototype.getPrintElementOptionEntity = function () {
  3281. var t = [];
  3282. return this.columns.forEach(function (e) {
  3283. t.push(e.getEntity());
  3284. }), t;
  3285. }, e;
  3286. }(r.a);
  3287. }, function (t, e, n) {
  3288. "use strict";
  3289. n.d(e, "a", function () {
  3290. return r;
  3291. });
  3292. var i = n(11),
  3293. o = n(5),
  3294. r = function () {
  3295. function t() {
  3296. this.id = i.a.createId();
  3297. }
  3298. return t.prototype.init = function (t, e, n) {
  3299. this.isHead = n, this.target = e || $("<tr></tr>"), this.tableOptions = t, this.initCells(this.columns);
  3300. }, t.prototype.getTarget = function () {
  3301. return this.target;
  3302. }, t.prototype.initCells = function (t) {
  3303. var e = this;
  3304. t ? t.forEach(function (t, n) {
  3305. t.init(e.target.find("td:eq(" + n + ")"), e.tableOptions, e.id, e.isHead);
  3306. }) : (this.columns = [], this.target.find("td").map(function (t, n) {
  3307. var i = new o.a();
  3308. i.init($(n), e.tableOptions, e.id, e.isHead), e.columns.push(i);
  3309. }));
  3310. }, t.prototype.removeCell = function (t) {
  3311. var e = this.columns.indexOf(t);
  3312. this.columns[e].getTarget().remove(), this.columns.splice(e, 1);
  3313. }, t.prototype.createTableCell = function (t, e) {
  3314. var n = new o.a();
  3315. return n.init($("<td></td>"), this.tableOptions, this.id, this.isHead), t > 1 && (n.getTarget().attr("rowspan", t), n.rowspan = t), e > 1 && (n.getTarget().attr("colspan", e), n.colspan = e), n;
  3316. }, t.prototype.insertToTargetCellLeft = function (t, e) {
  3317. var n = this.columns.indexOf(t);
  3318. t.getTarget().before(e.getTarget()), this.columns.splice(n, 0, e);
  3319. }, t.prototype.insertToTargetCellRight = function (t, e) {
  3320. var n = this.columns.indexOf(t);
  3321. this.columns[n].getTarget().after(e.getTarget()), this.columns.splice(n + 1, 0, e);
  3322. }, t.prototype.insertCellToFirst = function (t) {
  3323. this.target.prepend(t.getTarget()), this.columns.splice(0, 0, t);
  3324. }, t.prototype.insertCellToLast = function (t) {
  3325. this.columns.push(t), this.target.append(t.getTarget());
  3326. }, t.prototype.getPrintElementOptionEntity = function () {
  3327. var t = [];
  3328. return this.columns.forEach(function (e) {
  3329. t.push(e.getEntity());
  3330. }), t;
  3331. }, t;
  3332. }();
  3333. }, function (t, e, n) {
  3334. "use strict";
  3335. n.d(e, "a", function () {
  3336. return o;
  3337. });
  3338. var i = n(10),
  3339. o = function () {
  3340. function t() { }
  3341. return t.mergeRect = function (t, e) {
  3342. var n = Math.min(t.x, e.x),
  3343. o = Math.min(t.y, e.y);
  3344. return new i.b({
  3345. x: n,
  3346. y: o,
  3347. height: Math.max(t.y + t.height, e.y + e.height) - o,
  3348. width: Math.max(t.x + t.width, e.x + e.width) - n
  3349. });
  3350. }, t.Rect = function (t, e, n, i) {
  3351. return {
  3352. minX: t < n ? t : n,
  3353. minY: e < i ? e : i,
  3354. maxX: t < n ? n : t,
  3355. maxY: e < i ? i : e
  3356. };
  3357. }, t;
  3358. }();
  3359. }, function (module, __webpack_exports__, __webpack_require__) {
  3360. "use strict";
  3361. __webpack_require__.d(__webpack_exports__, "a", function () {
  3362. return TablePrintElement;
  3363. });
  3364. var _BasePrintElement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4),
  3365. _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1),
  3366. _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6),
  3367. _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0),
  3368. _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8),
  3369. _option_TablePrintElementOption__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18),
  3370. _table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7),
  3371. _hitable_HiTale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(16),
  3372. _table_GridColumnsStructure__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(20),
  3373. _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2),
  3374. __extends = (_extendStatics = function extendStatics(t, e) {
  3375. return (_extendStatics = Object.setPrototypeOf || _instanceof({
  3376. __proto__: []
  3377. }, Array) && function (t, e) {
  3378. t.__proto__ = e;
  3379. } || function (t, e) {
  3380. for (var n in e) {
  3381. e.hasOwnProperty(n) && (t[n] = e[n]);
  3382. }
  3383. })(t, e);
  3384. }, function (t, e) {
  3385. function n() {
  3386. this.constructor = t;
  3387. }
  3388. _extendStatics(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n());
  3389. }),
  3390. _extendStatics,
  3391. TablePrintElement = function (_super) {
  3392. function TablePrintElement(t, e) {
  3393. var n = _super.call(this, t) || this;
  3394. return n.gridColumnsFooterCss = "hiprint-gridColumnsFooter", n.tableGridRowCss = "table-grid-row", n.options = new _option_TablePrintElementOption__WEBPACK_IMPORTED_MODULE_5__.a(e, n.printElementType), n.options.setDefault(new _option_TablePrintElementOption__WEBPACK_IMPORTED_MODULE_5__.a(_HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.table.default).getPrintElementOptionEntity()), n;
  3395. }
  3396. return __extends(TablePrintElement, _super), TablePrintElement.prototype.getColumns = function () {
  3397. return this.options.columns;
  3398. }, TablePrintElement.prototype.getColumnByColumnId = function (t) {
  3399. return this.options.getColumnByColumnId(t);
  3400. }, TablePrintElement.prototype.updateDesignViewFromOptions = function () {
  3401. if (this.designTarget) {
  3402. this.css(this.designTarget, this.getData());
  3403. var t = this.designTarget.find(".hiprint-printElement-table-content"),
  3404. e = this.getHtml(this.designPaper);
  3405. t.html(""), t.append(e[0].target.find(".table-grid-row")), this.printElementType.editable && this.setHitable(), this.setColumnsOptions();
  3406. }
  3407. }, TablePrintElement.prototype.css = function (t, e) {
  3408. if ((this.getField() || !this.options.content) && !this.printElementType.formatter) return _super.prototype.css.call(this, t, e);
  3409. }, TablePrintElement.prototype.getDesignTarget = function (t) {
  3410. return this.designTarget = this.getHtml(t)[0].target, this.designPaper = t, this.designTarget.find("td").hidroppable({
  3411. accept: ".rn-draggable-item",
  3412. onDrop: function onDrop(t, e) { },
  3413. onDragEnter: function onDragEnter(t, e) {
  3414. $(e).removeClass("rn-draggable-item");
  3415. },
  3416. onDragLeave: function onDragLeave(t, e) {
  3417. $(e).addClass("rn-draggable-item");
  3418. }
  3419. }), this.designTarget;
  3420. }, TablePrintElement.prototype.getConfigOptions = function () {
  3421. return _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.table;
  3422. }, TablePrintElement.prototype.createTarget = function (t, e, n) {
  3423. for (var i = $('<div class="hiprint-printElement hiprint-printElement-table" style="position: absolute;"><div class="hiprint-printElement-table-handle"></div><div class="hiprint-printElement-table-content" style="height:100%;width:100%"></span></div>'), o = this.createGridColumnsStructure(n), r = 0; r < o.gridColumns; r++) {
  3424. o.getByIndex(r).append(this.getTableHtml(e, n));
  3425. }
  3426. return i.find(".hiprint-printElement-table-content").append(o.target), i;
  3427. }, TablePrintElement.prototype.createGridColumnsStructure = function (t) {
  3428. for (var e = $('<div class="hi-grid-row table-grid-row"></div>'), n = 0; n < this.options.getGridColumns(); n++) {
  3429. var i = $('<div class="tableGridColumnsGutterRow hi-grid-col" style="width:' + 100 / this.options.getGridColumns() + '%;"></div>');
  3430. e.append(i);
  3431. }
  3432. var o = this.getGridColumnsFooterFormatter();
  3433. if (o) {
  3434. var r = $('<div class="hiprint-gridColumnsFooter"></div>');
  3435. r.append(o(this.options, this.getData(t), t, [])), e.append(r);
  3436. }
  3437. return new _table_GridColumnsStructure__WEBPACK_IMPORTED_MODULE_8__.a(this.options.getGridColumns(), e);
  3438. }, TablePrintElement.prototype.createtempEmptyRowsTargetStructure = function (t) {
  3439. if (this.getField()) return this.createTarget(this.printElementType.title, []);
  3440. var e = this.createTarget(this.printElementType.title, []).clone();
  3441. return e.find(".hiprint-printElement-tableTarget tbody tr").remove(), e;
  3442. }, TablePrintElement.prototype.getTableHtml = function (t, e) {
  3443. var n, i;
  3444. if (!this.getField() && this.options.content) return (n = $("<div></div>")).append(this.options.content), (i = n.find("table")).addClass("hiprint-printElement-tableTarget"), i;
  3445. if (this.printElementType.formatter) return (n = $("<div></div>")).append(this.printElementType.formatter(t)), (i = n.find("table")).addClass("hiprint-printElement-tableTarget"), i;
  3446. var o = $('<table class="hiprint-printElement-tableTarget" style="border-collapse: collapse;"></table>');
  3447. return o.append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableHead(this.getColumns(), this.options.getWidth() / this.options.getGridColumns())), o.append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableRow(this.getColumns(), t, this.options, this.printElementType)), this.getFooterFormatter() && ("no" == this.options.tableFooterRepeat || ("last" == this.options.tableFooterRepeat ? o.find("tbody").append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableFooter(this.printElementType.columns, t, this.options, this.printElementType, e, t).html()) : o.append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableFooter(this.printElementType.columns, t, this.options, this.printElementType, e, [])))), o;
  3448. }, TablePrintElement.prototype.getEmptyRowTarget = function () {
  3449. return _table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createEmptyRowTarget(this.getColumns());
  3450. }, TablePrintElement.prototype.getHtml = function (t, e) {
  3451. this.createTempContainer();
  3452. var n = this.getPaperHtmlResult(t, e);
  3453. return this.removeTempContainer(), n;
  3454. }, TablePrintElement.prototype.getPaperHtmlResult = function (t, e) {
  3455. var n = [],
  3456. i = this.getData(e),
  3457. o = this.getTableHtml(i, e),
  3458. r = this.createtempEmptyRowsTargetStructure(e);
  3459. e ? this.updateTargetWidth(r) : this.updateTargetSize(r), this.css(r, i), this.css(o, i), this.getTempContainer().html(""), this.getTempContainer().append(r);
  3460. for (var a, p = this.getBeginPrintTopInPaperByReferenceElement(t), s = 0, l = !1; !l;) {
  3461. var u = 0,
  3462. d = t.getPaperFooter(s);
  3463. 0 == s && p > d && (p = p - d + t.paperHeader, n.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_2__.a({
  3464. target: void 0,
  3465. printLine: void 0
  3466. })), u = t.getContentHeight(s) - (p - t.paperHeader), s++ , d = t.getPaperFooter(s));
  3467. var c = n.length > 0 ? n[n.length - 1].target : void 0,
  3468. h = this.getRowsInSpecificHeight(e, u > 0 ? u : 0 == s ? d - p : t.getContentHeight(s), r, o, s, c);
  3469. l = h.isEnd;
  3470. var f = void 0;
  3471. h.target && (h.target.css("left", this.options.displayLeft()), h.target[0].height = ""), 0 == s || u > 0 ? (h.target && (a = p, h.target.css("top", p + "pt")), f = l && null != this.options.lHeight ? p + (h.height > this.options.lHeight ? h.height : this.options.lHeight) : p + h.height) : (h.target && (a = t.paperHeader, h.target.css("top", t.paperHeader + "pt")), f = t.paperHeader + h.height), n.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_2__.a({
  3472. target: h.target,
  3473. printLine: f,
  3474. referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_4__.a({
  3475. top: this.options.getTop(),
  3476. left: this.options.getLeft(),
  3477. height: this.options.getHeight(),
  3478. width: this.options.getWidth(),
  3479. beginPrintPaperIndex: t.index,
  3480. bottomInLastPaper: f,
  3481. printTopInPaper: a
  3482. })
  3483. })), s++;
  3484. }
  3485. return n;
  3486. }, TablePrintElement.prototype.getRowsInSpecificHeight = function (t, e, n, i, o, r) {
  3487. var a = i.find("tbody"),
  3488. p = _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.pt.toPx(e);
  3489. n.find(".hiprint-printElement-tableTarget tbody").html("");
  3490. var s = n.outerHeight();
  3491. if (s > p) return {
  3492. target: void 0,
  3493. length: 0,
  3494. height: 0,
  3495. isEnd: !1
  3496. };
  3497. for (var l = [], u = 0; u < this.options.getGridColumns(); u++) {
  3498. for (var d = n.find(".hiprint-printElement-tableTarget:eq(" + u + ")"), c = void 0, h = []; ;) {
  3499. if (s <= p) if (0 == a.find("tr").length) c = {
  3500. height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(s),
  3501. isEnd: !0
  3502. }, t && this.options.autoCompletion && (this.autoCompletion(p, d), s = n.outerHeight()); else {
  3503. var f = a.find("tr:lt(1)");
  3504. d.find("tbody").append(f);
  3505. var g = f.data("rowData");
  3506. l.push(g), h.push(g), (s = n.outerHeight()) > p && (a.prepend(f), l.pop(), h.pop(), s = n.outerHeight(), c = {
  3507. height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(s),
  3508. isEnd: !1
  3509. });
  3510. }
  3511. if (c) {
  3512. if (this.getFooterFormatter()) d.find("tfoot").length && d.find("tfoot").html(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableFooter(this.printElementType.columns, this.getData(t), this.options, this.printElementType, t, h).html());
  3513. break;
  3514. }
  3515. }
  3516. }
  3517. var m = n.find(".hiprint-printElement-tableTarget tbody tr").length,
  3518. v = this.getGridColumnsFooterFormatter();
  3519. return v && n.find(this.gridColumnsFooterCss).html(v(this.options, this.getData(t), t, l)), 0 == a.find("tr").length ? 0 == m && r ? {
  3520. target: void 0,
  3521. length: 0,
  3522. height: 0,
  3523. isEnd: !0
  3524. } : {
  3525. target: n.clone(),
  3526. length: m,
  3527. height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(s),
  3528. isEnd: !0
  3529. } : {
  3530. target: n.clone(),
  3531. length: m,
  3532. height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(s),
  3533. isEnd: !1
  3534. };
  3535. }, TablePrintElement.prototype.autoCompletion = function (t, e) {
  3536. for (var n, i = this.getEmptyRowTarget(), o = e.outerHeight(); t > o;) {
  3537. n = i.clone(), e.find("tbody").append(n), o = e.outerHeight();
  3538. }
  3539. n && n.remove();
  3540. }, TablePrintElement.prototype.getData = function (t) {
  3541. if (!t) return [{}];
  3542. var e = t[this.getField()];
  3543. return e ? JSON.parse(JSON.stringify(e)) : [];
  3544. }, TablePrintElement.prototype.onResize = function (t, e, n, i, o) {
  3545. _super.prototype.updateSizeAndPositionOptions.call(this, o, i, n, e), _table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.resizeTableCellWidth(this.designTarget, this.getColumns(), this.options.getWidth());
  3546. }, TablePrintElement.prototype.getReizeableShowPoints = function () {
  3547. return ["s", "e"];
  3548. }, TablePrintElement.prototype.design = function (t, e) {
  3549. var n = this;
  3550. this.designTarget.hidraggable({
  3551. handle: this.designTarget.find(".hiprint-printElement-table-handle"),
  3552. axis: n.options.axis && t && t.axisEnabled ? n.options.axis : void 0,
  3553. onDrag: function onDrag(t, i, o) {
  3554. n.updateSizeAndPositionOptions(i, o), n.createLineOfPosition(e);
  3555. },
  3556. moveUnit: "pt",
  3557. minMove: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance,
  3558. onBeforeDrag: function onBeforeDrag(t) {
  3559. _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !0, n.createLineOfPosition(e);
  3560. },
  3561. onStopDrag: function onStopDrag(t) {
  3562. _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !1, n.removeLineOfPosition();
  3563. }
  3564. }), this.printElementType.editable && this.setHitable(), this.setColumnsOptions(), this.designTarget.hireizeable({
  3565. showPoints: n.getReizeableShowPoints(),
  3566. noContainer: !0,
  3567. onBeforeResize: function onBeforeResize() {
  3568. _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !0;
  3569. },
  3570. onResize: function onResize(t, i, o, r, a) {
  3571. n.onResize(t, i, o, r, a), n.hitable && n.hitable.updateColumnGrips(), n.createLineOfPosition(e);
  3572. },
  3573. onStopResize: function onStopResize() {
  3574. _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !1, n.removeLineOfPosition();
  3575. }
  3576. }), this.bingKeyboardMoveEvent(this.designTarget, e);
  3577. }, TablePrintElement.prototype.setHitable = function () {
  3578. var t = this;
  3579. this.hitable = new _hitable_HiTale__WEBPACK_IMPORTED_MODULE_7__.a({
  3580. table: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)"),
  3581. rows: this.getColumns(),
  3582. resizeRow: !1,
  3583. resizeColumn: !0,
  3584. trs: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("tbody tr"),
  3585. handle: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead"),
  3586. isEnableEdit: this.printElementType.editable,
  3587. columnDisplayEditable: this.printElementType.columnDisplayEditable,
  3588. columnDisplayIndexEditable: this.printElementType.columnDisplayIndexEditable,
  3589. columnResizable: this.printElementType.columnResizable,
  3590. columnAlignEditable: this.printElementType.columnAlignEditable,
  3591. isEnableEditText: this.printElementType.columnTitleEditable,
  3592. isEnableEditField: !1,
  3593. isEnableContextMenu: !0,
  3594. isEnableInsertRow: !1,
  3595. isEnableDeleteRow: !1,
  3596. isEnableInsertColumn: !1,
  3597. isEnableDeleteColumn: !1,
  3598. isEnableMergeCell: !1
  3599. }), _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.on("updateTable" + this.hitable.id, function () {
  3600. t.updateDesignViewFromOptions();
  3601. });
  3602. }, TablePrintElement.prototype.setColumnsOptions = function () {
  3603. var t = this;
  3604. this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead td").bind("click.hiprint", function (e) {
  3605. var n = $(e.target).attr("column-id"),
  3606. i = t.getColumnByColumnId(n);
  3607. if (i) {
  3608. var o = t.getPrintElementOptionItemsByName("tableColumn");
  3609. _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger(t.getPrintElementSelectEventKey(), {
  3610. printElement: t,
  3611. customOptionsInput: [{
  3612. title: i.title + "-列属性",
  3613. optionItems: o,
  3614. options: i,
  3615. callback: function callback(t) {
  3616. o.forEach(function (t) {
  3617. var e = t.getValue();
  3618. i[t.name] = e;
  3619. });
  3620. }
  3621. }]
  3622. });
  3623. } else _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger(t.getPrintElementSelectEventKey(), {
  3624. printElement: t
  3625. });
  3626. });
  3627. }, TablePrintElement.prototype.filterOptionItems = function (t) {
  3628. var e = _super.prototype.filterOptionItems.call(this, t);
  3629. return this.printElementType.editable && 1 == this.options.columns.length ? e : t.filter(function (t) {
  3630. return "columns" != t.name;
  3631. });
  3632. }, TablePrintElement.prototype.getFooterFormatter = function () {
  3633. var footerFormatter = void 0;
  3634. if (this.printElementType.footerFormatter && (footerFormatter = this.printElementType.footerFormatter), this.options.footerFormatter) try {
  3635. var s = "footerFormatter=" + this.options.footerFormatter;
  3636. eval(s);
  3637. } catch (t) {
  3638. console.log(t);
  3639. }
  3640. return footerFormatter;
  3641. }, TablePrintElement.prototype.getGridColumnsFooterFormatter = function () {
  3642. var gridColumnsFooterFormatter = void 0;
  3643. if (this.printElementType.gridColumnsFooterFormatter && (gridColumnsFooterFormatter = this.printElementType.gridColumnsFooterFormatter), this.options.gridColumnsFooterFormatter) try {
  3644. var s = "gridColumnsFooterFormatter=" + this.options.gridColumnsFooterFormatter;
  3645. eval(s);
  3646. } catch (t) {
  3647. console.log(t);
  3648. }
  3649. return gridColumnsFooterFormatter;
  3650. }, TablePrintElement;
  3651. }(_BasePrintElement__WEBPACK_IMPORTED_MODULE_0__.a);
  3652. }, function (t, e, n) {
  3653. "use strict";
  3654. var i = function () {
  3655. return function (t) {
  3656. this.table = t.table, this.isEnableEdit = t.isEnableEdit, this.trs = t.trs, this.resizeRow = t.resizeRow, this.resizeColumn = t.resizeColumn, this.isEnableEditField = t.isEnableEditField, this.isEnableContextMenu = t.isEnableContextMenu, this.isEnableEditField = t.isEnableEditField, this.isEnableInsertRow = t.isEnableInsertRow, this.isEnableDeleteRow = t.isEnableDeleteRow, this.isEnableInsertColumn = t.isEnableInsertColumn, this.isEnableDeleteColumn = t.isEnableDeleteColumn, this.isEnableMergeCell = t.isEnableMergeCell, this.columnResizable = t.columnResizable, this.columnAlignEditable = t.columnAlignEditable;
  3657. };
  3658. }(),
  3659. o = function () {
  3660. function t(t) {
  3661. this.options = new i(t);
  3662. }
  3663. return t.prototype.enableEidt = function () {
  3664. this.options.isEnableEdit;
  3665. }, t.prototype.disableEdit = function () {
  3666. this.options.isEnableEdit;
  3667. }, t.prototype.isEnableEdit = function () {
  3668. return this.options.isEnableEdit;
  3669. }, t;
  3670. }(),
  3671. r = n(0),
  3672. a = function () {
  3673. return function (t) {
  3674. this.cell = t.cell, this.link = t.link, this.linkType = t.linkType, this.bottom = t.bottom, this.rightMost = t.rightMost, this.rowLevel = t.rowLevel, this.columnLevel = t.columnLevel, this.indexInTableGridRow = t.indexInTableGridRow, this.indexInTableGridColumn = t.indexInTableGridColumn;
  3675. };
  3676. }(),
  3677. p = n(10),
  3678. s = function () {
  3679. function t() { }
  3680. return t.getLeftTableCell = function (t, e) {
  3681. var n;
  3682. return t.forEach(function (t, i) {
  3683. t.cell && i < e && (n = t.cell);
  3684. }), n;
  3685. }, t.getIndex = function (t, e) {
  3686. var n;
  3687. return t.forEach(function (t, i) {
  3688. t.cell && t.cell.id == e && (n = i);
  3689. }), n;
  3690. }, t;
  3691. }(),
  3692. l = n(13),
  3693. u = n(11),
  3694. d = function () {
  3695. return function (t, e) {
  3696. this.target = t, this.grips = e;
  3697. };
  3698. }(),
  3699. c = function () {
  3700. return function (t) {
  3701. this.target = t;
  3702. };
  3703. }(),
  3704. h = function () {
  3705. return function () {
  3706. this.rowColumns = [];
  3707. };
  3708. }(),
  3709. f = function () {
  3710. function t() { }
  3711. return t.getColumnsWidth = function (e, n) {
  3712. var i = {},
  3713. o = t.allAutoWidth(e);
  3714. return e.rowColumns.forEach(function (t) {
  3715. var e = n - 0,
  3716. r = t.width / o * (e > 0 ? e : 0);
  3717. i[t.id] = r;
  3718. }), i;
  3719. }, t.resizeTableCellWeight = function (t) {
  3720. t.forEach(function (t) {
  3721. t.columns.forEach(function (t) {
  3722. t.hasWidth && $(t.getTarget()).css("width", t.width + "pt");
  3723. });
  3724. });
  3725. }, t.allAutoWidth = function (t) {
  3726. var e = 0;
  3727. return t.rowColumns.forEach(function (t) {
  3728. e += t.width;
  3729. }), e;
  3730. }, t.reconsitutionTableColumnTree = function (t, e, n) {
  3731. for (var i = e || new h(), o = function o(e) {
  3732. i.totalLayer = e + 1, i[e] = t[e].columns, i.rowColumns = i.rowColumns.concat(i[e].filter(function (n) {
  3733. return n.rowspan == t.length - e;
  3734. }));
  3735. }, r = 0; r < t.length; r++) {
  3736. o(r);
  3737. }
  3738. return i;
  3739. }, t;
  3740. }(),
  3741. g = n(2),
  3742. m = function () {
  3743. function t(t) {
  3744. this.signature = "HiTresizer", this.hitable = t, this.rows = t.rows, this.target = t.target;
  3745. }
  3746. return t.prototype.init = function () {
  3747. this.addResizeRowAndColumn(), this.hitable.optionsCoat.options.resizeColumn && this.createColumnGrips(), this.hitable.optionsCoat.options.resizeRow && this.createRowGrips();
  3748. }, t.prototype.resizeTableCellWidth = function () {
  3749. f.resizeTableCellWeight(this.rows);
  3750. }, t.prototype.addResizeRowAndColumn = function () { }, t.prototype.createColumnGrips = function () {
  3751. var t = this,
  3752. e = this,
  3753. n = [],
  3754. i = $('<div class="columngrips"/>');
  3755. i.width(this.target.width()), this.rows.forEach(function (o) {
  3756. o.columns.forEach(function (o, a) {
  3757. if (o.getTarget().attr("haswidth")) {
  3758. var p = $('<div class="columngrip"><div class="gripResizer"></div></div>');
  3759. i.append(p);
  3760. var s = new c(p);
  3761. n.length > 0 && (n[n.length - 1].nextGrip = s), n.push(s), t.syncGrips(o, s), $(p).hidraggable({
  3762. axis: "h",
  3763. onDrag: function onDrag(t, e, n) { },
  3764. moveUnit: "pt",
  3765. minMove: 1,
  3766. onBeforeDrag: function onBeforeDrag(t) {
  3767. if (g.a.instance.draging = !0, !s.nextGrip) return !1;
  3768. e.dragingGrip = s, e.dragingGrip.left = parseFloat(e.dragingGrip.target.css("left").replace("px", "")), s.target.addClass("columngripDraging");
  3769. },
  3770. onStopDrag: function onStopDrag(n) {
  3771. g.a.instance.draging = !1;
  3772. var i = parseFloat(e.dragingGrip.target.css("left").replace("px", "")),
  3773. o = r.a.px.toPt(i - e.dragingGrip.left);
  3774. s.cell.width = s.cell.width + o, s.nextGrip.cell.width = s.nextGrip.cell.width - o, t.resizeTableCellWidth(), s.target.removeClass("columngripDraging"), e.updateColumnGrips();
  3775. }
  3776. });
  3777. }
  3778. });
  3779. }), this.target.before(i), this.cgripContariner = new d(i, n);
  3780. }, t.prototype.updateColumnGrips = function () {
  3781. this.cgripContariner && (this.cgripContariner.target.remove(), this.createColumnGrips());
  3782. }, t.prototype.updateRowGrips = function () {
  3783. this.rgripContariner && (this.rgripContariner.target.remove(), this.createRowGrips());
  3784. }, t.prototype.createRowGrips = function () {
  3785. var t = this,
  3786. e = this,
  3787. n = [],
  3788. i = $('<div class="rowgrips"/>');
  3789. this.rows.forEach(function (o, a) {
  3790. var p = $('<div class="rowgrip"><div class="gripResizer"></div></div>');
  3791. i.append(p);
  3792. var s = new c(p);
  3793. n.push(s), a > 0 && a < t.rows.length && $(p).hidraggable({
  3794. axis: "v",
  3795. onDrag: function onDrag(t, e, n) { },
  3796. moveUnit: "pt",
  3797. minMove: 1,
  3798. onBeforeDrag: function onBeforeDrag(t) {
  3799. e.dragingGrip = s, e.dragingGrip.top = parseFloat(e.dragingGrip.target.css("top").replace("px", "")), s.target.addClass("rowgripDraging");
  3800. },
  3801. onStopDrag: function onStopDrag(t) {
  3802. var n = parseFloat(e.dragingGrip.target.css("top").replace("px", "")),
  3803. i = r.a.px.toPt(n - e.dragingGrip.top + e.rows[a].columns[0].getTarget().height());
  3804. e.rows[a].columns[0].getTarget().css("height", i + "pt"), e.syncRowGrips(), s.target.removeClass("rowgripDraging");
  3805. }
  3806. });
  3807. }), this.target.before(i), this.rgripContariner = new d(i, n), this.syncRowGrips();
  3808. }, t.prototype.syncGrips = function (t, e) {
  3809. var n = t.getTarget();
  3810. e.cell = t, e.target.css({
  3811. left: n.offset().left - this.target.offset().left + n.outerWidth(!1),
  3812. height: 30
  3813. });
  3814. }, t.prototype.syncRowGrips = function () {
  3815. var t = this;
  3816. this.rgripContariner.target.height(this.target.height()), this.rows.forEach(function (e, n) {
  3817. var i = e.columns[0].getTarget();
  3818. t.rgripContariner.grips[n].target.css({
  3819. top: i.offset().top - t.target.offset().top + i.outerHeight(!1),
  3820. width: 30
  3821. });
  3822. });
  3823. }, t.prototype.addResizerHeadRow = function () {
  3824. this.target.find("thead").prepend();
  3825. }, t;
  3826. }(),
  3827. v = function () {
  3828. function t() { }
  3829. return t.prototype.init = function () { }, t.prototype.updateRowGrips = function () { }, t.prototype.updateColumnGrips = function () { }, t;
  3830. }();
  3831. n.d(e, "a", function () {
  3832. return y;
  3833. });
  3834. var y = function () {
  3835. function t(t) {
  3836. this.id = u.a.createId(), this.optionsCoat = new o(t), this.handle = t.handle, this.target = t.table, this.initRows(t.rows), this.init(t), this.tableCellSelector = new p.a(this.rows, this.target), this.resizer = this.optionsCoat.options.columnResizable ? new m(this) : new v(), this.resizer.init();
  3837. }
  3838. return t.prototype.insertRow = function (t, e, n) {
  3839. var i = e || this.tableCellSelector.getSingleSelect(),
  3840. o = i.cell,
  3841. a = this.rows[i.rowIndex],
  3842. p = i.rowIndex,
  3843. s = this.getCellGrid(),
  3844. u = new l.a();
  3845. if (u.init(this.optionsCoat, void 0, a.isHead), n && u.getTarget().addClass(n), "above" == t) s[p].forEach(function (t) {
  3846. var e = t.link ? t.link : t.cell,
  3847. n = e.width / e.colspan;
  3848. if (0 == t.columnLevel) {
  3849. var i = u.createTableCell();
  3850. i.width = n, u.insertCellToLast(i);
  3851. } else {
  3852. if ("column" == t.linkType) {
  3853. var o = t.link.getTarget();
  3854. t.link.rowspan += 1, o.attr("rowspan", t.link.rowspan);
  3855. }
  3856. t.linkType;
  3857. }
  3858. }), this.rows.splice(p, 0, u), a.getTarget().before(u.getTarget()), r.a.event.trigger("newRow" + this.id, u); else {
  3859. var d = p + o.rowspan - 1;
  3860. s[d].forEach(function (t) {
  3861. var e = t.link ? t.link : t.cell,
  3862. n = e.width / e.colspan;
  3863. if (t.bottom) {
  3864. var i = u.createTableCell();
  3865. i.width = n, u.insertCellToLast(i);
  3866. } else {
  3867. if (t.cell) {
  3868. var o = t.cell.getTarget();
  3869. t.cell.rowspan += 1, o.attr("rowspan", t.cell.rowspan);
  3870. }
  3871. if ("column" == t.linkType) {
  3872. o = t.link.getTarget();
  3873. t.link.rowspan += 1, o.attr("rowspan", t.link.rowspan);
  3874. }
  3875. }
  3876. }), this.rows.splice(d + 1, 0, u), this.rows[d].getTarget().after(u.getTarget()), r.a.event.trigger("newRow" + this.id, u);
  3877. }
  3878. }, t.prototype.insertColumn = function (t, e, n, i) {
  3879. var o = this,
  3880. a = this.rows.concat(this.trRows),
  3881. p = e || this.tableCellSelector.getSingleSelect(),
  3882. s = p.cell,
  3883. l = p.rowIndex,
  3884. u = this.getCellGrid(a),
  3885. d = u[l].filter(function (t) {
  3886. return t.cell && t.cell.id == s.id || t.link && t.link.id == s.id;
  3887. });
  3888. if ("left" == t) {
  3889. var c = d[0].indexInTableGridRow;
  3890. u.forEach(function (t, e) {
  3891. var p = t[c],
  3892. s = t.filter(function (t, e) {
  3893. return e >= c && t.cell;
  3894. });
  3895. if (0 == p.rowLevel) {
  3896. var l = a[e],
  3897. u = a[e].createTableCell();
  3898. n && u.getTarget().addClass(n), null != i && (u.width = i), s.length ? l.insertToTargetCellLeft(s[0].cell, u) : l.insertCellToLast(u), r.a.event.trigger("newCell" + o.id, u);
  3899. } else if ("row" == p.linkType) {
  3900. var d = p.link.getTarget();
  3901. p.link.colspan += 1, d.attr("colspan", p.link.colspan);
  3902. }
  3903. });
  3904. } else {
  3905. var h = d[d.length - 1].indexInTableGridRow;
  3906. u.forEach(function (t, e) {
  3907. var p = t[h],
  3908. s = t.filter(function (t, e) {
  3909. return e <= h && t.cell;
  3910. });
  3911. if (p.rightMost) {
  3912. var l = a[e],
  3913. u = l.createTableCell();
  3914. n && u.getTarget().addClass(n), null != i && (u.width = i), s.length ? l.insertToTargetCellRight(s[s.length - 1].cell, u) : l.insertCellToFirst(u), r.a.event.trigger("newCell" + o.id, u);
  3915. } else {
  3916. var d = p.link || p.cell;
  3917. if ("row" == p.linkType) {
  3918. var c = d.getTarget();
  3919. d.colspan += 1, c.attr("colspan", d.colspan);
  3920. }
  3921. if (p.cell) {
  3922. c = d.getTarget();
  3923. d.colspan += 1, c.attr("colspan", d.colspan);
  3924. }
  3925. }
  3926. });
  3927. }
  3928. }, t.prototype.deleteRow = function () {
  3929. var t = this,
  3930. e = this.tableCellSelector.getSingleSelect(),
  3931. n = (e.cell, this.rows[e.rowIndex], e.rowIndex),
  3932. i = this.getCellGrid(),
  3933. o = this.rows[n];
  3934. i[n].forEach(function (e, r) {
  3935. if (e.cell) {
  3936. if (1 == e.cell.rowspan) o.removeCell(e.cell); else {
  3937. o.removeCell(e.cell);
  3938. var a = i[n + 1].filter(function (t, e) {
  3939. return t.cell && e > r;
  3940. }),
  3941. p = t.rows[n + 1],
  3942. s = p.createTableCell(e.cell.rowspan - 1, e.cell.colspan);
  3943. a.length ? p.insertToTargetCellLeft(a[0].cell, s) : p.insertCellToLast(s);
  3944. }
  3945. } else if ("column" == e.linkType) {
  3946. var l = e.link;
  3947. l.rowspan -= 1, l.getTarget().attr("rowspan", l.rowspan);
  3948. }
  3949. }), o.getTarget().remove(), this.rows.splice(n, 1);
  3950. }, t.prototype.deleteColums = function () {
  3951. var t = this.rows.concat(this.trRows),
  3952. e = this.tableCellSelector.getSingleSelect(),
  3953. n = e.cell,
  3954. i = e.rowIndex,
  3955. o = this.getCellGrid(t),
  3956. r = o[i].filter(function (t) {
  3957. return t.cell && t.cell.id == n.id || t.link && t.link.id == n.id;
  3958. })[0].indexInTableGridRow;
  3959. o.forEach(function (e, n) {
  3960. var i = e[r];
  3961. i.cell ? 1 == i.cell.colspan ? t[n].removeCell(i.cell) : (i.cell.colspan -= 1, i.cell.getTarget().attr("colspan", i.cell.colspan)) : "row" == i.linkType && (i.link.colspan -= 1, i.link.getTarget().attr("colspan", i.link.colspan));
  3962. });
  3963. }, t.prototype.mergeCell = function () {
  3964. var t = this,
  3965. e = this.tableCellSelector.getSelectedCells();
  3966. if (0 != e.length) {
  3967. var n = e[0][0].cell;
  3968. e.forEach(function (i, o) {
  3969. i.forEach(function (i, r) {
  3970. 0 == o ? 0 != r && (n.colspan += i.cell.colspan, t.rows[i.rowIndex].removeCell(i.cell)) : t.rows[i.rowIndex].removeCell(i.cell), 0 == r && e[0][0].rowIndex + n.rowspan - 1 < i.rowIndex && (n.rowspan += i.cell.rowspan);
  3971. });
  3972. }), n.getTarget().attr("colspan", n.colspan), n.getTarget().attr("rowspan", n.rowspan), this.tableCellSelector.setSingleSelect(e[0][0]);
  3973. }
  3974. }, t.prototype.splitCell = function () {
  3975. var t = this.tableCellSelector.getSingleSelect(),
  3976. e = this.getCellGrid(),
  3977. n = s.getIndex(e[t.rowIndex], t.cell.id);
  3978. if (t) {
  3979. for (var i = t.rowIndex; i < t.rowIndex + t.cell.rowspan; i++) {
  3980. for (var o = this.rows[i], r = i == t.rowIndex ? t.cell : s.getLeftTableCell(e[i], n), a = 0; a < t.cell.colspan; a++) {
  3981. i == t.rowIndex && 0 == a || (r ? o.insertToTargetCellRight(r, o.createTableCell()) : o.insertCellToFirst(o.createTableCell()));
  3982. }
  3983. }
  3984. t.cell.rowspan = 1, t.cell.colspan = 1, t.cell.getTarget().attr("colspan", t.cell.colspan), t.cell.getTarget().attr("rowspan", t.cell.rowspan);
  3985. }
  3986. }, t.prototype.init = function (t) {
  3987. var e = this;
  3988. $(this.target).addClass("hitable"), this.optionsCoat.onBeforEdit = function (n) {
  3989. if (e.optionsCoat.options.onBeforEdit && !1 === t.onBeforEdit(n)) return !1;
  3990. return e.optionsCoat.editingCell && e.optionsCoat.editingCell.endEdit(), !0;
  3991. }, $(this.target).mousedown(function (t) {
  3992. e.optionsCoat.isLeftMouseButtonDown = !0;
  3993. }), $(this.target).mouseup(function (t) {
  3994. e.optionsCoat.isLeftMouseButtonDown = !1;
  3995. }), this.initContext(), this.target.on("mousemove", function (t) {
  3996. 1 === t.buttons && e.tableCellSelector.multipleSelectByXY(t.pageX, t.pageY);
  3997. }).on("mousedown", function (t) {
  3998. 1 === t.buttons && e.tableCellSelector.singleSelectByXY(t.pageX, t.pageY);
  3999. });
  4000. }, t.prototype.initRows = function (t) {
  4001. var e = this;
  4002. if (this.trRows = [], t) {
  4003. this.rows = t, t.forEach(function (t, n) {
  4004. t.init(e.optionsCoat, e.target.find("tr:eq(" + n + ")"), !0);
  4005. });
  4006. var n = this.optionsCoat.options.trs;
  4007. n && this.initRowsByTrs(n).forEach(function (t) {
  4008. e.trRows.push(t);
  4009. });
  4010. } else this.rows = this.initRowsByTrs(this.target.find("tr"));
  4011. }, t.prototype.initRowsByTrs = function (t) {
  4012. var e = this;
  4013. return t.map(function (t, n) {
  4014. var i = new l.a();
  4015. return i.init(e.optionsCoat, $(n)), i;
  4016. }).get();
  4017. }, t.prototype.enableEidt = function () {
  4018. this.optionsCoat.enableEidt();
  4019. }, t.prototype.disableEdit = function () {
  4020. this.optionsCoat.disableEdit();
  4021. }, t.prototype.getCellGrid = function (t) {
  4022. var e = t || this.rows,
  4023. n = this.getColumnStep(),
  4024. i = new Array();
  4025. return e.forEach(function (t, e) {
  4026. t.columns.forEach(function (t, o) {
  4027. for (var r = 0; r < t.colspan; r++) {
  4028. for (var p = 0, s = !1; p < n && !s;) {
  4029. if (i[e] = i[e] || [], i[e][p]); else {
  4030. i[e][p] = new a({
  4031. cell: 0 == r ? t : void 0,
  4032. link: 0 != r ? t : void 0,
  4033. linkType: r > 0 ? "row" : void 0,
  4034. rightMost: r == t.colspan - 1 || void 0,
  4035. bottom: 0 == t.rowspan - 1,
  4036. rowLevel: r,
  4037. columnLevel: 0,
  4038. indexInTableGridRow: p,
  4039. indexInTableGridColumn: e
  4040. });
  4041. for (var l = e + 1, u = 1; u < t.rowspan; u++) {
  4042. i[l] = i[l] || [], i[l][p] = new a({
  4043. cell: void 0,
  4044. link: t,
  4045. linkType: r > 0 ? "rowColumn" : "column",
  4046. rightMost: r == t.colspan - 1 || void 0,
  4047. bottom: u == t.rowspan - 1,
  4048. rowLevel: r,
  4049. columnLevel: u,
  4050. indexInTableGridRow: p,
  4051. indexInTableGridColumn: l
  4052. }), l += 1;
  4053. }
  4054. s = !0;
  4055. }
  4056. p++;
  4057. }
  4058. }
  4059. });
  4060. }), i;
  4061. }, t.prototype.setAlign = function (t) {
  4062. var e = this.tableCellSelector.getSingleSelect();
  4063. e && e.cell.setAlign(t);
  4064. }, t.prototype.setVAlign = function (t) {
  4065. var e = this.tableCellSelector.getSingleSelect();
  4066. e && e.cell.setVAlign(t);
  4067. }, t.prototype.getColumnStep = function (t) {
  4068. var e = 0;
  4069. return this.rows.length && this.rows[t || 0].columns.forEach(function (t) {
  4070. e += t.colspan;
  4071. }), e;
  4072. }, t.prototype.initContext = function () {
  4073. var t = this;
  4074. if (!this.optionsCoat.options.isEnableContextMenu) return !1;
  4075. $(this.handle).hicontextMenu({
  4076. menus: [{
  4077. text: "在上方插入行",
  4078. enabled: this.optionsCoat.options.isEnableInsertRow,
  4079. disable: function disable() {
  4080. return !t.tableCellSelector.getSingleSelect();
  4081. },
  4082. callback: function callback() {
  4083. t.insertRow("above"), t.resizer.updateRowGrips(), r.a.event.trigger("updateTable" + t.id);
  4084. }
  4085. }, {
  4086. text: "在下方插入行",
  4087. borderBottom: !0,
  4088. enabled: this.optionsCoat.options.isEnableInsertRow,
  4089. disable: function disable() {
  4090. return !t.tableCellSelector.getSingleSelect();
  4091. },
  4092. callback: function callback() {
  4093. t.insertRow("below"), t.resizer.updateRowGrips(), r.a.event.trigger("updateTable" + t.id);
  4094. }
  4095. }, {
  4096. text: "向左方插入列",
  4097. enabled: this.optionsCoat.options.isEnableInsertColumn,
  4098. disable: function disable() {
  4099. return !t.tableCellSelector.getSingleSelect();
  4100. },
  4101. callback: function callback() {
  4102. t.insertColumn("left"), t.resizer.updateColumnGrips(), r.a.event.trigger("updateTable" + t.id);
  4103. }
  4104. }, {
  4105. text: "向右方插入列",
  4106. enabled: this.optionsCoat.options.isEnableInsertColumn,
  4107. disable: function disable() {
  4108. return !t.tableCellSelector.getSingleSelect();
  4109. },
  4110. borderBottom: !0,
  4111. callback: function callback() {
  4112. t.insertColumn("right"), t.resizer.updateColumnGrips(), r.a.event.trigger("updateTable" + t.id);
  4113. }
  4114. }, {
  4115. text: "删除行",
  4116. enabled: this.optionsCoat.options.isEnableDeleteRow,
  4117. disable: function disable() {
  4118. return !t.tableCellSelector.getSingleSelect();
  4119. },
  4120. callback: function callback() {
  4121. t.deleteRow(), t.resizer.updateRowGrips(), r.a.event.trigger("updateTable" + t.id);
  4122. }
  4123. }, {
  4124. text: "删除列",
  4125. borderBottom: !0,
  4126. enabled: this.optionsCoat.options.isEnableDeleteColumn,
  4127. disable: function disable() {
  4128. return !t.tableCellSelector.getSingleSelect();
  4129. },
  4130. callback: function callback() {
  4131. t.deleteColums(), t.resizer.updateColumnGrips(), r.a.event.trigger("updateTable" + t.id);
  4132. }
  4133. }, {
  4134. text: "对齐",
  4135. borderBottom: !0,
  4136. enabled: this.optionsCoat.options.columnAlignEditable,
  4137. menus: [{
  4138. text: "左",
  4139. callback: function callback() {
  4140. t.setAlign("left");
  4141. }
  4142. }, {
  4143. text: "左右居中",
  4144. callback: function callback() {
  4145. t.setAlign("center");
  4146. }
  4147. }, {
  4148. text: "右",
  4149. callback: function callback() {
  4150. t.setAlign("right");
  4151. }
  4152. }, {
  4153. text: "默认",
  4154. borderBottom: !0,
  4155. callback: function callback() {
  4156. t.setAlign("");
  4157. }
  4158. }, {
  4159. text: "上",
  4160. callback: function callback() {
  4161. t.setVAlign("top");
  4162. }
  4163. }, {
  4164. text: "垂直居中",
  4165. callback: function callback() {
  4166. t.setVAlign("middle");
  4167. }
  4168. }, {
  4169. text: "下",
  4170. callback: function callback() {
  4171. t.setVAlign("bottom");
  4172. }
  4173. }, {
  4174. text: "默认",
  4175. callback: function callback() {
  4176. t.setVAlign("");
  4177. }
  4178. }]
  4179. }, {
  4180. text: "合并单元格",
  4181. enabled: this.optionsCoat.options.isEnableMergeCell,
  4182. disable: function disable() {
  4183. return t.tableCellSelector.getSingleSelect();
  4184. },
  4185. callback: function callback() {
  4186. t.mergeCell(), r.a.event.trigger("updateTable" + t.id);
  4187. }
  4188. }, {
  4189. text: "解开单元格",
  4190. enabled: this.optionsCoat.options.isEnableMergeCell,
  4191. disable: function disable() {
  4192. var e = t.tableCellSelector.getSingleSelect();
  4193. return !e || 1 == e.cell.rowspan && 1 == e.cell.colspan;
  4194. },
  4195. callback: function callback() {
  4196. t.splitCell(), r.a.event.trigger("updateTable" + t.id);
  4197. }
  4198. }].filter(function (t) {
  4199. return t.enabled;
  4200. })
  4201. });
  4202. }, t.prototype.getTableWidth = function () {
  4203. return r.a.px.toPt(this.target.outerWidth(!1));
  4204. }, t.prototype.updateColumnGrips = function () {
  4205. this.resizer.updateColumnGrips();
  4206. }, t.prototype.updateRowGrips = function () {
  4207. this.resizer.updateRowGrips();
  4208. }, t;
  4209. }();
  4210. }, function (t, e, n) {
  4211. "use strict";
  4212. n.d(e, "a", function () {
  4213. return i;
  4214. });
  4215. var i = function () {
  4216. return function (t, e, n) {
  4217. this.tid = t, this.options = e, this.printElementType = n;
  4218. };
  4219. }();
  4220. }, function (t, e, n) {
  4221. "use strict";
  4222. var i = n(3),
  4223. o = n(12),
  4224. r = (function () { }(), function () {
  4225. return function (t) {
  4226. this.width = t.width, this.title = t.title, this.columnId = t.columnId, this.fixed = !1, this.rowspan = t.rowspan || 1, this.colspan = t.colspan || 1, this.align = t.align, this.halign = t.halign, this.vAlign = t.vAlign, this.formatter2 = t.formatter2, this.styler2 = t.styler2;
  4227. };
  4228. }()),
  4229. a = n(5);
  4230. n.d(e, "a", function () {
  4231. return l;
  4232. });
  4233. var _p,
  4234. s = (_p = function p(t, e) {
  4235. return (_p = Object.setPrototypeOf || _instanceof({
  4236. __proto__: []
  4237. }, Array) && function (t, e) {
  4238. t.__proto__ = e;
  4239. } || function (t, e) {
  4240. for (var n in e) {
  4241. e.hasOwnProperty(n) && (t[n] = e[n]);
  4242. }
  4243. })(t, e);
  4244. }, function (t, e) {
  4245. function n() {
  4246. this.constructor = t;
  4247. }
  4248. _p(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n());
  4249. }),
  4250. l = function (t) {
  4251. function e(e, n) {
  4252. var i = this;
  4253. (e = e || {}, (i = t.call(this, e) || this).lHeight = e.lHeight, i.autoCompletion = e.autoCompletion, i.tableFooterRepeat = e.tableFooterRepeat, n) && (i.columns = [], n.editable && e.columns && e.columns.length ? e.columns.forEach(function (t) {
  4254. var e = [];
  4255. t.forEach(function (t) {
  4256. var i = new r(t),
  4257. o = n.getColumnByColumnId(i.columnId),
  4258. p = o ? $.extend(o, i) : new a.a(i);
  4259. p.checked = !0, e.push(p);
  4260. }), i.columns.push(new o.a(e));
  4261. }) : n.columns.forEach(function (t) {
  4262. i.columns.push(new o.a(t.filter(function (t) {
  4263. return t.checked;
  4264. })));
  4265. }));
  4266. return i;
  4267. }
  4268. return s(e, t), e.prototype.getColumnByColumnId = function (t) {
  4269. return this.makeColumnObj()[t];
  4270. }, e.prototype.makeColumnObj = function () {
  4271. var t = {};
  4272. return this.columns && this.columns.forEach(function (e) {
  4273. e.columns.forEach(function (e) {
  4274. e.columnId && (t[e.columnId] = e);
  4275. });
  4276. }), t;
  4277. }, e.prototype.getGridColumns = function () {
  4278. return this.gridColumns || 1;
  4279. }, e.prototype.getPrintElementOptionEntity = function () {
  4280. var e = t.prototype.getPrintElementOptionEntity.call(this);
  4281. return this.columns && (e.columns = [], this.columns.forEach(function (t) {
  4282. var n = t.getPrintElementOptionEntity().filter(function (t) {
  4283. return t.checked;
  4284. }).map(function (t) {
  4285. return new r(t);
  4286. });
  4287. e.columns.push(n);
  4288. })), e;
  4289. }, e;
  4290. }(i.a);
  4291. }, function (t, e, n) {
  4292. "use strict";
  4293. n.d(e, "a", function () {
  4294. return i;
  4295. });
  4296. var i = function () {
  4297. return function () {
  4298. this.rowColumns = [];
  4299. };
  4300. }();
  4301. }, function (t, e, n) {
  4302. "use strict";
  4303. n.d(e, "a", function () {
  4304. return i;
  4305. });
  4306. var i = function () {
  4307. function t(t, e) {
  4308. this.gridColumns = t, this.target = e;
  4309. }
  4310. return t.prototype.getByIndex = function (t) {
  4311. return this.target.find(".hi-grid-col:eq(" + t + ")");
  4312. }, t;
  4313. }();
  4314. }, function (t, e, n) {
  4315. t.exports = n(33);
  4316. }, function (t, e) {
  4317. !function (t) {
  4318. function e(e) {
  4319. var n = t.data(e.data.target, "hidraggable"),
  4320. i = n.options,
  4321. o = n.proxy,
  4322. r = e.data,
  4323. a = r.startLeft + e.pageX - r.startX,
  4324. p = r.startTop + e.pageY - r.startY;
  4325. o && (o.parent()[0] == document.body ? (a = null != i.deltaX && null != i.deltaX ? e.pageX + i.deltaX : e.pageX - e.data.offsetWidth, p = null != i.deltaY && null != i.deltaY ? e.pageY + i.deltaY : e.pageY - e.data.offsetHeight) : (null != i.deltaX && null != i.deltaX && (a += e.data.offsetWidth + i.deltaX), null != i.deltaY && null != i.deltaY && (p += e.data.offsetHeight + i.deltaY))), e.data.parent != document.body && (a += t(e.data.parent).scrollLeft(), p += t(e.data.parent).scrollTop()), "h" == i.axis ? r.left = a : "v" == i.axis ? r.top = p : (r.left = a, r.top = p);
  4326. }
  4327. function n(e) {
  4328. var n = t.data(e.data.target, "hidraggable"),
  4329. i = n.options,
  4330. o = n.proxy;
  4331. o || (o = t(e.data.target)), o.css({
  4332. left: t.fn.dragLengthC(e.data.left, i),
  4333. top: t.fn.dragLengthC(e.data.top, i)
  4334. }), t("body").css("cursor", i.cursor);
  4335. }
  4336. function i(i) {
  4337. t.fn.hidraggable.isDragging = !0;
  4338. var o = t.data(i.data.target, "hidraggable"),
  4339. r = o.options,
  4340. a = t(".hidroppable").filter(function () {
  4341. return i.data.target != this;
  4342. }).filter(function () {
  4343. var e = t.data(this, "hidroppable").options.accept;
  4344. return !e || t(e).filter(function () {
  4345. return this == i.data.target;
  4346. }).length > 0;
  4347. });
  4348. o.hidroppables = a;
  4349. var p = o.proxy;
  4350. return p || (r.proxy ? (p = "clone" == r.proxy ? t(i.data.target).clone().insertAfter(i.data.target) : r.proxy.call(i.data.target, i.data.target), o.proxy = p) : p = t(i.data.target)), p.css("position", "absolute"), e(i), n(i), r.onStartDrag.call(i.data.target, i), !1;
  4351. }
  4352. function o(i) {
  4353. var o = t.data(i.data.target, "hidraggable");
  4354. e(i), 0 != o.options.onDrag.call(i.data.target, i, t.fn.dragLengthCNum(i.data.left, o.options), t.fn.dragLengthCNum(i.data.top, o.options)) && n(i);
  4355. var r = i.data.target;
  4356. return o.hidroppables.each(function () {
  4357. var e = t(this);
  4358. if (!e.hidroppable("options").disabled) {
  4359. var n = e.offset();
  4360. i.pageX > n.left && i.pageX < n.left + e.outerWidth() && i.pageY > n.top && i.pageY < n.top + e.outerHeight() ? (this.entered || (t(this).trigger("_dragenter", [r]), this.entered = !0), t(this).trigger("_dragover", [r])) : this.entered && (t(this).trigger("_dragleave", [r]), this.entered = !1);
  4361. }
  4362. }), !1;
  4363. }
  4364. function r(e) {
  4365. t.fn.hidraggable.isDragging = !1, o(e);
  4366. var n,
  4367. i,
  4368. r = t.data(e.data.target, "hidraggable"),
  4369. a = r.proxy,
  4370. p = r.options;
  4371. p.revert ? 1 == l() ? t(e.data.target).css({
  4372. position: e.data.startPosition,
  4373. left: e.data.startLeft,
  4374. top: e.data.startTop
  4375. }) : a ? (a.parent()[0] == document.body ? (n = e.data.startX - e.data.offsetWidth, i = e.data.startY - e.data.offsetHeight) : (n = e.data.startLeft, i = e.data.startTop), a.animate({
  4376. left: n,
  4377. top: i
  4378. }, function () {
  4379. s();
  4380. })) : t(e.data.target).animate({
  4381. left: e.data.startLeft,
  4382. top: e.data.startTop
  4383. }, function () {
  4384. t(e.data.target).css("position", e.data.startPosition);
  4385. }) : (t(e.data.target).css({
  4386. position: "absolute",
  4387. left: t.fn.dragLengthC(e.data.left, p),
  4388. top: t.fn.dragLengthC(e.data.top, p)
  4389. }), l());
  4390. function s() {
  4391. a && a.remove(), r.proxy = null;
  4392. }
  4393. function l() {
  4394. var n = !1;
  4395. return r.hidroppables.each(function () {
  4396. var i = t(this);
  4397. if (!i.hidroppable("options").disabled) {
  4398. var o = i.offset();
  4399. return e.pageX > o.left && e.pageX < o.left + i.outerWidth() && e.pageY > o.top && e.pageY < o.top + i.outerHeight() ? (p.revert && t(e.data.target).css({
  4400. position: e.data.startPosition,
  4401. left: e.data.startLeft,
  4402. top: e.data.startTop
  4403. }), t(this).trigger("_drop", [e.data.target]), s(), n = !0, this.entered = !1, !1) : void 0;
  4404. }
  4405. }), n || p.revert || s(), n;
  4406. }
  4407. return p.onStopDrag.call(e.data.target, e), t(document).unbind(".hidraggable"), setTimeout(function () {
  4408. t("body").css("cursor", "");
  4409. }, 100), !1;
  4410. }
  4411. t.fn.hidraggable = function (e, n) {
  4412. return "string" == typeof e ? t.fn.hidraggable.methods[e](this, n) : this.each(function () {
  4413. var n,
  4414. a = t.data(this, "hidraggable");
  4415. a ? (a.handle.unbind(".hidraggable"), n = t.extend(a.options, e)) : n = t.extend({}, t.fn.hidraggable.defaults, t.fn.hidraggable.parseOptions(this), e || {});
  4416. var p = n.handle ? "string" == typeof n.handle ? t(n.handle, this) : n.handle : t(this);
  4417. function s(e) {
  4418. var n = t.data(e.data.target, "hidraggable"),
  4419. i = n.handle,
  4420. o = t(i).offset(),
  4421. r = t(i).outerWidth(),
  4422. a = t(i).outerHeight(),
  4423. p = e.pageY - o.top,
  4424. s = o.left + r - e.pageX,
  4425. l = o.top + a - e.pageY,
  4426. u = e.pageX - o.left;
  4427. return Math.min(p, s, l, u) > n.options.edge;
  4428. }
  4429. t.data(this, "hidraggable", {
  4430. options: n,
  4431. handle: p
  4432. }), n.disabled ? t(this).css("cursor", "") : p.unbind(".hidraggable").bind("mousemove.hidraggable", {
  4433. target: this
  4434. }, function (e) {
  4435. if (!t.fn.hidraggable.isDragging) {
  4436. var n = t.data(e.data.target, "hidraggable").options;
  4437. s(e) ? t(this).css("cursor", n.cursor) : t(this).css("cursor", "");
  4438. }
  4439. }).bind("mouseleave.hidraggable", {
  4440. target: this
  4441. }, function (e) {
  4442. t(this).css("cursor", "");
  4443. }).bind("mousedown.hidraggable", {
  4444. target: this
  4445. }, function (e) {
  4446. if (0 != s(e)) {
  4447. t(this).css("cursor", "");
  4448. var n = t(e.data.target).position(),
  4449. a = t(e.data.target).offset(),
  4450. p = {
  4451. startPosition: t(e.data.target).css("position"),
  4452. startLeft: n.left,
  4453. startTop: n.top,
  4454. left: n.left,
  4455. top: n.top,
  4456. startX: e.pageX,
  4457. startY: e.pageY,
  4458. offsetWidth: e.pageX - a.left,
  4459. offsetHeight: e.pageY - a.top,
  4460. target: e.data.target,
  4461. parent: t(e.data.target).parent()[0]
  4462. };
  4463. t.extend(e.data, p), 0 != t.data(e.data.target, "hidraggable").options.onBeforeDrag.call(e.data.target, e) && (t(document).bind("mousedown.hidraggable", e.data, i), t(document).bind("mousemove.hidraggable", e.data, o), t(document).bind("mouseup.hidraggable", e.data, r));
  4464. }
  4465. });
  4466. });
  4467. }, t.fn.hidraggable.methods = {
  4468. options: function options(e) {
  4469. return t.data(e[0], "hidraggable").options;
  4470. },
  4471. proxy: function proxy(e) {
  4472. return t.data(e[0], "hidraggable").proxy;
  4473. },
  4474. enable: function enable(e) {
  4475. return e.each(function () {
  4476. t(this).hidraggable({
  4477. disabled: !1
  4478. });
  4479. });
  4480. },
  4481. disable: function disable(e) {
  4482. return e.each(function () {
  4483. t(this).hidraggable({
  4484. disabled: !0
  4485. });
  4486. });
  4487. }
  4488. }, t.fn.hidraggable.parseOptions = function (e) {
  4489. var n = t(e);
  4490. return t.extend({}, t.hiprintparser.parseOptions(e, ["cursor", "handle", "axis", {
  4491. revert: "boolean",
  4492. deltaX: "number",
  4493. deltaY: "number",
  4494. edge: "number"
  4495. }]), {
  4496. disabled: !!n.attr("disabled") || void 0
  4497. });
  4498. }, t.fn.hidraggable.defaults = {
  4499. proxy: null,
  4500. revert: !1,
  4501. cursor: "move",
  4502. deltaX: null,
  4503. deltaY: null,
  4504. handle: null,
  4505. disabled: !1,
  4506. edge: 0,
  4507. axis: null,
  4508. onBeforeDrag: function onBeforeDrag(t) { },
  4509. onStartDrag: function onStartDrag(t) { },
  4510. onDrag: function onDrag(t) { },
  4511. onStopDrag: function onStopDrag(t) { }
  4512. }, t.fn.hidraggable.isDragging = !1;
  4513. }(jQuery);
  4514. }, function (t, e) {
  4515. !function (t) {
  4516. t.fn.hidroppable = function (e, n) {
  4517. return "string" == typeof e ? t.fn.hidroppable.methods[e](this, n) : (e = e || {}, this.each(function () {
  4518. var n,
  4519. i = t.data(this, "hidroppable");
  4520. i ? t.extend(i.options, e) : (t(n = this).addClass("hidroppable"), t(n).bind("_dragenter", function (e, i) {
  4521. t.data(n, "hidroppable").options.onDragEnter.apply(n, [e, i]);
  4522. }), t(n).bind("_dragleave", function (e, i) {
  4523. t.data(n, "hidroppable").options.onDragLeave.apply(n, [e, i]);
  4524. }), t(n).bind("_dragover", function (e, i) {
  4525. t.data(n, "hidroppable").options.onDragOver.apply(n, [e, i]);
  4526. }), t(n).bind("_drop", function (e, i) {
  4527. t.data(n, "hidroppable").options.onDrop.apply(n, [e, i]);
  4528. }), t.data(this, "hidroppable", {
  4529. options: t.extend({}, t.fn.hidroppable.defaults, t.fn.hidroppable.parseOptions(this), e)
  4530. }));
  4531. }));
  4532. }, t.fn.hidroppable.methods = {
  4533. options: function options(e) {
  4534. return t.data(e[0], "hidroppable").options;
  4535. },
  4536. enable: function enable(e) {
  4537. return e.each(function () {
  4538. t(this).hidroppable({
  4539. disabled: !1
  4540. });
  4541. });
  4542. },
  4543. disable: function disable(e) {
  4544. return e.each(function () {
  4545. t(this).hidroppable({
  4546. disabled: !0
  4547. });
  4548. });
  4549. }
  4550. }, t.fn.hidroppable.parseOptions = function (e) {
  4551. var n = t(e);
  4552. return t.extend({}, t.hiprintparser.parseOptions(e, ["accept"]), {
  4553. disabled: !!n.attr("disabled") || void 0
  4554. });
  4555. }, t.fn.hidroppable.defaults = {
  4556. accept: null,
  4557. disabled: !1,
  4558. onDragEnter: function onDragEnter(t, e) { },
  4559. onDragOver: function onDragOver(t, e) { },
  4560. onDragLeave: function onDragLeave(t, e) { },
  4561. onDrop: function onDrop(t, e) { }
  4562. };
  4563. }(jQuery);
  4564. }, function (t, e) {
  4565. var n;
  4566. (n = jQuery).hiprintparser = {
  4567. parseOptions: function parseOptions(t, e) {
  4568. var i = n(t),
  4569. o = {},
  4570. r = n.trim(i.attr("data-options"));
  4571. if (r && ("{" != r.substring(0, 1) && (r = "{" + r + "}"), o = new Function("return " + r)()), e) {
  4572. for (var a = {}, p = 0; p < e.length; p++) {
  4573. var s = e[p];
  4574. if ("string" == typeof s) a[s] = "width" == s || "height" == s || "left" == s || "top" == s ? parseInt(t.style[s]) || void 0 : i.attr(s); else for (var l in s) {
  4575. var u = s[l];
  4576. "boolean" == u ? a[l] = i.attr(l) ? "true" == i.attr(l) : void 0 : "number" == u && (a[l] = "0" == i.attr(l) ? 0 : parseFloat(i.attr(l)) || void 0);
  4577. }
  4578. }
  4579. n.extend(o, a);
  4580. }
  4581. return o;
  4582. }
  4583. }, n.fn.dragLengthC = function (t, e) {
  4584. return "pt" == e.moveUnit ? n.fn.dragLengthCNum(t, e) + "pt" : n.fn.dragLengthCNum(t, e);
  4585. }, n.fn.dragLengthCNum = function (t, e) {
  4586. var n = 3;
  4587. if ("pt" == e.moveUnit) {
  4588. var i = .75 * t;
  4589. return e.minMove && (n = e.minMove), Math.round(i / n) * n;
  4590. }
  4591. return Math.round(i / n) * n;
  4592. };
  4593. }, function (t, e) {
  4594. var n, i, o;
  4595. n = jQuery, i = {
  4596. maxPanelIndex: 0
  4597. }, (o = function o(t) {
  4598. this.options = n.data(t.target, "hireizeable").options, this.init(t.target);
  4599. }).prototype = {
  4600. numHandlerText: function numHandlerText(t) {
  4601. return this.numHandler(t) + "pt";
  4602. },
  4603. numHandler: function numHandler(t) {
  4604. var e = 1.5,
  4605. n = .75 * t;
  4606. return this.options.minResize && (e = this.options.minResize), Math.round(n / e) * e;
  4607. },
  4608. init: function init(t) {
  4609. this.initResizeBox(t);
  4610. },
  4611. initResizeBox: function initResizeBox(t) {
  4612. var e = this;
  4613. n(t).each(function () {
  4614. var o;
  4615. i.maxPanelIndex += 1, e.options.noContainer ? o = n(t) : (o = n("<div panelIndex=" + i.maxPanelIndex + ' class="resize-panel"></div>')).css({
  4616. width: "100%",
  4617. height: "100%",
  4618. top: 0,
  4619. left: 0,
  4620. position: "absolute",
  4621. "background-color": "rgba(0,0,0,0.5)",
  4622. cursor: "move",
  4623. display: "none"
  4624. }), e.appendHandler(o, n(this));
  4625. var r = {
  4626. name: "n",
  4627. target: n('<div class="n resizebtn" style="cursor: n-resize;top: -12px;margin-left: -4px;left: 50%;"></div>')
  4628. },
  4629. a = {
  4630. name: "s",
  4631. target: n('<div class="s resizebtn" style="cursor: s-resize;bottom: -12px;margin-left: -4px;left: 50%;"></div>')
  4632. },
  4633. p = {
  4634. name: "w",
  4635. target: n('<div class="w resizebtn" style="cursor: w-resize;left: -12px;margin-top: -4px;top: 50%;"></div>')
  4636. },
  4637. s = {
  4638. name: "e",
  4639. target: n('<div class="e resizebtn" style="cursor: e-resize; top: 50%; margin-top:-4px;right: -12px;"></div>')
  4640. },
  4641. l = {
  4642. name: "ne",
  4643. target: n('<div class="ne resizebtn" style="cursor: ne-resize;top: -12px;right: -12px;"></div>')
  4644. },
  4645. u = {
  4646. name: "nw",
  4647. target: n('<div class="nw resizebtn" style=" cursor: nw-resize;top: -12px;left:-12px;"></div>')
  4648. },
  4649. d = {
  4650. name: "se",
  4651. target: n('<div class="se resizebtn" style="cursor: se-resize;bottom:-12px;right: -12px;"></div>')
  4652. },
  4653. c = {
  4654. name: "sw",
  4655. target: n('<div class="sw resizebtn" style="cursor: sw-resize;bottom: -12px;left: -12px;"></div>')
  4656. },
  4657. h = function h() {
  4658. var t = [],
  4659. i = e.options.showPoints;
  4660. return n.each([r, a, p, s, l, u, d, c], function (e, o) {
  4661. n.inArray(o.name, i) > -1 && t.push(o.target);
  4662. }), t;
  4663. };
  4664. e.addHandlerCss(h()), e.appendHandler(h(), o), e.bindResizeEvent(o, n(this));
  4665. var f = n(this);
  4666. n(o).on("mousedown", ".resizebtn", function () {
  4667. f.addClass("resizeing");
  4668. }), n(".easyui-droppable").on("mouseup", function () {
  4669. f.removeClass("resizeing");
  4670. }), e.bindTrigger(n(this));
  4671. }), e.bindHidePanel();
  4672. },
  4673. addHandlerCss: function addHandlerCss(t) {
  4674. for (var e = 0; e < t.length; e++) {
  4675. t[e].css({
  4676. position: "absolute",
  4677. width: "8px",
  4678. height: "8px",
  4679. background: "#ff6600",
  4680. "border-radius": "50%"
  4681. });
  4682. }
  4683. },
  4684. appendHandler: function appendHandler(t, e) {
  4685. for (var n = 0; n < t.length; n++) {
  4686. e.append(t[n]);
  4687. }
  4688. },
  4689. triggerResize: function triggerResize(t) {
  4690. t.siblings().children("div[panelindex]").css({
  4691. display: "none"
  4692. }), t.children("div[panelindex]").css({
  4693. display: "block"
  4694. });
  4695. },
  4696. bindResizeEvent: function bindResizeEvent(t, e) {
  4697. var i = this,
  4698. o = 0,
  4699. r = 0,
  4700. a = t.width(),
  4701. p = t.height(),
  4702. s = t.offset().left,
  4703. l = t.offset().top,
  4704. u = i.options.noContainer ? n(e) : t.parent(),
  4705. d = !1;
  4706. t.on("mousedown", ".e", function (e) {
  4707. o = e.pageX, a = t.width(), d = !0;
  4708. });
  4709. var c = !1;
  4710. t.on("mousedown", ".s", function (e) {
  4711. r = e.pageY, p = t.height(), c = !0;
  4712. });
  4713. var h = !1;
  4714. t.on("mousedown", ".w", function (e) {
  4715. o = e.pageX, a = t.width(), h = !0, s = u.offset().left;
  4716. });
  4717. var f = !1;
  4718. t.on("mousedown", ".n", function (e) {
  4719. r = e.pageY, p = t.height(), f = !0, l = u.offset().top;
  4720. });
  4721. var g = !1;
  4722. t.on("mousedown", ".ne", function (e) {
  4723. o = e.pageX, r = e.pageY, a = t.width(), p = t.height(), g = !0, l = u.offset().top;
  4724. });
  4725. var m = !1;
  4726. t.on("mousedown", ".nw", function (e) {
  4727. o = e.pageX, r = e.pageY, a = t.width(), p = t.height(), l = u.offset().top, s = u.offset().left, m = !0;
  4728. });
  4729. var v = !1;
  4730. t.on("mousedown", ".se", function (e) {
  4731. o = e.pageX, r = e.pageY, a = t.width(), p = t.height(), v = !0;
  4732. });
  4733. var y = !1;
  4734. t.on("mousedown", ".sw", function (e) {
  4735. o = e.pageX, r = e.pageY, a = t.width(), p = t.height(), y = !0, s = u.offset().left;
  4736. });
  4737. var b = !1;
  4738. t.on("mousedown", function (t) {
  4739. i.options.onBeforeResize(), o = t.pageX, r = t.pageY, l = u.offset().top, s = u.offset().left, b = !1;
  4740. }), n(i.options.stage).on("mousemove", function (e) {
  4741. if (d) {
  4742. var n = e.pageX - o;
  4743. t.css({
  4744. width: "100%"
  4745. }), u.css({
  4746. width: i.numHandlerText(a + n)
  4747. }), i.options.onResize(e, void 0, i.numHandler(a + n), void 0, void 0);
  4748. } else if (c) {
  4749. var E = e.pageY - r;
  4750. t.css({
  4751. height: "100%"
  4752. }), u.css({
  4753. height: i.numHandlerText(p + E)
  4754. }), i.options.onResize(e, i.numHandler(p + E), void 0, void 0, void 0);
  4755. } else h ? (n = e.pageX - o, t.css({
  4756. width: "100%"
  4757. }), u.css({
  4758. width: i.numHandlerText(a - n),
  4759. left: i.numHandlerText(i.options.noDrag ? void 0 : i.numHandler(s + n))
  4760. }), i.options.onResize(e, void 0, i.numHandler(a - n), void 0, i.options.noDrag ? void 0 : i.numHandler(s + n))) : f ? (E = e.pageY - r, t.css({
  4761. height: "100%"
  4762. }), u.css({
  4763. height: i.numHandlerText(p - E),
  4764. top: i.numHandlerText(i.options.noDrag ? void 0 : l + E)
  4765. }), i.options.onResize(e, i.numHandler(p - E), void 0, i.options.noDrag ? void 0 : i.numHandler(l + E), void 0)) : g ? (n = e.pageX - o, E = e.pageY - r, t.css({
  4766. height: "100%",
  4767. width: "100%"
  4768. }), u.css({
  4769. height: i.numHandlerText(p - E),
  4770. top: i.numHandlerText(i.options.noDrag ? void 0 : l + E),
  4771. width: i.numHandlerText(a + n)
  4772. }), i.options.onResize(e, i.numHandler(p - E), i.numHandler(a + n), i.options.noDrag ? void 0 : i.numHandler(l + E), void 0)) : m ? (n = e.pageX - o, E = e.pageY - r, t.css({
  4773. height: "100%",
  4774. width: "100%"
  4775. }), u.css({
  4776. height: i.numHandlerText(p - E),
  4777. top: i.numHandlerText(i.options.noDrag ? void 0 : l + E),
  4778. width: i.numHandlerText(a - n),
  4779. left: i.numHandlerText(i.options.noDrag ? void 0 : s + n)
  4780. }), i.options.onResize(e, i.numHandler(p - E), i.numHandler(a - n), i.options.noDrag ? void 0 : i.numHandler(l + E), i.options.noDrag ? void 0 : i.numHandler(s + n))) : v ? (n = e.pageX - o, E = e.pageY - r, t.css({
  4781. width: "100%",
  4782. height: "100%"
  4783. }), u.css({
  4784. width: i.numHandlerText(a + n),
  4785. height: i.numHandlerText(p + E)
  4786. }), i.options.onResize(e, i.numHandler(p + E), i.numHandler(a + n), void 0, void 0)) : y ? (n = e.pageX - o, E = e.pageY - r, t.css({
  4787. width: "100%",
  4788. height: "100%"
  4789. }), u.css({
  4790. width: i.numHandlerText(a - n),
  4791. left: i.numHandlerText(i.options.noDrag ? void 0 : s + n),
  4792. height: i.numHandlerText(p + E)
  4793. }), i.options.onResize(e, i.numHandler(p + E), i.numHandler(a - n), i.numHandler(otundefinedop), i.options.noDrag ? void 0 : i.numHandler(s + n))) : b && (n = e.pageX - o, E = e.pageY - r, u.css({
  4794. left: i.numHandlerText(i.options.noDrag ? void 0 : s + n),
  4795. top: i.numHandlerText(i.options.noDrag ? void 0 : l + E)
  4796. }), i.options.onResize(e, void 0, void 0, i.options.noDrag ? void 0 : i.numHandler(l + E), i.options.noDrag ? void 0 : i.numHandler(s + n)));
  4797. }).on("mouseup", function (t) {
  4798. d = !1, c = !1, h = !1, f = !1, g = !1, m = !1, y = !1, v = !1, b = !1, i.options.onStopResize();
  4799. });
  4800. },
  4801. bindTrigger: function bindTrigger(t) {
  4802. var e = this;
  4803. t.on("click", function (n) {
  4804. n.stopPropagation(), e.triggerResize(t);
  4805. });
  4806. },
  4807. bindHidePanel: function bindHidePanel(t) {
  4808. if (i.maxPanelIndex < 2) {
  4809. var e = this.options.stage;
  4810. n(e).bind("click", function (t) {
  4811. t.stopPropagation(), n("div[panelindex]").css({
  4812. display: "none"
  4813. });
  4814. });
  4815. }
  4816. }
  4817. }, n.fn.extend({
  4818. hireizeable: function hireizeable(t) {
  4819. return this.each(function () {
  4820. var e,
  4821. i = n.data(this, "hireizeable");
  4822. e = i ? n.extend(i.options, _1f) : n.extend({}, n.fn.hireizeable.defaults, t || {}), n.data(this, "hireizeable", {
  4823. options: e
  4824. }), new o({
  4825. target: this,
  4826. onResize: function onResize(t, e, n, i, o) { },
  4827. onStopResize: function onStopResize(t, e, n, i, o) { }
  4828. });
  4829. });
  4830. }
  4831. }), n.fn.hireizeable.defaults = {
  4832. stage: document,
  4833. reizeUnit: "pt",
  4834. minResize: 1.5,
  4835. showPoints: ["s", "e"],
  4836. noContainer: !1,
  4837. onBeforeResize: function onBeforeResize(t, e, n, i, o) { },
  4838. onResize: function onResize(t, e, n, i, o) { },
  4839. onStopResize: function onStopResize(t, e, n, i, o) { },
  4840. noDrag: !1
  4841. };
  4842. }, function (t, e) {
  4843. var n, i;
  4844. jQuery, n = "connected", i = "reconnecting", window.hiwebSocket = {
  4845. opened: !1,
  4846. name: "webSockets",
  4847. reconnectTimeout: 6e4,
  4848. reconnectWindowSetTimeout: null,
  4849. reconnectDelay: 2e3,
  4850. supportsKeepAlive: function supportsKeepAlive() {
  4851. return !0;
  4852. },
  4853. hasIo: function hasIo(t) {
  4854. return window.io;
  4855. },
  4856. send: function send(t) {
  4857. try {
  4858. this.socket.emit("news", t);
  4859. } catch (e) {
  4860. console.log("send data error:" + (t || "") + JSON.stringify(e));
  4861. }
  4862. },
  4863. getPrinterList: function getPrinterList() {
  4864. return this.printerList;
  4865. },
  4866. start: function start() {
  4867. var _this = this;
  4868. var t = this;
  4869. window.WebSocket ? this.socket || (this.socket = io("http://localhost:17521", {
  4870. reconnectionAttempts: 5
  4871. }), this.socket.on("connect", function (e) {
  4872. t.opened = !0, console.log("Websocket opened."), _this.socket.on("successs", function (t) {
  4873. hinnn.event.trigger("printSuccess_" + t.templateId, t);
  4874. }), _this.socket.on("error", function (t) {
  4875. hinnn.event.trigger("printError_" + t.templateId, t);
  4876. }), _this.socket.on("printerList", function (e) {
  4877. t.printerList = e;
  4878. }), t.state = n;
  4879. }), this.socket.on("disconnect", function () {
  4880. t.opened = !1;
  4881. })) : console.log("WebSocket start fail");
  4882. },
  4883. reconnect: function reconnect() {
  4884. this.state !== n && this.state !== i || (this.stop(), this.ensureReconnectingState() && (console.log("Websocket reconnecting."), this.start()));
  4885. },
  4886. stop: function stop() {
  4887. this.socket && (console.log("Closing the Websocket."), this.socket.close(), this.socket = null);
  4888. },
  4889. ensureReconnectingState: function ensureReconnectingState() {
  4890. return this.state = i, this.state === i;
  4891. }
  4892. };
  4893. }, function (t, e, n) {
  4894. var i = n(28);
  4895. "string" == typeof i && (i = [[t.i, i, ""]]);
  4896. var o = {
  4897. hmr: !0,
  4898. transform: void 0,
  4899. insertInto: void 0
  4900. };
  4901. n(30)(i, o);
  4902. i.locals && (t.exports = i.locals);
  4903. }, function (t, e, n) {
  4904. (t.exports = n(29)(!1)).push([t.i, ".hicontextmenu {\r\n\tposition: absolute;\r\n\tdisplay: inline-block;\r\n\twidth: 215px;\r\n\tpadding: 0 0;\r\n\tmargin: 0;\r\n\tfont-family: inherit;\r\n\tfont-size: inherit;\r\n\tlist-style-type: none;\r\n\tlist-style: none;\r\n\tbackground: #fff;\r\n\tborder: 1px solid #bebebe;\r\n\tborder-radius: 2px;\r\n\tfont-size: 13px;\r\n}\r\n\r\n.hicontextmenuroot .hicontextmenuitem {\r\n\tposition: relative;\r\n\t-webkit-box-sizing: content-box;\r\n\t-moz-box-sizing: content-box;\r\n\tbox-sizing: content-box;\r\n\tpadding: .2em 12px;\r\n\tcolor: #2f2f2f;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\ttext-decoration: none;\r\n\r\n\tuser-select: none;\r\n\tbackground-color: #fff;\r\n\r\n}\r\n\r\n.hicontextmenuroot>.hicontextmenuitem:hover,\r\n.hicontextmenuroot .hicontextmenuitem > a:hover {\r\n\tbackground-color: #f3f3f3;\r\n}\r\n\r\n.hicontextmenuroot .hicontextmenuitem>a {\r\n\ttext-decoration: none;\r\n\tcolor: #363636;\r\n\tline-height: 22px;\r\n\r\n}\r\n\r\n.hicontextmenuroot .hicontextsubmenu>ul {\r\n\tdisplay: none;\r\n\tposition: absolute;\r\n\r\n}\r\n\r\n.hicontextmenuroot .hicontextsubmenu:hover>ul {\r\n\tdisplay: block;\r\n\tleft: 100%;\r\n\ttop: -1px;\r\n\tmargin-left: 0px;\r\n}\r\n\r\n.hicontextmenuroot .borderBottom {\r\n\tborder-bottom: 1px solid #efe6e6;\r\n}\r\n\r\n.hicontextmenuroot .disable> a {\r\n \r\n color: #ccc;\r\n \r\n}\r\n.hicontextmenuroot>.disable:hover,\r\n.hicontextmenuroot .disable> a:hover {\r\n\tbackground-color:#fff;\r\n}", ""]);
  4905. }, function (t, e, n) {
  4906. "use strict";
  4907. t.exports = function (t) {
  4908. var e = [];
  4909. return e.toString = function () {
  4910. return this.map(function (e) {
  4911. var n = function (t, e) {
  4912. var n = t[1] || "",
  4913. i = t[3];
  4914. if (!i) return n;
  4915. if (e && "function" == typeof btoa) {
  4916. var o = (a = i, "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(a)))) + " */"),
  4917. r = i.sources.map(function (t) {
  4918. return "/*# sourceURL=" + i.sourceRoot + t + " */";
  4919. });
  4920. return [n].concat(r).concat([o]).join("\n");
  4921. }
  4922. var a;
  4923. return [n].join("\n");
  4924. }(e, t);
  4925. return e[2] ? "@media " + e[2] + "{" + n + "}" : n;
  4926. }).join("");
  4927. }, e.i = function (t, n) {
  4928. "string" == typeof t && (t = [[null, t, ""]]);
  4929. for (var i = {}, o = 0; o < this.length; o++) {
  4930. var r = this[o][0];
  4931. null != r && (i[r] = !0);
  4932. }
  4933. for (o = 0; o < t.length; o++) {
  4934. var a = t[o];
  4935. null != a[0] && i[a[0]] || (n && !a[2] ? a[2] = n : n && (a[2] = "(" + a[2] + ") and (" + n + ")"), e.push(a));
  4936. }
  4937. }, e;
  4938. };
  4939. }, function (t, e, n) {
  4940. var i,
  4941. o,
  4942. r = {},
  4943. a = (i = function i() {
  4944. return window && document && document.all && !window.atob;
  4945. }, function () {
  4946. return void 0 === o && (o = i.apply(this, arguments)), o;
  4947. }),
  4948. p = function (t) {
  4949. var e = {};
  4950. return function (t, n) {
  4951. if ("function" == typeof t) return t();
  4952. if (void 0 === e[t]) {
  4953. var i = function (t, e) {
  4954. return e ? e.querySelector(t) : document.querySelector(t);
  4955. }.call(this, t, n);
  4956. if (window.HTMLIFrameElement && _instanceof(i, window.HTMLIFrameElement)) try {
  4957. i = i.contentDocument.head;
  4958. } catch (t) {
  4959. i = null;
  4960. }
  4961. e[t] = i;
  4962. }
  4963. return e[t];
  4964. };
  4965. }(),
  4966. s = null,
  4967. l = 0,
  4968. u = [],
  4969. d = n(31);
  4970. function c(t, e) {
  4971. for (var n = 0; n < t.length; n++) {
  4972. var i = t[n],
  4973. o = r[i.id];
  4974. if (o) {
  4975. o.refs++;
  4976. for (var a = 0; a < o.parts.length; a++) {
  4977. o.parts[a](i.parts[a]);
  4978. }
  4979. for (; a < i.parts.length; a++) {
  4980. o.parts.push(y(i.parts[a], e));
  4981. }
  4982. } else {
  4983. var p = [];
  4984. for (a = 0; a < i.parts.length; a++) {
  4985. p.push(y(i.parts[a], e));
  4986. }
  4987. r[i.id] = {
  4988. id: i.id,
  4989. refs: 1,
  4990. parts: p
  4991. };
  4992. }
  4993. }
  4994. }
  4995. function h(t, e) {
  4996. for (var n = [], i = {}, o = 0; o < t.length; o++) {
  4997. var r = t[o],
  4998. a = e.base ? r[0] + e.base : r[0],
  4999. p = {
  5000. css: r[1],
  5001. media: r[2],
  5002. sourceMap: r[3]
  5003. };
  5004. i[a] ? i[a].parts.push(p) : n.push(i[a] = {
  5005. id: a,
  5006. parts: [p]
  5007. });
  5008. }
  5009. return n;
  5010. }
  5011. function f(t, e) {
  5012. var n = p(t.insertInto);
  5013. if (!n) throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  5014. var i = u[u.length - 1];
  5015. if ("top" === t.insertAt) i ? i.nextSibling ? n.insertBefore(e, i.nextSibling) : n.appendChild(e) : n.insertBefore(e, n.firstChild), u.push(e); else if ("bottom" === t.insertAt) n.appendChild(e); else {
  5016. if ("object" != _typeof(t.insertAt) || !t.insertAt.before) throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
  5017. var o = p(t.insertAt.before, n);
  5018. n.insertBefore(e, o);
  5019. }
  5020. }
  5021. function g(t) {
  5022. if (null === t.parentNode) return !1;
  5023. t.parentNode.removeChild(t);
  5024. var e = u.indexOf(t);
  5025. e >= 0 && u.splice(e, 1);
  5026. }
  5027. function m(t) {
  5028. var e = document.createElement("style");
  5029. if (void 0 === t.attrs.type && (t.attrs.type = "text/css"), void 0 === t.attrs.nonce) {
  5030. var i = function () {
  5031. 0;
  5032. return n.nc;
  5033. }();
  5034. i && (t.attrs.nonce = i);
  5035. }
  5036. return v(e, t.attrs), f(t, e), e;
  5037. }
  5038. function v(t, e) {
  5039. Object.keys(e).forEach(function (n) {
  5040. t.setAttribute(n, e[n]);
  5041. });
  5042. }
  5043. function y(t, e) {
  5044. var n, i, o, r;
  5045. if (e.transform && t.css) {
  5046. if (!(r = "function" == typeof e.transform ? e.transform(t.css) : e.transform.default(t.css))) return function () { };
  5047. t.css = r;
  5048. }
  5049. if (e.singleton) {
  5050. var a = l++;
  5051. n = s || (s = m(e)), i = T.bind(null, n, a, !1), o = T.bind(null, n, a, !0);
  5052. } else t.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa ? (n = function (t) {
  5053. var e = document.createElement("link");
  5054. return void 0 === t.attrs.type && (t.attrs.type = "text/css"), t.attrs.rel = "stylesheet", v(e, t.attrs), f(t, e), e;
  5055. }(e), i = function (t, e, n) {
  5056. var i = n.css,
  5057. o = n.sourceMap,
  5058. r = void 0 === e.convertToAbsoluteUrls && o;
  5059. (e.convertToAbsoluteUrls || r) && (i = d(i));
  5060. o && (i += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(o)))) + " */");
  5061. var a = new Blob([i], {
  5062. type: "text/css"
  5063. }),
  5064. p = t.href;
  5065. t.href = URL.createObjectURL(a), p && URL.revokeObjectURL(p);
  5066. }.bind(null, n, e), o = function o() {
  5067. g(n), n.href && URL.revokeObjectURL(n.href);
  5068. }) : (n = m(e), i = function (t, e) {
  5069. var n = e.css,
  5070. i = e.media;
  5071. i && t.setAttribute("media", i);
  5072. if (t.styleSheet) t.styleSheet.cssText = n; else {
  5073. for (; t.firstChild;) {
  5074. t.removeChild(t.firstChild);
  5075. }
  5076. t.appendChild(document.createTextNode(n));
  5077. }
  5078. }.bind(null, n), o = function o() {
  5079. g(n);
  5080. });
  5081. return i(t), function (e) {
  5082. if (e) {
  5083. if (e.css === t.css && e.media === t.media && e.sourceMap === t.sourceMap) return;
  5084. i(t = e);
  5085. } else o();
  5086. };
  5087. }
  5088. t.exports = function (t, e) {
  5089. if ("undefined" != typeof DEBUG && DEBUG && "object" != (typeof document === "undefined" ? "undefined" : _typeof(document))) throw new Error("The style-loader cannot be used in a non-browser environment");
  5090. (e = e || {}).attrs = "object" == _typeof(e.attrs) ? e.attrs : {}, e.singleton || "boolean" == typeof e.singleton || (e.singleton = a()), e.insertInto || (e.insertInto = "head"), e.insertAt || (e.insertAt = "bottom");
  5091. var n = h(t, e);
  5092. return c(n, e), function (t) {
  5093. for (var i = [], o = 0; o < n.length; o++) {
  5094. var a = n[o];
  5095. (p = r[a.id]).refs-- , i.push(p);
  5096. }
  5097. t && c(h(t, e), e);
  5098. for (o = 0; o < i.length; o++) {
  5099. var p;
  5100. if (0 === (p = i[o]).refs) {
  5101. for (var s = 0; s < p.parts.length; s++) {
  5102. p.parts[s]();
  5103. }
  5104. delete r[p.id];
  5105. }
  5106. }
  5107. };
  5108. };
  5109. var b,
  5110. E = (b = [], function (t, e) {
  5111. return b[t] = e, b.filter(Boolean).join("\n");
  5112. });
  5113. function T(t, e, n, i) {
  5114. var o = n ? "" : i.css;
  5115. if (t.styleSheet) t.styleSheet.cssText = E(e, o); else {
  5116. var r = document.createTextNode(o),
  5117. a = t.childNodes;
  5118. a[e] && t.removeChild(a[e]), a.length ? t.insertBefore(r, a[e]) : t.appendChild(r);
  5119. }
  5120. }
  5121. }, function (t, e) {
  5122. t.exports = function (t) {
  5123. var e = "undefined" != typeof window && window.location;
  5124. if (!e) throw new Error("fixUrls requires window.location");
  5125. if (!t || "string" != typeof t) return t;
  5126. var n = e.protocol + "//" + e.host,
  5127. i = n + e.pathname.replace(/\/[^\/]*$/, "/");
  5128. return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function (t, e) {
  5129. var o,
  5130. r = e.trim().replace(/^"(.*)"$/, function (t, e) {
  5131. return e;
  5132. }).replace(/^'(.*)'$/, function (t, e) {
  5133. return e;
  5134. });
  5135. return /^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r) ? t : (o = 0 === r.indexOf("//") ? r : 0 === r.indexOf("/") ? n + r : i + r.replace(/^\.\//, ""), "url(" + JSON.stringify(o) + ")");
  5136. });
  5137. };
  5138. }, function (t, e) {
  5139. var n, i;
  5140. window, document, n = jQuery, (i = function i(t, e) {
  5141. this.init(t, e);
  5142. }).prototype = {
  5143. init: function init(t, e) {
  5144. this.ele = t, this.defaults = {
  5145. menu: [{
  5146. text: "text",
  5147. menus: [{}, {}],
  5148. callback: function callback() { }
  5149. }],
  5150. target: function target(t) { },
  5151. width: 100,
  5152. itemHeight: 28,
  5153. bgColor: "#fff",
  5154. color: "#333",
  5155. fontSize: 14,
  5156. hoverBgColor: "#f5f5f5"
  5157. }, this.opts = n.extend(!0, {}, this.defaults, e), this.random = new Date().getTime() + parseInt(1e3 * Math.random()), this.eventBind();
  5158. },
  5159. renderMenu: function renderMenu(t, e) {
  5160. var n = this,
  5161. i = e;
  5162. if (t && t.length) {
  5163. var o = $('<ul class="hicontextmenu" ></ul>');
  5164. i || (i = o).addClass("hicontextmenuroot"), $.each(t, function (t, e) {
  5165. var i = !!e.disable && e.disable(),
  5166. r = $('<li class="hicontextmenuitem"><a href="javascript:void(0);"><span>' + (e.text || "") + "</span></a></li>");
  5167. i && r.addClass("disable"), e.borderBottom && r.addClass("borderBottom"), e.menus && (r.addClass("hicontextsubmenu"), n.renderMenu(e.menus, r)), e.callback && r.click(function (t) {
  5168. $(this).hasClass("disable") ? t.stopPropagation() : ($(".hicontextmenuroot").remove(), e.callback(), t.stopPropagation());
  5169. }), o.append(r);
  5170. }), e && e.append(o);
  5171. }
  5172. e || $("body").append(i).find(".hicontextmenuroot").hide();
  5173. },
  5174. setPosition: function setPosition(t) {
  5175. $(".hicontextmenuroot").css({
  5176. left: t.pageX + 2,
  5177. top: t.pageY + 2
  5178. }).show();
  5179. },
  5180. eventBind: function eventBind() {
  5181. var t = this;
  5182. this.ele.on("contextmenu", function (e) {
  5183. $(".hicontextmenuroot").remove(), e.preventDefault(), t.renderMenu(t.opts.menus), t.setPosition(e), t.opts.target && "function" == typeof t.opts.target && t.opts.target(n(this));
  5184. }), n("body").on("click", function () {
  5185. n(".hicontextmenuroot").remove();
  5186. });
  5187. }
  5188. }, n.fn.hicontextMenu = function (t) {
  5189. return new i(this, t), this;
  5190. };
  5191. }, function (t, e, n) {
  5192. "use strict";
  5193. n.r(e);
  5194. n(22), n(23), n(24), n(25);
  5195. var i,
  5196. o = n(0);
  5197. n(26);
  5198. window.hiLocalStorage = (i = window.localStorage || null, {
  5199. saveLocalData: function saveLocalData(t, e) {
  5200. return !(!i || !e || (i.setItem(t, e), 0));
  5201. },
  5202. getLocalData: function getLocalData(t) {
  5203. return i ? i.getItem(t) : null;
  5204. },
  5205. removeItem: function removeItem(t) {
  5206. i && i.removeItem(t);
  5207. }
  5208. });
  5209. n(27), n(32);
  5210. var _r,
  5211. a = function () {
  5212. function t() {
  5213. this.allElementTypes = [];
  5214. }
  5215. return Object.defineProperty(t, "instance", {
  5216. get: function get() {
  5217. return t._instance || (t._instance = new t()), t._instance;
  5218. },
  5219. enumerable: !0,
  5220. configurable: !0
  5221. }), t.prototype.addPrintElementTypes = function (t, e) {
  5222. var n = this;
  5223. this[t] ? this[t] = this[t].concat(e) : this[t] = e, e.forEach(function (t) {
  5224. n.allElementTypes = n.allElementTypes.concat(t.printElementTypes);
  5225. });
  5226. }, t.prototype.getElementTypeGroups = function (t) {
  5227. return this[this.formatterModule(t)] || [];
  5228. }, t.prototype.getElementType = function (t) {
  5229. var e = this.allElementTypes.filter(function (e) {
  5230. return e.tid == t;
  5231. });
  5232. if (e.length > 0) return e[0];
  5233. }, t.prototype.formatterModule = function (t) {
  5234. return t || "_default";
  5235. }, t;
  5236. }(),
  5237. p = n(1),
  5238. s = n(2),
  5239. l = function () {
  5240. function t() { }
  5241. return t.prototype.createPrintElementTypeHtml = function (t, e) {
  5242. var n = $('<ul class="hiprint-printElement-type"></ul>');
  5243. return e.forEach(function (t) {
  5244. var e = $("<li></li>");
  5245. e.append('<span class="title">' + t.name + "</span>");
  5246. var i = $("<ul></ul>");
  5247. e.append(i), t.printElementTypes.forEach(function (t) {
  5248. i.append('<li><a class="ep-draggable-item" tid="' + t.tid + '"> ' + t.getText() + " </a></li>");
  5249. }), n.append(e);
  5250. }), $(t).append(n), n.find(".ep-draggable-item");
  5251. }, t;
  5252. }(),
  5253. u = n(5),
  5254. d = n(15),
  5255. c = function () {
  5256. return function (t) {
  5257. this.field = t.field, this.title = t.title, this.type = t.type, this.columns = t.columns;
  5258. };
  5259. }(),
  5260. h = function () {
  5261. function t(t) {
  5262. var e = this;
  5263. this.text = t.text, this.field = t.field, this.fields = t.fields, this.title = t.title, this.tid = t.tid, this.data = t.data, this.styler = t.styler, this.formatter = t.formatter, this.type = t.type, this.options = t.options, this.editable = t.editable, this.columnDisplayEditable = t.columnDisplayEditable, this.columnDisplayIndexEditable = t.columnDisplayIndexEditable, this.columnTitleEditable = t.columnTitleEditable, this.columnResizable = t.columnResizable, this.columnAlignEditable = t.columnAlignEditable, this.columns = [], (t.columns || []).forEach(function (t, n) {
  5264. e.columns.push(e.createTableColumnArray(t));
  5265. }), this.rowStyler = t.rowStyler, this.striped = t.striped, this.groupFields = t.groupFields || [], this.groupFormatter = t.groupFormatter, this.groupFooterFormatter = t.groupFooterFormatter, this.footerFormatter = t.footerFormatter, this.gridColumnsFooterFormatter = t.gridColumnsFooterFormatter, this.columnObj = this.makeColumnObj();
  5266. }
  5267. return t.prototype.getText = function () {
  5268. return this.text || this.title || "";
  5269. }, t.prototype.createPrintElement = function (t) {
  5270. var e = this;
  5271. return this.columns && 0 == this.columns.length && (t.columns || []).forEach(function (t, n) {
  5272. e.columns.push(e.createTableColumnArray(t));
  5273. }), new d.a(this, t);
  5274. }, t.prototype.getData = function () {
  5275. return [{}];
  5276. }, t.prototype.createTableColumnArray = function (t) {
  5277. var e = [];
  5278. return t.forEach(function (t, n) {
  5279. e.push(new u.a(t));
  5280. }), e;
  5281. }, t.prototype.getPrintElementTypeEntity = function () {
  5282. return new c({
  5283. title: this.title,
  5284. type: this.type
  5285. });
  5286. }, t.prototype.getFields = function () {
  5287. return this.fields;
  5288. }, t.prototype.getOptions = function () {
  5289. return this.options || {};
  5290. }, t.prototype.getColumnByColumnId = function (t) {
  5291. return this.columnObj[t];
  5292. }, t.prototype.makeColumnObj = function () {
  5293. var t = {};
  5294. return this.columns && this.columns.forEach(function (e) {
  5295. e.forEach(function (e) {
  5296. e.columnId && (t[e.columnId] = e);
  5297. });
  5298. }), t;
  5299. }, t;
  5300. }(),
  5301. f = n(4),
  5302. g = n(3),
  5303. m = (_r = function r(t, e) {
  5304. return (_r = Object.setPrototypeOf || _instanceof({
  5305. __proto__: []
  5306. }, Array) && function (t, e) {
  5307. t.__proto__ = e;
  5308. } || function (t, e) {
  5309. for (var n in e) {
  5310. e.hasOwnProperty(n) && (t[n] = e[n]);
  5311. }
  5312. })(t, e);
  5313. }, function (t, e) {
  5314. function n() {
  5315. this.constructor = t;
  5316. }
  5317. _r(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n());
  5318. }),
  5319. v = function (t) {
  5320. function e(e, n) {
  5321. var i = t.call(this, e) || this;
  5322. return i.options = new g.a(n), i.options.setDefault(new g.a(p.a.instance.image.default).getPrintElementOptionEntity()), i;
  5323. }
  5324. return m(e, t), e.prototype.getReizeableShowPoints = function () {
  5325. return ["se"];
  5326. }, e.prototype.getData = function (t) {
  5327. var e = "";
  5328. t ? e = this.getField() ? t[this.getField()] || "" : this.options.src || this.printElementType.getData() : e = this.options.src || this.printElementType.getData();
  5329. var n = this.getFormatter();
  5330. return n && (e = n(e, this.options, this._currenttemplateData)), e || "";
  5331. }, e.prototype.createTarget = function (t, e) {
  5332. var n = $('<div class="hiprint-printElement hiprint-printElement-image" style="position: absolute;"><div class="hiprint-printElement-image-content" style="height:100%;width:100%"></div></div>');
  5333. return this.updateTargetImage(n, t, e), n;
  5334. }, e.prototype.initSizeByHtml = function (e) {
  5335. t.prototype.initSizeByHtml.call(this, e), this.css(e, this.getData());
  5336. }, e.prototype.getConfigOptions = function () {
  5337. return p.a.instance.image;
  5338. }, e.prototype.updateDesignViewFromOptions = function () {
  5339. this.designTarget && (this.css(this.designTarget, this.getData()), this.updateTargetImage(this.designTarget, this.getTitle(), this.getData()));
  5340. }, e.prototype.updateTargetImage = function (t, e, n) {
  5341. var i = t.find(".hiprint-printElement-image-content");
  5342. i.find("img").length ? i.find("img").attr("src", n) : i.html('<img style="width:100%;height:100%;" src="' + n + '">');
  5343. }, e.prototype.getHtml = function (t, e, n) {
  5344. return this.getHtml2(t, e, n);
  5345. }, e;
  5346. }(f.a),
  5347. y = function () {
  5348. var _t4 = function t(e, n) {
  5349. return (_t4 = Object.setPrototypeOf || _instanceof({
  5350. __proto__: []
  5351. }, Array) && function (t, e) {
  5352. t.__proto__ = e;
  5353. } || function (t, e) {
  5354. for (var n in e) {
  5355. e.hasOwnProperty(n) && (t[n] = e[n]);
  5356. }
  5357. })(e, n);
  5358. };
  5359. return function (e, n) {
  5360. function i() {
  5361. this.constructor = e;
  5362. }
  5363. _t4(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5364. };
  5365. }(),
  5366. b = function (t) {
  5367. function e(e) {
  5368. var n = this;
  5369. return e = e || {}, (n = t.call(this, e) || this).leftSpaceRemoved = e.leftSpaceRemoved, n;
  5370. }
  5371. return y(e, t), e.prototype.getHideTitle = function () {
  5372. return null == this.hideTitle ? this.defaultOptions.hideTitle : this.hideTitle;
  5373. }, e;
  5374. }(g.a),
  5375. E = n(8),
  5376. T = function () {
  5377. function t(t, e, n, i, r, a, p, s, l, u, d) {
  5378. this.defaultPaperNumberFormat = "paperNo-paperCount", this.printLine = 0, this.templateId = t, this.width = o.a.mm.toPt(e), this.height = o.a.mm.toPt(n), this.mmwidth = e, this.mmheight = n, this.paperHeader = i, this.paperFooter = r, this.contentHeight = r - i, this.createTarget(), this.index = u, this.paperNumberLeft = a || parseInt((this.width - 30).toString()), this.paperNumberTop = p || parseInt((this.height - 22).toString()), this.paperNumberDisabled = s, this.paperNumberFormat = l, this.referenceElement = d ? $.extend({}, d) : new E.a({
  5379. top: 0,
  5380. left: 0,
  5381. height: 0,
  5382. width: 0,
  5383. bottomInLastPaper: 0,
  5384. beginPrintPaperIndex: 0,
  5385. printTopInPaper: 0,
  5386. endPrintPaperIndex: 0
  5387. });
  5388. }
  5389. return t.prototype.subscribePaperBaseInfoChanged = function (t) {
  5390. this.onPaperBaseInfoChanged = t;
  5391. }, t.prototype.triggerOnPaperBaseInfoChanged = function () {
  5392. this.onPaperBaseInfoChanged && this.onPaperBaseInfoChanged({
  5393. paperHeader: this.paperHeader,
  5394. paperFooter: this.paperFooter,
  5395. paperNumberLeft: this.paperNumberLeft,
  5396. paperNumberTop: this.paperNumberTop,
  5397. paperNumberDisabled: this.paperNumberDisabled,
  5398. paperNumberFormat: this.paperNumberFormat
  5399. });
  5400. }, t.prototype.setFooter = function (t, e, n, i) {
  5401. this.firstPaperFooter = t, this.evenPaperFooter = e, this.oddPaperFooter = n, this.lastPaperFooter = i;
  5402. }, t.prototype.setOffset = function (t, e) {
  5403. this.setLeftOffset(t), this.setTopOffset(e);
  5404. }, t.prototype.setLeftOffset = function (t) {
  5405. t ? this.paperContentTarget.css("left", t + "pt") : this.paperContentTarget[0].style.left = "";
  5406. }, t.prototype.setTopOffset = function (t) {
  5407. t ? this.paperContentTarget.css("top", t + "pt") : this.paperContentTarget[0].style.top = "";
  5408. }, t.prototype.createTarget = function () {
  5409. this.target = $('<div class="hiprint-printPaper"><div class="hiprint-printPaper-content"></div></div>'), this.paperContentTarget = this.target.find(".hiprint-printPaper-content"), this.target.css("width", this.mmwidth + "mm"), this.target.css("height", this.mmheight - p.a.instance.paperHeightTrim + "mm"), this.target.attr("original-height", this.mmheight);
  5410. }, t.prototype.createHeaderLine = function () {
  5411. var t = this;
  5412. this.headerLinetarget = $('<div class="hiprint-headerLine" style="position: absolute;width: 100%;border-top: 1px dashed #c9bebe;height: 7pt;"></div>'), this.headerLinetarget.css("top", (this.paperHeader || -1) + "pt"), 0 == this.paperHeader && this.headerLinetarget.addClass("hideheaderLinetarget"), this.paperContentTarget.append(this.headerLinetarget), this.dragHeadLineOrFootLine(this.headerLinetarget, function (e, n) {
  5413. t.paperHeader = n, t.triggerOnPaperBaseInfoChanged();
  5414. });
  5415. }, t.prototype.createFooterLine = function () {
  5416. var t = this;
  5417. this.footerLinetarget = $('<div class="hiprint-footerLine" style="position: absolute;width: 100%;border-top: 1px dashed #c9bebe;height: 7pt;"></div>'), this.footerLinetarget.css("top", parseInt(this.paperFooter.toString()) + "pt"), this.paperFooter == this.height && (this.footerLinetarget.css("top", this.mmheight - p.a.instance.paperHeightTrim + "mm"), this.footerLinetarget.addClass("hidefooterLinetarget")), this.paperContentTarget.append(this.footerLinetarget), this.dragHeadLineOrFootLine(this.footerLinetarget, function (e, n) {
  5418. t.paperFooter = n, t.triggerOnPaperBaseInfoChanged();
  5419. });
  5420. }, t.prototype.createPaperNumber = function (t) {
  5421. var e = this,
  5422. n = this.target.find(".hiprint-paperNumber");
  5423. if (n.length) return n.html(t), n;
  5424. var i = $('<span class="hiprint-paperNumber" style="position: absolute">' + t + "</span>");
  5425. return i.css("top", this.paperNumberTop + "pt"), i.css("left", this.paperNumberLeft + "pt"), this.paperContentTarget.append(i), this.dragHeadLineOrFootLine(i, function (t, n) {
  5426. e.paperNumberTop = n, e.paperNumberLeft = t, e.triggerOnPaperBaseInfoChanged();
  5427. }, !0), i;
  5428. }, t.prototype.getTarget = function () {
  5429. return this.target;
  5430. }, t.prototype.append = function (t) {
  5431. this.paperContentTarget.append(t);
  5432. }, t.prototype.updateReferenceElement = function (t) {
  5433. t && (this.referenceElement = t);
  5434. }, t.prototype.updatePrintLine = function (t) {
  5435. t >= this.printLine && (this.printLine = t);
  5436. }, t.prototype.design = function (t) {
  5437. var e = this;
  5438. this.createHeaderLine(), this.createFooterLine(), this.target.addClass("design"), this.paperNumberTarget = this.createPaperNumber(this.formatPaperNumber(1, 1)), this.createRuler(), this.resetPaperNumber(this.paperNumberTarget), $(this.paperNumberTarget).bind("dblclick.hiprint", function () {
  5439. null == e.paperNumberDisabled && (e.paperNumberDisabled = !1), e.paperNumberDisabled = !e.paperNumberDisabled, e.resetPaperNumber(e.paperNumberTarget), e.triggerOnPaperBaseInfoChanged();
  5440. }), $(this.paperNumberTarget).bind("click.hiprint", function () {
  5441. o.a.event.trigger("BuildCustomOptionSettingEventKey_" + e.templateId, {
  5442. options: {
  5443. paperNumberFormat: e.paperNumberFormat,
  5444. paperNumberDisabled: e.paperNumberDisabled
  5445. },
  5446. callback: function callback(t) {
  5447. e.paperNumberDisabled = !!t.paperNumberDisabled || void 0, e.paperNumberFormat = t.paperNumberFormat ? t.paperNumberFormat : void 0, e.createPaperNumber(e.formatPaperNumber(1, 1)), e.resetPaperNumber(e.paperNumberTarget), e.triggerOnPaperBaseInfoChanged();
  5448. }
  5449. });
  5450. });
  5451. }, t.prototype.resetPaperNumber = function (t) {
  5452. this.paperNumberDisabled ? t.addClass("hiprint-paperNumber-disabled") : t.removeClass("hiprint-paperNumber-disabled");
  5453. }, t.prototype.updatePaperNumber = function (t, e, n) {
  5454. var i = this.createPaperNumber(this.formatPaperNumber(t, e));
  5455. this.paperNumberDisabled ? i.hide() : n && this.index % 2 == 1 && (i[0].style.left = "", i.css("right", this.paperNumberLeft + "pt"));
  5456. }, t.prototype.formatPaperNumber = function (t, e) {
  5457. return (this.paperNumberFormat ? this.paperNumberFormat : this.defaultPaperNumberFormat).replace("paperNo", t.toString()).replace("paperCount", e.toString());
  5458. }, t.prototype.dragHeadLineOrFootLine = function (t, e, n) {
  5459. var i = this;
  5460. t.hidraggable({
  5461. axis: n ? void 0 : "v",
  5462. onDrag: function onDrag(t, n, i) {
  5463. e(n, i);
  5464. },
  5465. moveUnit: "pt",
  5466. minMove: p.a.instance.movingDistance,
  5467. onBeforeDrag: function onBeforeDrag(t) {
  5468. s.a.instance.draging = !0;
  5469. },
  5470. onStopDrag: function onStopDrag(t) {
  5471. s.a.instance.draging = !1, i.footerLinetarget.removeClass("hidefooterLinetarget"), i.headerLinetarget.removeClass("hideheaderLinetarget");
  5472. }
  5473. });
  5474. }, t.prototype.resize = function (t, e) {
  5475. this.width = o.a.mm.toPt(t), this.height = o.a.mm.toPt(e), this.mmwidth = t, this.mmheight = e, this.target.css("width", t + "mm"), this.target.css("height", e - p.a.instance.paperHeightTrim + "mm"), this.target.attr("original-height", this.mmheight), this.paperFooter = this.height, this.footerLinetarget.css("top", this.height + "pt"), this.contentHeight = this.paperFooter - this.paperHeader, this.paperNumberLeft = parseInt((this.width - 30).toString()), this.paperNumberTop = parseInt((this.height - 22).toString()), this.paperNumberTarget.css("top", this.paperNumberTop + "pt"), this.paperNumberTarget.css("left", this.paperNumberLeft + "pt"), this.triggerOnPaperBaseInfoChanged();
  5476. }, t.prototype.getPaperFooter = function (t) {
  5477. var e = this.index + t;
  5478. return 0 == e ? this.firstPaperFooter ? this.firstPaperFooter : this.oddPaperFooter ? this.oddPaperFooter : this.paperFooter : e % 2 == 0 ? this.oddPaperFooter ? this.oddPaperFooter : this.paperFooter : e % 2 == 1 ? this.evenPaperFooter ? this.evenPaperFooter : this.paperFooter : void 0;
  5479. }, t.prototype.getContentHeight = function (t) {
  5480. return this.getPaperFooter(t) - this.paperHeader;
  5481. }, t.prototype.createRuler = function () {
  5482. this.target.append('<div class="hiprint_rul_wrapper">\n <img class="h_img" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAAPCAYAAAC891QNAAAKxklEQVR4Xu1dPezlQxQ92yE6opGIaOg2QeWjUVjRSCg24qMgQtBItHazq5XoJBtBgYiCROGz0CBRiGRVdKISoRNKcmIudyfze+/tvL27v/Oc1+yX3/ife2buOXPv/OYdAXASwCnof4xjXRyaD/NREQHPq4qozo9pPuZjV/Gk+aiI6vyY5mM+dhVPmo+KqM6PaT7mY1fxpPmoiOr8mOZjPnYVT5qPiqjOj2k+5mNX8aT5qIjq/JjmYz52FU+aj4qozo9pPuZjV/Gk+aiI6vyY5mM+dhVPmo+KqE6OeQTAXwD4q/rHONbFoPkwHxUR8LyqiOr8mOZjPnYVT5qPiqjOj2k+5mNX8aT5qIjq/JjmYz52FU+aj4qozo9pPuZjV/Gk+aiI6vyY5mM+dhVPmo+KqM6PaT7mY1fxpPmoiOr8mOZjPnYVT5qPiqjOj2k+5mNX8aT5qIjq5JhuoE8GrvAxL5DC4E4MbT4mglb4iPkoDO7E0OZjImiFj5iPwuBODG0+JoJW+Ij5KAzuxNDmYyJohY+Yj8LgTgxtPiaCVviI+SgM7sTQ5mMiaIWPmI/C4E4MbT4mglb4iPkoDO7E0OZjImiFj5iPwuBODG0+JoJW+Ij5KAzu+Q6dG+gPAXgLwBkAzwH483wHu8T/fZ5YtwO4HsDbAK5qvx4DcAeAry7xz7ntfx84go9PAfD3/BCPEo4rALwM4Mk0r/h3ajjihgbOpacBvARAFUfMK84nrofvRfkIHGcBHAfwqyCOmwC8C+BoW98PA/hEEAfXxwsATgNQzlfE0eug6jrnlNqmg2vW/CU9Jy7+3D82Lb+xrSH+PfPAD9sE9iL/+y6+hOuemqjIB+fYly2m4a8UccS0yHNLEUf2u+Hl71+xt99lfZwA8KLo+ghd5PwKbbxHkI/Is/QqyvlqtB9UWOe77AcVcfwG4HIAzwN4BQD/rIgj78+V1kc/r7gnUdTzHgfnUe8V1eeVkp5vyldKet7jYP2H+1w1Pe9xXJ1qD8r5alQXXfs637UuqoiDfQM1Pd/Gh8r6GOG4WVDPRziiH6W0P982r1T0fBsOFT0f4eC+Q03PRziuE9TzbfNq9fXEaKDTTEVjkMW2KE5f5FrzXv+7KMRFwSqLHvGwURgY13w4gDjIB3l4NTVBGBw1HPmrAe5rHNwqjIPifWc7YBLrRGlekY8nALzfClW5wKCEI+crYmAiZlFaeX0EL4o4Mh807PzwAJMaHz0OYlDNu9t08HUAj7XDQGvU/JGeM2/FgawwVzzs91Hj6d7273sZiQv88JIvCT38qTUP3gHwoBgfbPrHh40pziNytGYvucQHcURzjc3arIcq64N8sNHJJsgHjZh86E8JRy6UEMNlgvkqr4/ghc0pxfURfHwL4BEAH4rykXGweKKQd3fZDyro+QjHN63w83M6KL729THC8XvTDCU9H+GInKWk50s41PR8aX2o6fmmfMUXWFT0fNP6UNLzTXwo6fk2HCp6vktdVEHPRzi47eBLIUp6PsLBnMs9oJKej3DECwVKer6EQ03Pl9aHmp5vyldKer5pfSjp+SY+lPR8G47V63k00Lmgo/jcF+AucD25bLilN1miwE4h6ZuHZT/MHgP3VzTEz09+2ChQxMFmzrWt8fyUKA6ui1sAXAngTQCKOPKJn3gb6lFBPpivuC54s4EyjhCQnHNV81W8ofZee1tQEUfWwXh7+xrB9RHzKr+B3vPxHYDbWsN5jZq/yxvoNIvx5tofrbHD3LymA3KbcNAmMPah7Wv2YJtwxNp/pt0EooqD/vCXhoE3mijiyDcC8BApG1SKOJiveJjs7vbGsyqO2ArE3oNFYEU+iIM+/oF20wf/rIgjdDAKo58J6SBjvrQfVNLzjIP72fzGmtL66HGo6nmPQ1XPexyqep5xcD3EjQBqet7nK1U9H61zRT3vcajq+UgHFfV8U11USc8zjv4NdCU973Go6nmPQ1XPexyqep5x5BsB1PS8z1eqej5a54p63uNQ1fORDkrouRvoe3S6ix6NQjWLCnzb7ot2vatiQyqfMFFvSDHBftyKhqoN9EPh49Aanflgj+I6H725rdp4jje3WVjnlaI3uIFepHSbh/0/NNCpiZxvfCtSqdCQD2YEi9EEUWpIZRxxiISNc35UG+iHwodyo7NfH/mAUhyYobdXOrjUv7mtvM75hhQ/XwN4Q6SBvm0/qFJw73GQB8UG+giHop6PcGROVNZ5j0NVzw+VD1U9H/GhqOc9DlU9H61zRT0Pn75UF1XR8x4HbzBR1PMRDkU9H+FQ1PMeBw9Qs+6ruD8nln5PqFgvyTiivivR6ATQv5g6qv3w1j6l/Xnmg7/nja/xUpGKbx+tcxk9P8Qr3PtkFUZR6Ypqvil8CsBr6TtdFXEcypXIxBHf2875xZNjkbCU5tWh8DFqoCvywfwbVyvx6xr4UVzn5ONxACcB8ISl8tXnIejBg+JV9KM30Pt5pXRFXL/5yNc7q1zh3vsSYrqr3dbAf1O5anvJX4VxV7gSeWl9vNUWP281eVbkSv1D5aMvuKvOK/ITX9fAt21V1zkP+nyeNujKfOR8q6CDu+wHVXH0DXT+ee1XuI/4UNTzTfNKSc+XcKjp+SHzoajnIz4U9XyEQ1HPl/hQ0/Nd6nAKej7C0TfQFfR8hIPNKLX9+aZ5paTnSzjU9PyQ+egb6Ar7waV8pbY/H+Hgi15q+/MlPmT0PBro/JVFaSaoM+1q5Py2KgH1JzjW/HdRcCee3Pzk96byOqy1Y2NDiqcwjkY3RxRHnlcsSh8TxhGFHn7/I9eI4rw6JD4iX6nPq3yanTnW8+rS5ef8FQehg6p85Mbakg7yIFBoPgtcvAZ9jdqY9TxyGDe4/P4lrpmzTSePtwNna/UqGccJAKdTw5baqMhHXh/x8yviyE110kKfqIjjUPg4FBycV/mGGeYmz6uLqzM578YekGs8fr92PnbdDyri4PrIb6zxDSNFHIp6vm1eqej5CIeinh8yH4p6vjSv1PT8kOeVop7vWodbuw6OcCjq+QiHop5vm1cqer40r6KmpbQ/31SnVuZDUc+X5pWanh/yOpfS89xAT71aqWZ5/NxrLZr75/tvZpkjrYMonrueu9aFHAGv3zUfnHO+cr5yvnK+WuMhIOcm5ybnJucm56aLe3jGedd513nXedd513nX9WfXr1y/+kcLvBYcA8+DPdeCG+h7BtCJyMm47U0sSBYkC5LzqQt2Lti5YOeCnQt2LtjZE9oT2hPaE9oT2hPaE9oT2hPaE9oT2hPaE9oT2hPaE9oTintCN9CdyJ3IncidyMUTuQ/y+CCPD/L8u4hdpHCRwkUKe1t7W3tbe1t7Wzeu3LiyJ7QntCe0J7QntCe0J7QntCe0J7QntCfcyxO6gW5DaUNpQ2lDaUNpQ2lDaUNpQ7mXofRBHh/k8UEeH+RJdsqaYk2xprjO4DqD6wyuM7jO4DqD6wz2hPaE9oT2hPaE9oTSntANdCcxJzEnMekk5qaNmzZu2rhp46bNOdU5FylcpHCRwv7e/t7+3v7ejSs3rty4sie0J7QntCe0J7QntCe0J7QntCe0J9zDE7qBbjNlM2UzZTNlM2UzZTNlM7WHmfJBHh/k8UEeH+TxQR4f5DnXTsK6al1148q1FtdaXGtxrcW1FtdaXGuxJ7QntCe0J7QnFPaEfwNdvyoPYn5mCwAAAABJRU5ErkJggg==" />\n <img class="v_img" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAAPCAYAAAC891QNAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAiHSURBVHhe7Z29q21HGYevplLTKSL4UQQkwUYQG1EUtBGba5qkyEeX+NGI9irof2ClvTaCtoqgoEkISAIpTZMiJBCCQsCvSq7vc88emExm7XO2++Tc+S2fB17WmnftzZ3ffWf2b601a+9za8Kdw7bHnDkwZw7MmQNz5sCcOTBnDsyZA3PmwJw5MGcOzJkDc+bAnDkwZw7MmYPlc+897IiIiIiIiIiIiIiIiIiIiPxf4wK6iIiIiIiIiIiIiIiIiIhI4QK6iIiIiIiIiIiIiIiIiIhI4QK6iIiIiIiIiIiIiIiIiIhI4QK6iIiIiIiIiIiIiIiIiIhIkbCA/vmKOxW/rfggieKxCvJJzHTQJl6qeJBEADMd7JOjLinMdDxd8b6L3Rj2XI+96IDbFSlzHPZcj59WkGO74nynT62P7f96poNj5FeGMY+/EQ363I+h1XXM6tHmAvF9EkWiDrZp42prfox9th43w551AP1/6mL3LtbjZtia57SJ1vdkHX09mq5VrwdnOug7/sexRqIO6tD63fw8UQdb2unjivkxzulEHXupx150AP3v/TxRx17q0XyQaPM9WUdfD/b716zGTAd9H/08UUfrM9H8PFEHW9rp42rm59bjZtizDqD/vZ9bj5tha57TJtp8T9bR1+Md64OzBfT3HLY99yr3/oovV3yo4scVX62YvW7GdfflnNyWDuKhit9VvFox45x/97pzMx2PH/Y59kBFG2wjN9G/q+a2dPys4l8V/aQZuYn+XTW393qwz+s/XLF1IXXdfTknN9PRXoeGv17sTrnuvpyTu2xcfboitR5fqHimgtd/s+LfFTOuuy+n5D5TQR/pP3P4YxVb4+oyzu3LyKm5r1U8eojvkRiYvXfGdfSl55TcWA/q0Grwg4o/HPavwin/7si5uVHHJw9b2knjaqaDmyTPVrST4Nl7Z5zbl5FTcnuuR9PxnYonK2bvnXFuX0ZOyc3mObB982J3+t4Z5/Zl5JTcZePq2xWz9844ty8jp+RGHb0Pcvy5w/YqnPLvjpybO6ajn+fEyteDW/Ojh9cRaTpmfk4k6djyDyJNx8zPCevxdt6N3DEdvZ8TafMc2PZ+TiSPq+bnRJKOLT8nUnW0eZ5wH25rfvSk6hj9PFHHzD9SdYx+bj1uLndMR/Pz1HkObJuf72Fc4eeJOmZ+nq6Dvrd5/o71wdW/gY6gNyr+VsHiE4tQiWzpwEi+W/HDiq2FnJU4Vg/6z2Dj2OrMdPy64hsVH6/4VUWqjkZ6PRLZ0tFMI6EWcFk9/l5BfnVmOjBFThg5kW9PJq8GfXyhgjn8jwoMPXF+8LTePyu4CUK/7z/k0hjrQZs5zYkUF+ecKCYw6uhPZtHwi4vd5Rl13FeB1/FwzNcrOJbAXuvR60hi1EEbuJn7l4vdCC6rxyuH7eqMOvDBj1b8vmLVb6fNmOmY+fnq14Nb82MkUcfMz9N0bPlHmo4tP7ceN8MxHT2J8xxGP0+vR/PzNB1bfp6oY+v6nNeseh9ua37MSNMx83NI0rHlH5Ck49j1ufV49zmmYyRJB22YXZ8n16O/Pk/Scez6PE3H6OfT9UH/Bvq9g8FFYY59CzIBBtYTFasuRp3KFyv+dLEbCSeN1IIFQn6WInHBCnodKTdKt+DEMXlMASeLPJX1fMUvK1Y0wqvAIu6PKnjyDLNMH1tyb+AhDJ7e7S/O03irghsMzOk9zANOhDmnevluKw/qwcUTT7nie+NP3qXQ6/gJiWC4uE0eU0A98GzmOR7e3/hJ4/WKz1Xwiyb8usle2Mv1YKqO0c8Tdcz8PHlc9X6eWo/Rz9N1ND9PHVejn6fWY/Tz1HqMfp6qY2Qv90VTdYx+nqhj5ufJ46r389R6jH6erqP5eeq4Gv08tR6jn6fWY/TzVB1bvG19cPUFdCb4RyqYJHz4tp9pAH4OJKUoMx2frfhzBfD3Gzi2OjMdn6j4TQVPl6SwNa74KQcW1lJuls50sLDJT07QfrEi4SJkqx4PV/AtYj6UeRJodWY62O8NPoGZDk4WOZnHHB+p4NjqbI0r4MESFtNXHFf0CX9ofXytYkvHyj7IZ88HKvAI+s0DC+3z6OcV/QM+K+sY6/Gfw5Zv1nNhe7uikaSD9qcqvlIxfj6l6YBvVXDC3pOmg4snzkF4Ur/pgiQdzHMegEMHDyulfF7N6rH18FtaPb5UgXfj4XzDq5Gko39oL8kHRx0zP+f46teDs/kBnBu2m7yJOmZ+nlqP0c9TdUDv56k6Rj9P1DHz89R6jH6eWo/RzxN1zPw8UcfMzxPui87mB/R+nqhj5uep9Rj9PHlc9X6eqmP080QdMz9Prcfo56n1GP08UcfMzxN1bN1vT1sfvAtmztM+TPh2MsUAI9/g+OqMOgj2ybUbWok6GHTtD/C3BZFUHdyAa2MMEnW0NpE8rjjx5WdA0nXQd9pE+1mTRB0E++TajepEHf3n1arjatbHUQdwjHxjNR3Q5nH/kz70uemC1XXM6sE2rR7HxhXR+p6qo+030nT07fRxhUek66Df9J820XwvsR5safefw4k66C/tvXzuNh39WGuvSdBBv5kXHINUHWxpp9ejjSuC/WQdbR8SdfTt9HE1+nmijr7PBJpS68GWdvPzVB178cFRR/8atrQTdND33s9TdbClnV6P0c+TdbR9SNTRt9PH1ejniTrod/MKon1upekAtrSbn6fq2IsPznS088XGajr+Z/YiRB1roY61UMdaqGMt1LEW6lgLdayFOtZCHWuhjrVQx1qoYy3UsRbqWAt1rIU61kIda6GOtVDHWtzxb6CLiIiIiIiIiIiIiIiIiIgU9x22e+CPh2066lgLdayFOtZCHWuhjrVQx1qoYy3UsRbqWAt1rIU61kIda6GOtVDHWqhjLdSxFupYC3WshTqW4dat/wKB2hwSL8nDjQAAAABJRU5ErkJggg==" />\n </div>');
  5483. }, t.prototype.displayHeight = function () {
  5484. return this.mmheight - p.a.instance.paperHeightTrim + "mm";
  5485. }, t.prototype.displayWidth = function () {
  5486. return this.mmwidth + "mm";
  5487. }, t.prototype.getPanelTarget = function () {
  5488. return this.target.parent(".hiprint-printPanel ");
  5489. }, t;
  5490. }(),
  5491. P = n(6),
  5492. _ = function () {
  5493. var _t5 = function t(e, n) {
  5494. return (_t5 = Object.setPrototypeOf || _instanceof({
  5495. __proto__: []
  5496. }, Array) && function (t, e) {
  5497. t.__proto__ = e;
  5498. } || function (t, e) {
  5499. for (var n in e) {
  5500. e.hasOwnProperty(n) && (t[n] = e[n]);
  5501. }
  5502. })(e, n);
  5503. };
  5504. return function (e, n) {
  5505. function i() {
  5506. this.constructor = e;
  5507. }
  5508. _t5(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5509. };
  5510. }(),
  5511. w = function (t) {
  5512. function e(e, n) {
  5513. var i = t.call(this, e) || this;
  5514. return i.options = new b(n), i.options.setDefault(new b(p.a.instance.longText.default).getPrintElementOptionEntity()), i;
  5515. }
  5516. return _(e, t), e.prototype.getDesignTarget = function (e) {
  5517. var n = t.prototype.getDesignTarget.call(this, e);
  5518. return n.find(".hiprint-printElement-longText-content").css("border", "1px dashed #cebcbc"), n;
  5519. }, e.prototype.getProxyTarget = function (t) {
  5520. t && this.SetProxyTargetOption(t);
  5521. var e = this.getData(),
  5522. n = this.createTarget(this.printElementType.getText(!0), e);
  5523. return this.updateTargetSize(n), this.css(n, e), n;
  5524. }, e.prototype.updateDesignViewFromOptions = function () {
  5525. if (this.designTarget) {
  5526. var t = this.getData(),
  5527. e = this.getHtml(this.designPaper)[0].target;
  5528. this.designTarget.find(".hiprint-printElement-longText-content").html(e.find(".hiprint-printElement-longText-content").html()), this.css(this.designTarget, t);
  5529. }
  5530. }, e.prototype.getConfigOptions = function () {
  5531. return p.a.instance.longText;
  5532. }, e.prototype.getTitle = function () {
  5533. return this.options.title || this.printElementType.title;
  5534. }, e.prototype.getData = function (t) {
  5535. return t ? t[this.getField()] || "" : this.options.testData || this.printElementType.getData() || "";
  5536. }, e.prototype.updateTargetText = function (t, e, n) {
  5537. var i = t.find(".hiprint-printElement-longText-content"),
  5538. o = this.getText(e, n);
  5539. i.html(o);
  5540. }, e.prototype.createTarget = function (t, e) {
  5541. var n = $('<div class="hiprint-printElement hiprint-printElement-longText" style="position: absolute;"><div class="hiprint-printElement-longText-content hiprint-printElement-content" style="height:100%;width:100%"></div></div>');
  5542. return this.updateTargetText(n, t, e), n;
  5543. }, e.prototype.getText = function (t, e) {
  5544. var n = this.getFormatter();
  5545. e && (e = 0 != this.options.leftSpaceRemoved ? e.toString().replace(/^\s*/, "") : e);
  5546. return (this.getField() ? (this.options.getHideTitle() ? "" : t ? t + ":" : "") + (n ? n(t, e, this.options, this._currenttemplateData) : e) : n ? n(t, t, this.options, this._currenttemplateData) : t || "") || "";
  5547. }, e.prototype.getHtml = function (t, e) {
  5548. this.setCurrenttemplateData(e), this.createTempContainer();
  5549. var n = this.getPaperHtmlResult(t, e);
  5550. return this.removeTempContainer(), n;
  5551. }, e.prototype.getHeightByData = function (t) {
  5552. this.createTempContainer();
  5553. var e = this.getPaperHtmlResult(new T("", 1e3, 1e3, 0, 25e3, 0, 0, !0, void 0, 0, void 0), {}, t);
  5554. return this.removeTempContainer(), e[0].referenceElement.bottomInLastPaper - e[0].referenceElement.printTopInPaper;
  5555. }, e.prototype.getLongTextIndent = function () {
  5556. return this.options.longTextIndent ? '<span class="long-text-indent" style="margin-left:' + this.options.longTextIndent + 'pt"></span>' : '<span class="long-text-indent"></span>';
  5557. }, e.prototype.getPaperHtmlResult = function (t, e, n) {
  5558. var i = this,
  5559. o = [],
  5560. r = 0,
  5561. a = n || this.getData(e),
  5562. p = this.getText(this.getTitle(), a),
  5563. s = this.createTarget(this.getTitle(), this.options.testData || "");
  5564. this.css(s, a), e ? this.updateTargetWidth(s) : this.updateTargetSize(s), this.getTempContainer().html(""), this.getTempContainer().append(s);
  5565. var l = [this.getLongTextIndent()],
  5566. u = p.split(new RegExp("\r|\n", "g"));
  5567. if (u.forEach(function (t, e) {
  5568. var n = 0 != i.options.leftSpaceRemoved ? (t || "").toString().replace(/^\s*/, "") : t;
  5569. l = l.concat(n.split("")), e < u.length - 1 && l.push("<br/>" + i.getLongTextIndent());
  5570. }), 0 == l.length && (l = [""]), this.isHeaderOrFooter() || this.isFixed() || !e) return (f = this.getStringBySpecificHeight(l, 25e3, s)).target.css("left", this.options.displayLeft()), f.target.css("top", this.options.displayTop()), f.target[0].height = "", o.push(new P.a({
  5571. target: f.target,
  5572. printLine: this.options.displayTop() + f.height,
  5573. referenceElement: new E.a({
  5574. top: this.options.getTop(),
  5575. left: this.options.getLeft(),
  5576. height: this.options.getHeight(),
  5577. width: this.options.getWidth(),
  5578. beginPrintPaperIndex: t.index,
  5579. bottomInLastPaper: this.options.getTop() + f.height,
  5580. printTopInPaper: this.options.getTop()
  5581. })
  5582. })), o;
  5583. for (var d = this.getBeginPrintTopInPaperByReferenceElement(t); l.length > 0;) {
  5584. var c = 0,
  5585. h = t.getPaperFooter(r);
  5586. 0 == r && d > h && (d = d - h + t.paperHeader, o.push(new P.a({
  5587. target: void 0,
  5588. printLine: void 0
  5589. })), r++ , c = t.getContentHeight(r) - (d - t.paperHeader), h = t.getPaperFooter(r));
  5590. var f = this.getStringBySpecificHeight(l, c > 0 ? c : 0 == r ? h - d : t.getContentHeight(r), s);
  5591. l.splice(0, f.length);
  5592. var g = void 0,
  5593. m = void 0;
  5594. f.target.css("left", this.options.displayLeft()), f.target[0].height = "", 0 == r || c > 0 ? (m = d, f.target.css("top", m + "pt"), g = l.length > 0 ? d + f.height : null != this.options.lHeight ? d + (f.height > this.options.lHeight ? f.height : this.options.lHeight) : d + f.height) : (m = t.paperHeader, f.target.css("top", m + "pt"), g = m + f.height), o.push(new P.a({
  5595. target: f.target,
  5596. printLine: g,
  5597. referenceElement: new E.a({
  5598. top: this.options.getTop(),
  5599. left: this.options.getLeft(),
  5600. height: this.options.getHeight(),
  5601. width: this.options.getWidth(),
  5602. beginPrintPaperIndex: t.index,
  5603. bottomInLastPaper: g,
  5604. printTopInPaper: m
  5605. })
  5606. })), r++;
  5607. }
  5608. return o;
  5609. }, e.prototype.getStringBySpecificHeight = function (t, e, n) {
  5610. var i = o.a.pt.toPx(e),
  5611. r = this.IsPaginationIndex(t, t.length - 1, i, n);
  5612. return r.IsPagination ? r : this.BinarySearch(t, 0, t.length - 1, i, n);
  5613. }, e.prototype.BinarySearch = function (t, e, n, i, o) {
  5614. var r = Math.floor((e + n) / 2);
  5615. if (e > n) return o.find(".hiprint-printElement-longText-content").html(""), {
  5616. IsPagination: !0,
  5617. height: 0,
  5618. length: 0,
  5619. target: o.clone()
  5620. };
  5621. var a = this.IsPaginationIndex(t, r, i, o);
  5622. return a.IsPagination ? a : "l" == a.move ? this.BinarySearch(t, e, r - 1, i, o) : this.BinarySearch(t, r + 1, n, i, o);
  5623. }, e.prototype.IsPaginationIndex = function (t, e, n, i) {
  5624. i.find(".hiprint-printElement-longText-content").html(t.slice(0, e + 2).join(""));
  5625. var r = i.height();
  5626. i.find(".hiprint-printElement-longText-content").html(t.slice(0, e + 1).join(""));
  5627. var a = i.height();
  5628. return e >= t.length - 1 && a < n ? {
  5629. IsPagination: !0,
  5630. height: o.a.px.toPt(a),
  5631. length: t.length,
  5632. target: i.clone()
  5633. } : a <= n && r >= n ? {
  5634. IsPagination: !0,
  5635. height: a,
  5636. length: e + 1,
  5637. target: i.clone()
  5638. } : a >= n ? {
  5639. IsPagination: !1,
  5640. move: "l"
  5641. } : r <= n ? {
  5642. IsPagination: !1,
  5643. move: "r"
  5644. } : {
  5645. IsPagination: !0,
  5646. result: 1
  5647. };
  5648. }, e;
  5649. }(f.a),
  5650. x = function () {
  5651. function t() { }
  5652. return t.replaceEnterAndNewline = function (t, e) {
  5653. return t.replace(new RegExp("\r|\n|/g", "g"), e);
  5654. }, t.replaceTab = function (t, e) {
  5655. return t.replace(new RegExp("\t/g", "g"), e);
  5656. }, t.replaceEnterAndNewlineAndTab = function (t, e) {
  5657. return t.replace(new RegExp("\r|\n|\t|/g", "g"), e);
  5658. }, t;
  5659. }(),
  5660. C = function () {
  5661. var _t6 = function t(e, n) {
  5662. return (_t6 = Object.setPrototypeOf || _instanceof({
  5663. __proto__: []
  5664. }, Array) && function (t, e) {
  5665. t.__proto__ = e;
  5666. } || function (t, e) {
  5667. for (var n in e) {
  5668. e.hasOwnProperty(n) && (t[n] = e[n]);
  5669. }
  5670. })(e, n);
  5671. };
  5672. return function (e, n) {
  5673. function i() {
  5674. this.constructor = e;
  5675. }
  5676. _t6(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5677. };
  5678. }(),
  5679. O = function (t) {
  5680. function e(e) {
  5681. var n = t.call(this, e) || this;
  5682. return n.title && (n.title = x.replaceEnterAndNewlineAndTab(n.title, "")), n;
  5683. }
  5684. return C(e, t), e.prototype.getHideTitle = function () {
  5685. return null == this.hideTitle ? this.defaultOptions.hideTitle : this.hideTitle;
  5686. }, e.prototype.getTextType = function () {
  5687. return (null == this.textType ? this.defaultOptions.textType : this.textType) || "text";
  5688. }, e.prototype.getFontSize = function () {
  5689. return (null == this.fontSize ? this.defaultOptions.fontSize : this.fontSize) || 9;
  5690. }, e.prototype.getbarcodeMode = function () {
  5691. return (null == this.barcodeMode ? this.defaultOptions.barcodeMode : this.barcodeMode) || "CODE128";
  5692. }, e;
  5693. }(g.a),
  5694. H = function () {
  5695. var _t7 = function t(e, n) {
  5696. return (_t7 = Object.setPrototypeOf || _instanceof({
  5697. __proto__: []
  5698. }, Array) && function (t, e) {
  5699. t.__proto__ = e;
  5700. } || function (t, e) {
  5701. for (var n in e) {
  5702. e.hasOwnProperty(n) && (t[n] = e[n]);
  5703. }
  5704. })(e, n);
  5705. };
  5706. return function (e, n) {
  5707. function i() {
  5708. this.constructor = e;
  5709. }
  5710. _t7(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5711. };
  5712. }(),
  5713. D = function (t) {
  5714. function e(e, n) {
  5715. var i = t.call(this, e) || this;
  5716. return i.options = new O(n), i.options.setDefault(new O(p.a.instance.text.default).getPrintElementOptionEntity()), i;
  5717. }
  5718. return H(e, t), e.prototype.getDesignTarget = function (e) {
  5719. return t.prototype.getDesignTarget.call(this, e);
  5720. }, e.prototype.getProxyTarget = function (t) {
  5721. t && this.SetProxyTargetOption(t);
  5722. var e = this.getData(),
  5723. n = this.createTarget(this.printElementType.getText(!0), e);
  5724. return this.updateTargetSize(n), this.css(n, e), n;
  5725. }, e.prototype.updateDesignViewFromOptions = function () {
  5726. if (this.designTarget) {
  5727. var t = this.getData();
  5728. this.css(this.designTarget, t), this.updateTargetText(this.designTarget, this.getTitle(), t);
  5729. }
  5730. }, e.prototype.getConfigOptions = function () {
  5731. return p.a.instance.text;
  5732. }, e.prototype.getTitle = function () {
  5733. var t = this.options.title || this.printElementType.title || "";
  5734. return t && (t = x.replaceEnterAndNewlineAndTab(t, "")), t;
  5735. }, e.prototype.getData = function (t) {
  5736. var e = void 0;
  5737. if (e = t ? t[this.getField()] || "" : this.options.testData || this.printElementType.getData() || "", this.options.format) {
  5738. if ("datetime" == this.options.dataType) return o.a.dateFormat(e, this.options.format);
  5739. if ("boolen" == this.options.dataType) {
  5740. var n = this.options.format.split(":");
  5741. if (n.length > 0) return !0 === e || "true" === e ? n[0] : n[1];
  5742. }
  5743. }
  5744. return e;
  5745. }, e.prototype.updateTargetText = function (t, e, n, i) {
  5746. var r = this.getFormatter(),
  5747. a = t.find(".hiprint-printElement-text-content"),
  5748. p = "";
  5749. p = this.getField() ? (this.options.getHideTitle() ? "" : e ? e + ":" : "") + (r ? r(e, n, this.options, this._currenttemplateData, t) : n) : n = r ? r(e, e, this.options, this._currenttemplateData, t) : e;
  5750. var s = this.options.getTextType();
  5751. if ("text" == s) a.html(p); else {
  5752. if ("barcode" == s) {
  5753. a.html('<svg width="100%" display="block" height="100%" class="hibarcode_imgcode" preserveAspectRatio="none slice"></svg ><div class="hibarcode_displayValue"></div>');
  5754. try {
  5755. n ? (JsBarcode(a.find(".hibarcode_imgcode")[0], n, {
  5756. format: this.options.getbarcodeMode(),
  5757. width: 1,
  5758. textMargin: -1,
  5759. lineColor: this.options.color || "#000000",
  5760. margin: 0,
  5761. height: parseInt(o.a.pt.toPx(this.options.getHeight() || 10).toString()),
  5762. displayValue: !1
  5763. }), a.find(".hibarcode_imgcode").attr("height", "100%"), a.find(".hibarcode_imgcode").attr("width", "100%"), this.options.hideTitle || a.find(".hibarcode_displayValue").html(n)) : a.html("");
  5764. } catch (t) {
  5765. console.log(t), a.html("此格式不支持该文本");
  5766. }
  5767. }
  5768. if ("qrcode" == s) {
  5769. a.html("");
  5770. try {
  5771. if (n) {
  5772. var l = parseInt(o.a.pt.toPx(this.options.getWidth() || 20)),
  5773. u = parseInt(o.a.pt.toPx(this.options.getHeight() || 20));
  5774. new QRCode(a[0], {
  5775. width: l,
  5776. height: u,
  5777. colorDark: this.options.color || "#000000",
  5778. useSVG: !0
  5779. }).makeCode(n);
  5780. }
  5781. } catch (t) {
  5782. console.log(t), a.html("二维码生成失败");
  5783. }
  5784. }
  5785. }
  5786. }, e.prototype.onResize = function (e, n, i, o, r) {
  5787. t.prototype.onResize.call(this, e, n, i, o, r);
  5788. "barcode" != this.options.getTextType() && "qrcode" != this.options.getTextType() || this.updateTargetText(this.designTarget, this.getTitle(), this.getData());
  5789. }, e.prototype.createTarget = function (t, e, n) {
  5790. var i = $('<div tabindex="1" class="hiprint-printElement hiprint-printElement-text" style="position: absolute;"><div class="hiprint-printElement-text-content hiprint-printElement-content" style="height:100%;width:100%"></div></div>');
  5791. return this.updateTargetText(i, t, e, n), i;
  5792. }, e.prototype.getHtml = function (t, e, n) {
  5793. return this.getHtml2(t, e, n);
  5794. }, e;
  5795. }(f.a),
  5796. I = function () {
  5797. var _t8 = function t(e, n) {
  5798. return (_t8 = Object.setPrototypeOf || _instanceof({
  5799. __proto__: []
  5800. }, Array) && function (t, e) {
  5801. t.__proto__ = e;
  5802. } || function (t, e) {
  5803. for (var n in e) {
  5804. e.hasOwnProperty(n) && (t[n] = e[n]);
  5805. }
  5806. })(e, n);
  5807. };
  5808. return function (e, n) {
  5809. function i() {
  5810. this.constructor = e;
  5811. }
  5812. _t8(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5813. };
  5814. }(),
  5815. R = function (t) {
  5816. function e(e) {
  5817. return t.call(this, e) || this;
  5818. }
  5819. return I(e, t), e;
  5820. }(g.a),
  5821. M = function () {
  5822. var _t9 = function t(e, n) {
  5823. return (_t9 = Object.setPrototypeOf || _instanceof({
  5824. __proto__: []
  5825. }, Array) && function (t, e) {
  5826. t.__proto__ = e;
  5827. } || function (t, e) {
  5828. for (var n in e) {
  5829. e.hasOwnProperty(n) && (t[n] = e[n]);
  5830. }
  5831. })(e, n);
  5832. };
  5833. return function (e, n) {
  5834. function i() {
  5835. this.constructor = e;
  5836. }
  5837. _t9(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5838. };
  5839. }(),
  5840. S = function (t) {
  5841. function e(e, n) {
  5842. var i = t.call(this, e) || this;
  5843. return i.options = new R(n), i.options.setDefault(new R(p.a.instance.html.default).getPrintElementOptionEntity()), i;
  5844. }
  5845. return M(e, t), e.prototype.updateDesignViewFromOptions = function () {
  5846. if (this.designTarget) {
  5847. var t = this.getData();
  5848. this.css(this.designTarget, t), this.updateTargetHtml();
  5849. }
  5850. }, e.prototype.updateTargetHtml = function () {
  5851. var t = this.getFormatter();
  5852. if (t) {
  5853. var e = t(this.getData(), this.options, this._currenttemplateData);
  5854. this.designTarget.find(".hiprint-printElement-html-content").html(e);
  5855. }
  5856. }, e.prototype.getConfigOptions = function () {
  5857. return p.a.instance.html;
  5858. }, e.prototype.createTarget = function (t, e) {
  5859. var n = $('<div class="hiprint-printElement hiprint-printElement-html" style="position: absolute;"><div class="hiprint-printElement-html-content" style="height:100%;width:100%"></div></div>'),
  5860. i = this.getFormatter();
  5861. if (i) {
  5862. var o = i(this.getData(), this.options, this._currenttemplateData);
  5863. n.find(".hiprint-printElement-html-content").append(o);
  5864. } else this.options.content && n.find(".hiprint-printElement-html-content").append(this.options.content);
  5865. return n;
  5866. }, e.prototype.getHtml = function (t, e, n) {
  5867. return this.getHtml2(t, e, n);
  5868. }, e;
  5869. }(f.a),
  5870. B = function () {
  5871. var _t10 = function t(e, n) {
  5872. return (_t10 = Object.setPrototypeOf || _instanceof({
  5873. __proto__: []
  5874. }, Array) && function (t, e) {
  5875. t.__proto__ = e;
  5876. } || function (t, e) {
  5877. for (var n in e) {
  5878. e.hasOwnProperty(n) && (t[n] = e[n]);
  5879. }
  5880. })(e, n);
  5881. };
  5882. return function (e, n) {
  5883. function i() {
  5884. this.constructor = e;
  5885. }
  5886. _t10(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5887. };
  5888. }(),
  5889. F = function (t) {
  5890. function e(e, n) {
  5891. var i = t.call(this, e) || this;
  5892. return i.options = new g.a(n), i.options.setDefault(new g.a(p.a.instance.vline.default).getPrintElementOptionEntity()), i;
  5893. }
  5894. return B(e, t), e.prototype.updateDesignViewFromOptions = function () {
  5895. if (this.designTarget) {
  5896. var t = this.getData();
  5897. this.css(this.designTarget, t);
  5898. }
  5899. }, e.prototype.getConfigOptions = function () {
  5900. return p.a.instance.hline;
  5901. }, e.prototype.createTarget = function (t, e) {
  5902. return $('<div class="hiprint-printElement hiprint-printElement-vline" style="border-left:1px solid;position: absolute;"></div>');
  5903. }, e.prototype.getReizeableShowPoints = function () {
  5904. return ["s"];
  5905. }, e.prototype.getHtml = function (t, e, n) {
  5906. return this.getHtml2(t, e, n);
  5907. }, e;
  5908. }(f.a),
  5909. L = function () {
  5910. var _t11 = function t(e, n) {
  5911. return (_t11 = Object.setPrototypeOf || _instanceof({
  5912. __proto__: []
  5913. }, Array) && function (t, e) {
  5914. t.__proto__ = e;
  5915. } || function (t, e) {
  5916. for (var n in e) {
  5917. e.hasOwnProperty(n) && (t[n] = e[n]);
  5918. }
  5919. })(e, n);
  5920. };
  5921. return function (e, n) {
  5922. function i() {
  5923. this.constructor = e;
  5924. }
  5925. _t11(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5926. };
  5927. }(),
  5928. A = function (t) {
  5929. function e(e, n) {
  5930. var i = t.call(this, e) || this;
  5931. return i.options = new g.a(n), i.options.setDefault(new g.a(p.a.instance.hline.default).getPrintElementOptionEntity()), i;
  5932. }
  5933. return L(e, t), e.prototype.updateDesignViewFromOptions = function () {
  5934. if (this.designTarget) {
  5935. var t = this.getData();
  5936. this.css(this.designTarget, t);
  5937. }
  5938. }, e.prototype.getConfigOptions = function () {
  5939. return p.a.instance.hline;
  5940. }, e.prototype.createTarget = function (t, e) {
  5941. return $('<div class="hiprint-printElement hiprint-printElement-hline" style="border-top:1px solid;position: absolute;"></div>');
  5942. }, e.prototype.getReizeableShowPoints = function () {
  5943. return ["e"];
  5944. }, e;
  5945. }(f.a),
  5946. z = function () {
  5947. var _t12 = function t(e, n) {
  5948. return (_t12 = Object.setPrototypeOf || _instanceof({
  5949. __proto__: []
  5950. }, Array) && function (t, e) {
  5951. t.__proto__ = e;
  5952. } || function (t, e) {
  5953. for (var n in e) {
  5954. e.hasOwnProperty(n) && (t[n] = e[n]);
  5955. }
  5956. })(e, n);
  5957. };
  5958. return function (e, n) {
  5959. function i() {
  5960. this.constructor = e;
  5961. }
  5962. _t12(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5963. };
  5964. }(),
  5965. k = function (t) {
  5966. function e(e, n) {
  5967. var i = t.call(this, e) || this;
  5968. return i.options = new g.a(n), i.options.setDefault(new g.a(p.a.instance.rect.default).getPrintElementOptionEntity()), i;
  5969. }
  5970. return z(e, t), e.prototype.updateDesignViewFromOptions = function () {
  5971. if (this.designTarget) {
  5972. var t = this.getData();
  5973. this.css(this.designTarget, t);
  5974. }
  5975. }, e.prototype.getConfigOptions = function () {
  5976. return p.a.instance.hline;
  5977. }, e.prototype.createTarget = function (t, e) {
  5978. return $('<div class="hiprint-printElement hiprint-printElement-rect" style="border:1px solid;position: absolute;"></div>');
  5979. }, e.prototype.getHtml = function (t, e, n) {
  5980. return this.getHtml2(t, e, n);
  5981. }, e;
  5982. }(f.a),
  5983. N = function () {
  5984. var _t13 = function t(e, n) {
  5985. return (_t13 = Object.setPrototypeOf || _instanceof({
  5986. __proto__: []
  5987. }, Array) && function (t, e) {
  5988. t.__proto__ = e;
  5989. } || function (t, e) {
  5990. for (var n in e) {
  5991. e.hasOwnProperty(n) && (t[n] = e[n]);
  5992. }
  5993. })(e, n);
  5994. };
  5995. return function (e, n) {
  5996. function i() {
  5997. this.constructor = e;
  5998. }
  5999. _t13(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  6000. };
  6001. }(),
  6002. V = function (t) {
  6003. function e(e, n) {
  6004. var i = t.call(this, e) || this;
  6005. return i.options = new g.a(n), i.options.setDefault(new g.a(p.a.instance.oval.default).getPrintElementOptionEntity()), i;
  6006. }
  6007. return N(e, t), e.prototype.updateDesignViewFromOptions = function () {
  6008. if (this.designTarget) {
  6009. var t = this.getData();
  6010. this.css(this.designTarget, t);
  6011. }
  6012. }, e.prototype.getConfigOptions = function () {
  6013. return p.a.instance.hline;
  6014. }, e.prototype.createTarget = function (t, e) {
  6015. return $('<div class="hiprint-printElement hiprint-printElement-oval" style="border:1px solid;position: absolute;border-radius: 50%;"></div>');
  6016. }, e.prototype.getHtml = function (t, e, n) {
  6017. return this.getHtml2(t, e, n);
  6018. }, e;
  6019. }(f.a),
  6020. W = function () {
  6021. function t() { }
  6022. return t.createPrintElement = function (t, e) {
  6023. return "text" == t.type ? new D(t, e) : "image" == t.type ? new v(t, e) : "longText" == t.type ? new w(t, e) : "table" == t.type ? new d.a(t, e) : "html" == t.type ? new S(t, e) : "vline" == t.type ? new F(t, e) : "hline" == t.type ? new A(t, e) : "rect" == t.type ? new k(t, e) : "oval" == t.type ? new V(t, e) : void 0;
  6024. }, t;
  6025. }(),
  6026. j = function () {
  6027. function t(t) {
  6028. this.field = t.field, this.fields = t.fields, this.title = t.title, this.text = t.text, this.tid = t.tid, this.data = t.data, this.styler = t.styler, this.formatter = t.formatter, this.type = t.type, this.onRendered = t.onRendered, this.options = t.options;
  6029. }
  6030. return t.prototype.getText = function (t) {
  6031. return t ? this.title || this.text || "" : this.text || this.title || "";
  6032. }, t.prototype.getData = function () {
  6033. return this.data;
  6034. }, t.prototype.createPrintElement = function (t) {
  6035. var e = {};
  6036. return $.extend(e, t || {}), W.createPrintElement(this, e);
  6037. }, t.prototype.getPrintElementTypeEntity = function () {
  6038. return new c({
  6039. title: this.title,
  6040. type: this.type
  6041. });
  6042. }, t.prototype.getFields = function () {
  6043. return this.fields;
  6044. }, t.prototype.getOptions = function () {
  6045. return this.options || {};
  6046. }, t;
  6047. }(),
  6048. U = n(16),
  6049. K = n(12),
  6050. G = function () {
  6051. var _t14 = function t(e, n) {
  6052. return (_t14 = Object.setPrototypeOf || _instanceof({
  6053. __proto__: []
  6054. }, Array) && function (t, e) {
  6055. t.__proto__ = e;
  6056. } || function (t, e) {
  6057. for (var n in e) {
  6058. e.hasOwnProperty(n) && (t[n] = e[n]);
  6059. }
  6060. })(e, n);
  6061. };
  6062. return function (e, n) {
  6063. function i() {
  6064. this.constructor = e;
  6065. }
  6066. _t14(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  6067. };
  6068. }(),
  6069. q = function (t) {
  6070. function e(e) {
  6071. var n = t.call(this, e) || this;
  6072. (e = e || {}).columns ? (n.columns = [], e.columns.forEach(function (t) {
  6073. n.columns.push(new K.a(t));
  6074. })) : n.columns = [new K.a({
  6075. columns: [new u.a({
  6076. width: 100
  6077. }), new u.a({
  6078. width: 100
  6079. })]
  6080. })];
  6081. return n.lHeight = e.lHeight, n.autoCompletion = e.autoCompletion, n.tableFooterRepeat = e.tableFooterRepeat, n;
  6082. }
  6083. return G(e, t), e.prototype.getPrintElementOptionEntity = function () {
  6084. var e = t.prototype.getPrintElementOptionEntity.call(this);
  6085. return e.columns = [], this.columns.forEach(function (t) {
  6086. e.columns.push(t.getPrintElementOptionEntity());
  6087. }), e;
  6088. }, e;
  6089. }(g.a),
  6090. X = n(7),
  6091. Y = function () {
  6092. var _t15 = function t(e, n) {
  6093. return (_t15 = Object.setPrototypeOf || _instanceof({
  6094. __proto__: []
  6095. }, Array) && function (t, e) {
  6096. t.__proto__ = e;
  6097. } || function (t, e) {
  6098. for (var n in e) {
  6099. e.hasOwnProperty(n) && (t[n] = e[n]);
  6100. }
  6101. })(e, n);
  6102. };
  6103. return function (e, n) {
  6104. function i() {
  6105. this.constructor = e;
  6106. }
  6107. _t15(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  6108. };
  6109. }(),
  6110. J = function (t) {
  6111. function e(e, n) {
  6112. var i = t.call(this, e) || this;
  6113. return i.options = new q(n), i.options.setDefault(new q(p.a.instance.tableCustom.default).getPrintElementOptionEntity()), i.columns = i.options.columns, i;
  6114. }
  6115. return Y(e, t), e.prototype.updateDesignViewFromOptions = function () {
  6116. if (this.designTarget) {
  6117. this.css(this.designTarget, this.getData());
  6118. var t = this.designTarget.find(".hiprint-printElement-table-content"),
  6119. e = this.getHtml(this.designPaper);
  6120. t.html(""), t.append(e[0].target.find(".hiprint-printElement-tableTarget")), this.setHiReizeable();
  6121. }
  6122. }, e.prototype.getDesignTarget = function (t) {
  6123. var e = this;
  6124. return this.designTarget = this.getHtml(t)[0].target, this.designPaper = t, this.designTarget.click(function () {
  6125. o.a.event.trigger(e.getPrintElementSelectEventKey(), {
  6126. printElement: e
  6127. });
  6128. }), this.designTarget.find("td").hidroppable({
  6129. accept: ".rn-draggable-item",
  6130. onDrop: function onDrop(t, e) { },
  6131. onDragEnter: function onDragEnter(t, e) {
  6132. $(e).removeClass("rn-draggable-item");
  6133. },
  6134. onDragLeave: function onDragLeave(t, e) {
  6135. $(e).addClass("rn-draggable-item");
  6136. }
  6137. }), this.designTarget;
  6138. }, e.prototype.getConfigOptions = function () {
  6139. return p.a.instance.tableCustom;
  6140. }, e.prototype.createTarget = function (t, e, n) {
  6141. var i = $('<div class="hiprint-printElement hiprint-printElement-table" style="position: absolute;"><div class="hiprint-printElement-table-handle"></div><div class="hiprint-printElement-table-content" style="height:100%;width:100%"></span></div>');
  6142. return i.find(".hiprint-printElement-table-content").append(this.getTableHtml(e, n)), i;
  6143. }, e.prototype.getTableHtml = function (t, e) {
  6144. var n = $('<table class="hiprint-printElement-tableTarget" style="border-collapse: collapse;width:100%;"></table>');
  6145. return n.append(X.a.createTableHead(this.columns, this.options.getWidth())), n.append(X.a.createTableRow(this.columns, t, this.options, this.printElementType)), this.printElementType.footerFormatter && ("no" == this.options.tableFooterRepeat || ("last" == this.options.tableFooterRepeat ? n.find("tbody").append(X.a.createTableFooter(this.printElementType.columns, t, this.options, this.printElementType, e, t).html()) : n.append(X.a.createTableFooter(this.printElementType.columns, t, this.options, this.printElementType, e, [])))), n;
  6146. }, e.prototype.getHtml = function (t, e) {
  6147. this.setCurrenttemplateData(e), this.createTempContainer();
  6148. var n = this.getPaperHtmlResult(t, e);
  6149. return this.removeTempContainer(), n;
  6150. }, e.prototype.getPaperHtmlResult = function (t, e) {
  6151. var n = [],
  6152. i = this.getData(e),
  6153. o = this.getTableHtml(i, e),
  6154. r = this.createTarget(this.printElementType.title, [], e);
  6155. e ? this.updateTargetWidth(r) : this.updateTargetSize(r), this.css(r, i), this.css(o, i), this.getTempContainer().html(""), this.getTempContainer().append(r);
  6156. for (var a, p = this.getBeginPrintTopInPaperByReferenceElement(t), s = 0, l = !1; !l;) {
  6157. var u = 0,
  6158. d = t.getPaperFooter(s);
  6159. 0 == s && p > d && (p = p - d + t.paperHeader, n.push(new P.a({
  6160. target: void 0,
  6161. printLine: void 0
  6162. })), s++ , u = t.getContentHeight(s) - (p - t.paperHeader), d = t.getPaperFooter(s));
  6163. var c = n.length > 0 ? n[n.length - 1].target : void 0,
  6164. h = this.getRowsInSpecificHeight(u > 0 ? u : 0 == s ? d - p : t.getContentHeight(s), r, o, s, c, e);
  6165. l = h.isEnd;
  6166. var f = void 0;
  6167. h.target && (h.target.css("left", this.options.displayLeft()), h.target[0].height = ""), 0 == s || u > 0 ? (h.target && (a = p, h.target.css("top", p + "pt")), f = l && null != this.options.lHeight ? p + (h.height > this.options.lHeight ? h.height : this.options.lHeight) : p + h.height) : (h.target && (a = t.paperHeader, h.target.css("top", t.paperHeader + "pt")), f = t.paperHeader + h.height), n.push(new P.a({
  6168. target: h.target,
  6169. printLine: f,
  6170. referenceElement: new E.a({
  6171. top: this.options.getTop(),
  6172. left: this.options.getLeft(),
  6173. height: this.options.getHeight(),
  6174. width: this.options.getWidth(),
  6175. beginPrintPaperIndex: t.index,
  6176. bottomInLastPaper: f,
  6177. printTopInPaper: a
  6178. })
  6179. })), s++;
  6180. }
  6181. return n;
  6182. }, e.prototype.getRowsInSpecificHeight = function (t, e, n, i, r, a) {
  6183. var p = void 0,
  6184. s = n.find("tbody"),
  6185. l = o.a.pt.toPx(t);
  6186. e.find("tbody").html("");
  6187. for (var u = e.outerHeight(), d = []; ;) {
  6188. if (u <= l) {
  6189. if (0 == s.find("tr").length) {
  6190. a && this.options.autoCompletion && (this.autoCompletion(l, e), u = e.outerHeight()), p = {
  6191. target: e.clone(),
  6192. length: e.find("tbody tr").length,
  6193. height: o.a.px.toPt(u),
  6194. isEnd: !0
  6195. }, 0 == e.find("tbody tr").length && r && (p = {
  6196. target: void 0,
  6197. length: 0,
  6198. height: 0,
  6199. isEnd: !0
  6200. });
  6201. } else {
  6202. var c = s.find("tr:lt(1)");
  6203. e.find("tbody").append(c), u = e.outerHeight();
  6204. var h = c.data("rowData");
  6205. d.push(h), u > l && (s.prepend(c), d.pop(), u = e.outerHeight(), p = {
  6206. target: e.clone(),
  6207. length: e.find("tbody tr").length,
  6208. height: o.a.px.toPt(u),
  6209. isEnd: !1
  6210. });
  6211. }
  6212. } else p = {
  6213. target: void 0,
  6214. length: 0,
  6215. height: 0,
  6216. isEnd: !1
  6217. };
  6218. if (p) {
  6219. this.printElementType.footerFormatter && e.find("tfoot") && e.find("tfoot").html(X.a.createTableFooter(this.printElementType.columns, this.getData(a), this.options, this.printElementType, a, d).html());
  6220. break;
  6221. }
  6222. }
  6223. return p;
  6224. }, e.prototype.getData = function (t) {
  6225. if (!t) return [{}];
  6226. var e = t[this.getField()];
  6227. return e ? JSON.parse(JSON.stringify(e)) : [];
  6228. }, e.prototype.autoCompletion = function (t, e) {
  6229. for (var n, i = this.getEmptyRowTarget(), o = e.outerHeight(); t > o;) {
  6230. n = i.clone(), e.find("tbody").append(n), o = e.outerHeight();
  6231. }
  6232. n && n.remove();
  6233. }, e.prototype.getEmptyRowTarget = function () {
  6234. return X.a.createEmptyRowTarget(this.columns);
  6235. }, e.prototype.onResize = function (e, n, i, o, r) {
  6236. t.prototype.updateSizeAndPositionOptions.call(this, r, o, i, n), X.a.resizeTableCellWidth(this.designTarget, this.columns, this.options.getWidth());
  6237. }, e.prototype.getReizeableShowPoints = function () {
  6238. return ["s", "e"];
  6239. }, e.prototype.design = function (t, e) {
  6240. var n = this;
  6241. this.designTarget.hidraggable({
  6242. handle: this.designTarget.find(".hiprint-printElement-table-handle"),
  6243. axis: n.options.axis && t && t.axisEnabled ? n.options.axis : void 0,
  6244. onDrag: function onDrag(t, i, o) {
  6245. n.updateSizeAndPositionOptions(i, o), n.createLineOfPosition(e);
  6246. },
  6247. moveUnit: "pt",
  6248. minMove: p.a.instance.movingDistance,
  6249. onBeforeDrag: function onBeforeDrag(t) {
  6250. s.a.instance.draging = !0, n.createLineOfPosition(e);
  6251. },
  6252. onStopDrag: function onStopDrag(t) {
  6253. s.a.instance.draging = !1, n.removeLineOfPosition();
  6254. }
  6255. }), this.setHiReizeable(), this.designTarget.hireizeable({
  6256. showPoints: n.getReizeableShowPoints(),
  6257. noContainer: !0,
  6258. onBeforeResize: function onBeforeResize() {
  6259. s.a.instance.draging = !0;
  6260. },
  6261. onResize: function onResize(t, i, o, r, a) {
  6262. n.onResize(t, i, o, r, a), n.hitable.updateColumnGrips(), n.createLineOfPosition(e);
  6263. },
  6264. onStopResize: function onStopResize() {
  6265. s.a.instance.draging = !1, n.removeLineOfPosition();
  6266. }
  6267. }), this.bingKeyboardMoveEvent(this.designTarget, e);
  6268. }, e.prototype.setHiReizeable = function () {
  6269. var t = this;
  6270. this.hitable = new U.a({
  6271. table: this.designTarget.find("table"),
  6272. rows: this.columns,
  6273. resizeRow: !1,
  6274. resizeColumn: !0,
  6275. trs: $(this.designTarget).find("tbody tr"),
  6276. handle: this.designTarget.find("table thead"),
  6277. columnDisplayEditable: !0,
  6278. columnDisplayIndexEditable: !0,
  6279. columnResizable: !0,
  6280. columnAlignEditable: !0,
  6281. isEnableEdit: !0,
  6282. isEnableEditText: !0,
  6283. isEnableEditField: !0,
  6284. isEnableContextMenu: !0,
  6285. isEnableInsertRow: !0,
  6286. isEnableDeleteRow: !0,
  6287. isEnableInsertColumn: !0,
  6288. isEnableDeleteColumn: !0,
  6289. isEnableMergeCell: !0
  6290. }), o.a.event.on("updateTable" + this.hitable.id, function () {
  6291. t.updateDesignViewFromOptions();
  6292. });
  6293. }, e;
  6294. }(f.a),
  6295. Q = function () {
  6296. var _t16 = function t(e, n) {
  6297. return (_t16 = Object.setPrototypeOf || _instanceof({
  6298. __proto__: []
  6299. }, Array) && function (t, e) {
  6300. t.__proto__ = e;
  6301. } || function (t, e) {
  6302. for (var n in e) {
  6303. e.hasOwnProperty(n) && (t[n] = e[n]);
  6304. }
  6305. })(e, n);
  6306. };
  6307. return function (e, n) {
  6308. function i() {
  6309. this.constructor = e;
  6310. }
  6311. _t16(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  6312. };
  6313. }(),
  6314. Z = function (t) {
  6315. function e(e) {
  6316. return t.call(this, e) || this;
  6317. }
  6318. return Q(e, t), e.prototype.createPrintElement = function (t) {
  6319. return new J(this, t);
  6320. }, e;
  6321. }(h),
  6322. tt = function () {
  6323. var _t17 = function t(e, n) {
  6324. return (_t17 = Object.setPrototypeOf || _instanceof({
  6325. __proto__: []
  6326. }, Array) && function (t, e) {
  6327. t.__proto__ = e;
  6328. } || function (t, e) {
  6329. for (var n in e) {
  6330. e.hasOwnProperty(n) && (t[n] = e[n]);
  6331. }
  6332. })(e, n);
  6333. };
  6334. return function (e, n) {
  6335. function i() {
  6336. this.constructor = e;
  6337. }
  6338. _t17(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  6339. };
  6340. }(),
  6341. et = function (t) {
  6342. function e(e) {
  6343. return t.call(this, e) || this;
  6344. }
  6345. return tt(e, t), e.prototype.createPrintElement = function (t) {
  6346. var e = {};
  6347. return $.extend(e, t || {}), W.createPrintElement(this, e);
  6348. }, e.prototype.getPrintElementTypeEntity = function () {
  6349. return new c({
  6350. title: this.title,
  6351. type: this.type
  6352. });
  6353. }, e;
  6354. }(j),
  6355. nt = function () {
  6356. function t() { }
  6357. return t.createPrintElementType = function (t) {
  6358. return t.type = t.type || "text", "text" == t.type ? new et(t) : "table" == t.type ? new h(t) : "tableCustom" == t.type ? new Z(t) : new j(t);
  6359. }, t;
  6360. }(),
  6361. it = function () {
  6362. function t() { }
  6363. return t.getElementTypeGroups = function (e) {
  6364. var n = t.formatterModule(e);
  6365. return a.instance[n] || [];
  6366. }, t.getElementType = function (t, e) {
  6367. if (t) return a.instance.getElementType(t);
  6368. nt.createPrintElementType({
  6369. type: e
  6370. });
  6371. }, t.build = function (e, n) {
  6372. var i = t.formatterModule(n),
  6373. o = new l().createPrintElementTypeHtml(e, this.getElementTypeGroups(i));
  6374. this.enableDrag(o);
  6375. }, t.buildByHtml = function (t) {
  6376. this.enableDrag(t);
  6377. }, t.enableDrag = function (e) {
  6378. e.hidraggable({
  6379. revert: !0,
  6380. proxy: function proxy(t) {
  6381. var e = s.a.instance.getDragingPrintElement(),
  6382. n = e.printElement.getProxyTarget(e.printElement.printElementType.getOptions());
  6383. return n.appendTo("body"), n.css("z-index", "9999"), n;
  6384. },
  6385. moveUnit: "pt",
  6386. minMove: 4,
  6387. onBeforeDrag: function onBeforeDrag(e) {
  6388. s.a.instance.draging = !0;
  6389. var n = t.getElementType($(e.data.target).attr("tid"), $(e.data.target).attr("ptype"));
  6390. return s.a.instance.setDragingPrintElement(n.createPrintElement()), !0;
  6391. },
  6392. onDrag: function onDrag(t, e, n) {
  6393. s.a.instance.getDragingPrintElement().updatePosition(e, n);
  6394. },
  6395. onStopDrag: function onStopDrag(t) {
  6396. s.a.instance.draging = !1;
  6397. }
  6398. });
  6399. }, t.formatterModule = function (t) {
  6400. return t || "_default";
  6401. }, t;
  6402. }(),
  6403. ot = function () {
  6404. return function (t, e) {
  6405. var n = this;
  6406. this.name = t, this.printElementTypes = [], e.forEach(function (t) {
  6407. n.printElementTypes.push(nt.createPrintElementType(t));
  6408. });
  6409. };
  6410. }(),
  6411. rt = function () {
  6412. return function (t) {
  6413. if (this.index = t.index, this.paperType = t.paperType, this.paperType) {
  6414. var e = s.a.instance[this.paperType];
  6415. t.height ? (this.height = t.height, this.width = t.width) : (this.height = e.height, this.width = e.width);
  6416. } else this.height = t.height, this.width = t.width;
  6417. this.paperHeader = t.paperHeader || 0, this.paperFooter = t.paperFooter || o.a.mm.toPt(this.height), this.printElements = t.printElements || [], this.paperNumberLeft = t.paperNumberLeft, this.paperNumberTop = t.paperNumberTop, this.paperNumberDisabled = t.paperNumberDisabled, this.paperNumberFormat = t.paperNumberFormat, this.panelPaperRule = t.panelPaperRule, this.rotate = t.rotate || void 0, this.firstPaperFooter = t.firstPaperFooter, this.evenPaperFooter = t.evenPaperFooter, this.oddPaperFooter = t.oddPaperFooter, this.lastPaperFooter = t.lastPaperFooter, this.topOffset = t.topOffset, this.fontFamily = t.fontFamily, this.leftOffset = t.leftOffset, this.orient = t.orient;
  6418. };
  6419. }(),
  6420. at = function () {
  6421. function t(t, e, n, i) {
  6422. this.startX = this.minX = t, this.startY = this.minY = e, this.maxX = t, this.maxY = e, this.lastLeft = n, this.lastTop = i;
  6423. }
  6424. return t.prototype.updateRect = function (t, e) {
  6425. this.minX = this.startX < t ? this.startX : t, this.minY = this.startY < e ? this.startY : e, this.maxX = this.startX < t ? t : this.startX, this.maxY = this.startY < e ? e : this.startY;
  6426. }, t.prototype.updatePositionByMultipleSelect = function (t, e) {
  6427. null != t && (this.lastLeft = this.lastLeft + t), null != e && (this.lastTop = this.lastTop + e), this.target.css({
  6428. left: this.lastLeft + "pt",
  6429. top: this.lastTop + "pt"
  6430. });
  6431. }, t;
  6432. }(),
  6433. pt = function () {
  6434. function t(t, e) {
  6435. this.templateId = e, this.index = t.index, this.width = t.width, this.height = t.height, this.paperType = t.paperType, this.paperHeader = t.paperHeader, this.paperFooter = t.paperFooter, this.initPrintElements(t.printElements), this.paperNumberLeft = t.paperNumberLeft, this.paperNumberTop = t.paperNumberTop, this.paperNumberDisabled = t.paperNumberDisabled, this.paperNumberFormat = t.paperNumberFormat, this.panelPaperRule = t.panelPaperRule, this.firstPaperFooter = t.firstPaperFooter, this.evenPaperFooter = t.evenPaperFooter, this.oddPaperFooter = t.oddPaperFooter, this.lastPaperFooter = t.lastPaperFooter, this.topOffset = t.topOffset, this.leftOffset = t.leftOffset, this.fontFamily = t.fontFamily, this.orient = t.orient, this.target = this.createTarget(), this.rotate = t.rotate;
  6436. }
  6437. return t.prototype.design = function (t) {
  6438. var e = this;
  6439. this.orderPrintElements(), this.designPaper = this.createNewPage(0), this.target.html(""), this.target.append(this.designPaper.getTarget()), this.droppablePaper(this.designPaper), this.designPaper.design(t), this.designPaper.subscribePaperBaseInfoChanged(function (t) {
  6440. e.paperHeader = t.paperHeader, e.paperFooter = t.paperFooter, e.paperNumberLeft = t.paperNumberLeft, e.paperNumberTop = t.paperNumberTop, e.paperNumberDisabled = t.paperNumberDisabled, e.paperNumberFormat = t.paperNumberFormat;
  6441. }), this.printElements.forEach(function (n) {
  6442. e.appendDesignPrintElement(e.designPaper, n), n.design(t, e.designPaper);
  6443. }), this.target.bind("click.hiprint", function (t) {
  6444. o.a.event.trigger("BuildCustomOptionSettingEventKey_" + e.templateId, {
  6445. options: {
  6446. panelPaperRule: e.panelPaperRule,
  6447. firstPaperFooter: e.firstPaperFooter,
  6448. evenPaperFooter: e.evenPaperFooter,
  6449. oddPaperFooter: e.oddPaperFooter,
  6450. lastPaperFooter: e.lastPaperFooter,
  6451. leftOffset: e.leftOffset,
  6452. topOffset: e.topOffset,
  6453. fontFamily: e.fontFamily,
  6454. orient: e.orient,
  6455. paperNumberFormat: e.paperNumberFormat
  6456. },
  6457. callback: function callback(t) {
  6458. e.panelPaperRule = t.panelPaperRule, e.firstPaperFooter = t.firstPaperFooter, e.evenPaperFooter = t.evenPaperFooter, e.oddPaperFooter = t.oddPaperFooter, e.lastPaperFooter = t.lastPaperFooter, e.leftOffset = t.leftOffset, e.topOffset = t.topOffset, e.fontFamily = t.fontFamily, e.orient = t.orient, e.paperNumberFormat = t.paperNumberFormat, e.designPaper.setOffset(e.leftOffset, e.topOffset), e.css(e.target);
  6459. }
  6460. });
  6461. }), this.bindBatchMoveElement();
  6462. }, t.prototype.css = function (t) {
  6463. this.fontFamily && t.css("fontFamily", this.fontFamily);
  6464. }, t.prototype.getHtml = function (t, e, n, i, o) {
  6465. var r = this;
  6466. this.orderPrintElements();
  6467. var a,
  6468. p = n || [],
  6469. s = i || this,
  6470. l = void 0;
  6471. if (i ? (l = p[p.length - 1], a = l.getPanelTarget(), l.updateReferenceElement(new E.a({
  6472. top: this.paperHeader,
  6473. left: 0,
  6474. height: 0,
  6475. width: 0,
  6476. bottomInLastPaper: l.referenceElement.bottomInLastPaper,
  6477. beginPrintPaperIndex: p.length - 1,
  6478. printTopInPaper: l.referenceElement.bottomInLastPaper,
  6479. endPrintPaperIndex: p.length - 1
  6480. }))) : (a = s.createTarget(), l = s.createNewPage(p.length), p.push(l), a.append(l.getTarget())), this.printElements.filter(function (t) {
  6481. return !t.isFixed() && !t.isHeaderOrFooter();
  6482. }).forEach(function (e) {
  6483. var n = [],
  6484. i = p[p.length - 1];
  6485. i.referenceElement.isPositionLeftOrRight(e.options.getTop()) ? (l = p[i.referenceElement.beginPrintPaperIndex], n = e.getHtml(l, t)) : (l = p[i.referenceElement.endPrintPaperIndex], n = e.getHtml(l, t)), n.forEach(function (t, i) {
  6486. t.referenceElement && (t.referenceElement.endPrintPaperIndex = t.referenceElement.beginPrintPaperIndex + n.length - 1), i > 0 && (l.index < p.length - 1 ? l = p[l.index + 1] : (l = s.createNewPage(p.length, l.referenceElement), p.push(l)), a.append(l.getTarget())), t.target && (l.append(t.target), l.updatePrintLine(t.printLine), e.onRendered(l, t.target)), i == n.length - 1 && t.referenceElement && l.updateReferenceElement(t.referenceElement);
  6487. });
  6488. }), o && o.templates.forEach(function (t, e) {
  6489. var i = t.data || {},
  6490. o = t.options || {};
  6491. t.template.printPanels.forEach(function (t) {
  6492. t.getHtml(i, o, n, r);
  6493. });
  6494. }), !i) {
  6495. if (this.lastPaperFooter) p[p.length - 1].printLine > this.lastPaperFooter && (l = s.createNewPage(p.length, l.referenceElement), p.push(l), a.append(l.getTarget()));
  6496. this.panelPaperRule && ("odd" == this.panelPaperRule && p.length % 2 == 0 && (l = s.createNewPage(p.length, l.referenceElement), p.push(l), a.append(l.getTarget())), "even" == this.panelPaperRule && p.length % 2 == 1 && (l = s.createNewPage(p.length, l.referenceElement), p.push(l), a.append(l.getTarget()))), p.forEach(function (n) {
  6497. n.updatePaperNumber(n.index + 1, p.length, e.paperNumberToggleInEven), r.fillPaperHeaderAndFooter(n, t, p.length), e && (null != e.leftOffset && n.setLeftOffset(e.leftOffset), null != e.topOffset && n.setTopOffset(e.topOffset));
  6498. }), a.prepend(this.getPrintStyle());
  6499. }
  6500. return a;
  6501. }, t.prototype.resize = function (t, e, n, i) {
  6502. this.width = e, this.height = n, this.paperType = t, this.rotate = i, this.designPaper.resize(e, n);
  6503. }, t.prototype.rotatePaper = function () {
  6504. null == this.rotate && (this.rotate = !1), this.rotate = !this.rotate, this.resize(this.paperType, this.height, this.width, this.rotate);
  6505. }, t.prototype.getTarget = function () {
  6506. return this.target;
  6507. }, t.prototype.enable = function () {
  6508. this.target.removeClass("hipanel-disable");
  6509. }, t.prototype.disable = function () {
  6510. this.target.addClass("hipanel-disable");
  6511. }, t.prototype.getPanelEntity = function (t) {
  6512. var e = [];
  6513. return this.printElements.forEach(function (n) {
  6514. e.push(n.getPrintElementEntity(t));
  6515. }), new rt({
  6516. index: this.index,
  6517. width: this.width,
  6518. height: this.height,
  6519. paperType: this.paperType,
  6520. paperHeader: this.paperHeader,
  6521. paperFooter: this.paperFooter,
  6522. paperNumberDisabled: !!this.paperNumberDisabled || void 0,
  6523. paperNumberFormat: this.paperNumberFormat ? this.paperNumberFormat : void 0,
  6524. panelPaperRule: this.panelPaperRule ? this.panelPaperRule : void 0,
  6525. paperNumberLeft: this.paperNumberLeft,
  6526. paperNumberTop: this.paperNumberTop,
  6527. printElements: e,
  6528. rotate: this.rotate,
  6529. firstPaperFooter: this.firstPaperFooter,
  6530. evenPaperFooter: this.evenPaperFooter,
  6531. oddPaperFooter: this.oddPaperFooter,
  6532. lastPaperFooter: this.lastPaperFooter,
  6533. topOffset: this.topOffset,
  6534. fontFamily: this.fontFamily,
  6535. orient: this.orient,
  6536. leftOffset: this.leftOffset
  6537. });
  6538. }, t.prototype.createTarget = function () {
  6539. var t = $('<div class="hiprint-printPanel panel-index-' + this.index + '"></div>');
  6540. return this.css(t), t;
  6541. }, t.prototype.droppablePaper = function (t) {
  6542. var e = this;
  6543. t.getTarget().hidroppable({
  6544. accept: ".ep-draggable-item",
  6545. onDrop: function onDrop(n, i) {
  6546. var r = s.a.instance.getDragingPrintElement(),
  6547. a = r.printElement;
  6548. a.updateSizeAndPositionOptions(e.mathroundToporleft(r.left - o.a.px.toPt(e.target.offset().left)), e.mathroundToporleft(r.top - o.a.px.toPt(e.target.offset().top))), a.setTemplateId(e.templateId), a.setPanel(e), e.appendDesignPrintElement(e.designPaper, a, !0), e.printElements.push(a), a.design(void 0, t);
  6549. }
  6550. });
  6551. }, t.prototype.initPrintElements = function (t) {
  6552. var e = this;
  6553. this.printElements = [], t && t.forEach(function (n) {
  6554. var i;
  6555. if (i = n.printElementType ? nt.createPrintElementType(n.printElementType) : a.instance.getElementType(n.tid)) {
  6556. var o = i.createPrintElement(n.options);
  6557. o.setTemplateId(e.templateId), o.setPanel(e), e.printElements.push(o);
  6558. } else console.log("miss " + JSON.stringify(t));
  6559. });
  6560. }, t.prototype.mathroundToporleft = function (t) {
  6561. var e = p.a.instance.movingDistance;
  6562. return Math.round(t / e) * e;
  6563. }, t.prototype.appendDesignPrintElement = function (t, e, n) {
  6564. e.setCurrenttemplateData(void 0);
  6565. var i = e.getDesignTarget(t);
  6566. i.addClass("design"), n && e.initSizeByHtml(i), t.append(i);
  6567. }, t.prototype.createNewPage = function (t, e) {
  6568. var n = new T(this.templateId, this.width, this.height, this.paperHeader, this.paperFooter, this.paperNumberLeft, this.paperNumberTop, this.paperNumberDisabled, this.paperNumberFormat, t, e);
  6569. return n.setFooter(this.firstPaperFooter, this.evenPaperFooter, this.oddPaperFooter, this.lastPaperFooter), n.setOffset(this.leftOffset, this.topOffset), n;
  6570. }, t.prototype.orderPrintElements = function () {
  6571. this.printElements = o.a.orderBy(this.printElements, function (t) {
  6572. return t.options.getLeft();
  6573. }), this.printElements = o.a.orderBy(this.printElements, function (t) {
  6574. return t.options.getTop();
  6575. });
  6576. }, t.prototype.fillPaperHeaderAndFooter = function (t, e, n) {
  6577. this.printElements.filter(function (t) {
  6578. return t.isFixed() || t.isHeaderOrFooter();
  6579. }).forEach(function (i) {
  6580. if (i.isFixed(), i.showInPage(t.index, n)) {
  6581. var o = i.getHtml(t, e);
  6582. o.length && t.append(o[0].target);
  6583. }
  6584. });
  6585. }, t.prototype.clear = function () {
  6586. this.printElements.forEach(function (t) {
  6587. t.designTarget && t.designTarget.length && t.designTarget.remove();
  6588. }), this.printElements = [];
  6589. }, t.prototype.insertPrintElementToPanel = function (t) {
  6590. var e = this.getPrintElementTypeByEntity(t);
  6591. if (e) {
  6592. var n = e.createPrintElement(t.options);
  6593. n.setTemplateId(this.templateId), n.setPanel(this), this.printElements.push(n);
  6594. }
  6595. }, t.prototype.addPrintText = function (t) {
  6596. t.printElementType = t.printElementType || {}, t.printElementType.type = "text", this.insertPrintElementToPanel(t);
  6597. }, t.prototype.addPrintHtml = function (t) {
  6598. t.printElementType = t.printElementType || {}, t.printElementType.type = "html", this.insertPrintElementToPanel(t);
  6599. }, t.prototype.addPrintTable = function (t) {
  6600. if (t.printElementType = t.printElementType || {}, t.printElementType.type = "table", t.options && t.options.columns) {
  6601. var e = $.extend({}, t.options.columns);
  6602. t.printElementType.columns = e.columns, e.columns = void 0;
  6603. }
  6604. this.insertPrintElementToPanel(t);
  6605. }, t.prototype.addPrintImage = function (t) {
  6606. t.printElementType = t.printElementType || {}, t.printElementType.type = "image", this.insertPrintElementToPanel(t);
  6607. }, t.prototype.addPrintLongText = function (t) {
  6608. t.printElementType = t.printElementType || {}, t.printElementType.type = "longText", this.insertPrintElementToPanel(t);
  6609. }, t.prototype.addPrintVline = function (t) {
  6610. t.printElementType = t.printElementType || {}, t.printElementType.type = "vline", this.insertPrintElementToPanel(t);
  6611. }, t.prototype.addPrintHline = function (t) {
  6612. t.printElementType = t.printElementType || {}, t.printElementType.type = "hline", this.insertPrintElementToPanel(t);
  6613. }, t.prototype.addPrintRect = function (t) {
  6614. t.printElementType = t.printElementType || {}, t.printElementType.type = "rect", this.insertPrintElementToPanel(t);
  6615. }, t.prototype.addPrintOval = function (t) {
  6616. t.printElementType = t.printElementType || {}, t.printElementType.type = "oval", this.insertPrintElementToPanel(t);
  6617. }, t.prototype.getPrintElementTypeByEntity = function (t) {
  6618. var e;
  6619. return (e = t.tid ? a.instance.getElementType(t.tid) : nt.createPrintElementType(t.printElementType)) || console.log("miss " + JSON.stringify(t)), e;
  6620. }, t.prototype.getPrintStyle = function () {
  6621. return " <style printStyle>\n @page\n {\n border:0;\n padding:0cm;\n margin:0cm;\n " + this.getPrintSizeStyle() + "\n }\n </style>\n ";
  6622. }, t.prototype.getPrintSizeStyle = function () {
  6623. return this.paperType ? "size:" + this.paperType + " " + (this.height > this.width ? "portrait" : "landscape") + ";" : "size:" + this.width + "mm " + this.height + "mm " + (this.orient ? 1 == this.orient ? "portrait" : "landscape" : "") + ";";
  6624. }, t.prototype.deletePrintElement = function (t) {
  6625. var e = this;
  6626. this.printElements.filter(function (n, i) {
  6627. n.id == t.id && (t.delete(), e.printElements.splice(i, 1));
  6628. });
  6629. }, t.prototype.getElementByTid = function (t) {
  6630. return this.printElements.filter(function (e) {
  6631. return e.printElementType.tid === t;
  6632. }).map(function (t, e) {
  6633. return t;
  6634. });
  6635. }, t.prototype.getElementByName = function (t) {
  6636. return this.printElements.filter(function (e) {
  6637. return e.options.name === t;
  6638. }).map(function (t, e) {
  6639. return t;
  6640. });
  6641. }, t.prototype.getFieldsInPanel = function () {
  6642. var t = [];
  6643. return this.printElements.forEach(function (e) {
  6644. e.options && e.options.field ? t.push(e.options.field) : e.printElementType.field && t.push(e.printElementType.field);
  6645. }), t;
  6646. }, t.prototype.bindBatchMoveElement = function () {
  6647. var t = this;
  6648. this.designPaper.getTarget().on("mousemove", function (e) {
  6649. s.a.instance.draging || 1 === e.buttons && (t.mouseRect.updateRect(e.pageX, e.pageY), t.updateRectPanel(t.mouseRect));
  6650. }).on("mousedown", function (e) {
  6651. s.a.instance.draging || (t.mouseRect && t.mouseRect.target && t.mouseRect.target.remove(), 1 === e.buttons && (t.mouseRect = new at(e.pageX, e.pageY, s.a.instance.dragLengthCNum(e.pageX - t.designPaper.getTarget().offset().left, p.a.instance.movingDistance), s.a.instance.dragLengthCNum(e.pageY - t.designPaper.getTarget().offset().top, p.a.instance.movingDistance))));
  6652. });
  6653. }, t.prototype.getElementInRect = function (t) {
  6654. var e = [];
  6655. return this.printElements.forEach(function (n) {
  6656. n.inRect(t) && e.push(n);
  6657. }), e;
  6658. }, t.prototype.updateRectPanel = function (t) {
  6659. var e = this,
  6660. n = this.designPaper.getTarget();
  6661. this.mouseRect.target || (this.mouseRect.target = $('<div tabindex="1" style="z-index:2;position: absolute;opacity:0.2;border: 1px dashed #000;background-color:#31676f;"><span></span></div>'), n.find(".hiprint-printPaper-content").append(this.mouseRect.target), this.mouseRect.target.focus(), this.bingKeyboardMoveEvent(this.mouseRect.target), this.mouseRect.target.hidraggable({
  6662. onDrag: function onDrag(t, n, i) {
  6663. e.mouseRect.lastLeft = e.mouseRect.lastLeft ? e.mouseRect.lastLeft : n, e.mouseRect.lastTop = e.mouseRect.lastTop ? e.mouseRect.lastTop : i, (e.mouseRect.mouseRectSelectedElement || []).forEach(function (t) {
  6664. t.updatePositionByMultipleSelect(n - e.mouseRect.lastLeft, i - e.mouseRect.lastTop);
  6665. }), e.mouseRect.lastLeft = n, e.mouseRect.lastTop = i;
  6666. },
  6667. moveUnit: "pt",
  6668. minMove: p.a.instance.movingDistance,
  6669. onBeforeDrag: function onBeforeDrag(t) {
  6670. e.mouseRect.target.focus(), s.a.instance.draging = !0, e.mouseRect.mouseRectSelectedElement || (e.mouseRect.mouseRectSelectedElement = e.getElementInRect(e.mouseRect));
  6671. },
  6672. onStopDrag: function onStopDrag(t) {
  6673. s.a.instance.draging = !1;
  6674. }
  6675. })), this.mouseRect.target.css({
  6676. height: t.maxY - t.minY + "px",
  6677. width: t.maxX - t.minX + "px",
  6678. left: t.lastLeft + "pt",
  6679. top: t.lastTop + "pt"
  6680. });
  6681. }, t.prototype.bingKeyboardMoveEvent = function (t) {
  6682. var e = this;
  6683. t.attr("tabindex", "1"), t.keydown(function (t) {
  6684. e.mouseRect.mouseRectSelectedElement || (e.mouseRect.mouseRectSelectedElement = e.getElementInRect(e.mouseRect));
  6685. var n = e.mouseRect.mouseRectSelectedElement || [];
  6686. switch (t.keyCode) {
  6687. case 37:
  6688. e.mouseRect.updatePositionByMultipleSelect(0 - p.a.instance.movingDistance, 0), n.forEach(function (t) {
  6689. t.updatePositionByMultipleSelect(0 - p.a.instance.movingDistance, 0);
  6690. }), t.preventDefault();
  6691. break;
  6692. case 38:
  6693. e.mouseRect.updatePositionByMultipleSelect(0, 0 - p.a.instance.movingDistance), n.forEach(function (t) {
  6694. t.updatePositionByMultipleSelect(0, 0 - p.a.instance.movingDistance);
  6695. }), t.preventDefault();
  6696. break;
  6697. case 39:
  6698. e.mouseRect.updatePositionByMultipleSelect(p.a.instance.movingDistance, 0), n.forEach(function (t) {
  6699. t.updatePositionByMultipleSelect(p.a.instance.movingDistance, 0);
  6700. }), t.preventDefault();
  6701. break;
  6702. case 40:
  6703. e.mouseRect.updatePositionByMultipleSelect(0, p.a.instance.movingDistance), n.forEach(function (t) {
  6704. t.updatePositionByMultipleSelect(0, p.a.instance.movingDistance);
  6705. }), t.preventDefault();
  6706. }
  6707. });
  6708. }, t;
  6709. }(),
  6710. st = function () {
  6711. return function (t) {
  6712. if (t) if (t.panels) {
  6713. this.panels = [];
  6714. for (var e = 0; e < t.panels.length; e++) {
  6715. this.panels.push(new rt(t.panels[e]));
  6716. }
  6717. } else this.panels = [];
  6718. };
  6719. }(),
  6720. lt = n(9),
  6721. ut = function () {
  6722. function t(t, e) {
  6723. var n = this;
  6724. this.printElementOptionSettingPanel = {}, this.printTemplate = t, this.settingContainer = $(e), o.a.event.on(t.getPrintElementSelectEventKey(), function (t) {
  6725. n.buildSetting(t);
  6726. }), o.a.event.on(t.getBuildCustomOptionSettingEventKey(), function (t) {
  6727. n.buildSettingByCustomOptions(t);
  6728. });
  6729. }
  6730. return t.prototype.init = function () { }, t.prototype.buildSetting = function (t) {
  6731. var e = this,
  6732. n = this,
  6733. i = t.printElement,
  6734. o = t.customOptionsInput;
  6735. this.lastPrintElement && this.lastPrintElement.getPrintElementOptionItems().forEach(function (t) {
  6736. t.destroy();
  6737. });
  6738. this.lastPrintElement = void 0, this.settingContainer.html("");
  6739. var r = $('<div class="hiprint-option-items"></div>');
  6740. i.getPrintElementOptionItems().forEach(function (t) {
  6741. t.submit = function (t) {
  6742. i.submitOption();
  6743. };
  6744. var n = t.createTarget(i, i.options, i.printElementType);
  6745. e.printElementOptionSettingPanel[t.name] = n, r.append(n), t.setValue(i.options[t.name], i.options, i.printElementType);
  6746. });
  6747. var a = $('<button class="hiprint-option-item-settingBtn hiprint-option-item-submitBtn"\n type="button">确定</button>'),
  6748. p = $('<button class="hiprint-option-item-settingBtn hiprint-option-item-deleteBtn"\n type="button">删除</button>');
  6749. r.append(a), r.append(p), a.bind("click.submitOption", function () {
  6750. i.submitOption();
  6751. }), p.bind("click.deleteBtn", function () {
  6752. n.printTemplate.deletePrintElement(i);
  6753. }), r.find(".auto-submit").change(function (t) {
  6754. i.submitOption();
  6755. }), r.find(".auto-submit:input").bind("keydown.submitOption", function (t) {
  6756. 13 == t.keyCode && i.submitOption();
  6757. }), this.settingContainer.append(r), o && o.forEach(function (t) {
  6758. var n = t.callback;
  6759. t.callback = function (t) {
  6760. n && (n(t), i.submitOption());
  6761. }, e.buildSettingByCustomOptions(t, e.settingContainer);
  6762. }), this.lastPrintElement = i;
  6763. }, t.prototype.buildSettingByCustomOptions = function (t, e) {
  6764. var n = this;
  6765. this.lastPrintElement && this.lastPrintElement.getPrintElementOptionItems().forEach(function (t) {
  6766. t.destroy();
  6767. });
  6768. this.lastPrintElement = void 0;
  6769. var i = e || this.settingContainer;
  6770. e || this.settingContainer.html("");
  6771. var o = [];
  6772. t.optionItems ? o = t.optionItems : Object.keys(t.options).forEach(function (t) {
  6773. var e = lt.a.getItem(t);
  6774. e && o.push(e);
  6775. });
  6776. var r = $('<div class="hiprint-option-items"></div>');
  6777. t.title && r.append('<div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label hiprint-option-title">\n ' + t.title + "\n </div>\n </div>"), o.forEach(function (e) {
  6778. e.submit = function (e) {
  6779. t.callback(n.getValueByOptionItems(o));
  6780. }, r.append(e.createTarget(void 0, t.options, void 0)), e.setValue(t.options[e.name], t.options, void 0);
  6781. });
  6782. var a = $('<button class="hiprint-option-item-settingBtn hiprint-option-item-submitBtn"\n type="button">确定</button>');
  6783. r.append(a), a.bind("click.submitOption", function () {
  6784. t.callback(n.getValueByOptionItems(o));
  6785. }), r.find(".auto-submit").change(function (e) {
  6786. t.callback(n.getValueByOptionItems(o));
  6787. }), r.find(".auto-submit:input").bind("keydown.submitOption", function (e) {
  6788. 13 == e.keyCode && t.callback(n.getValueByOptionItems(o));
  6789. }), i.append(r);
  6790. }, t.prototype.getValueByOptionItems = function (t) {
  6791. var e = {};
  6792. return t.forEach(function (t) {
  6793. e[t.name] = t.getValue();
  6794. }), e;
  6795. }, t;
  6796. }(),
  6797. dt = function () {
  6798. function t(t, e) {
  6799. this.paginationContainer = t, this.jqPaginationContainer = $(this.paginationContainer), this.template = e;
  6800. }
  6801. return t.prototype.buildPagination = function (t) {
  6802. var e = this.template.getPaneltotal(),
  6803. n = this;
  6804. this.jqPaginationContainer.html("");
  6805. for (var i = $('<ul class="hiprint-pagination"></ul>'), o = function o() {
  6806. var t = r,
  6807. e = $("<li><span>" + (t + 1) + '</span><a href="javascript:void(0);">x</a></li>');
  6808. e.find("span").click(function () {
  6809. n.template.selectPanel(t), e.removeClass("selected"), $(this).parent("li").addClass("selected");
  6810. }), e.find("a").click(function () {
  6811. n.template.deletePanel(t), n.buildPagination();
  6812. }), i.append(e);
  6813. }, r = 0; r < e; r++) {
  6814. o();
  6815. }
  6816. var a = $("<li><span>+</span></li>");
  6817. i.append(a), this.jqPaginationContainer.append(i), a.click(function () {
  6818. n.template.addPrintPanel(void 0, !0), n.buildPagination();
  6819. });
  6820. }, t;
  6821. }(),
  6822. ct = function () {
  6823. function t(t) {
  6824. var e = this;
  6825. this.tempimageBase64 = {}, this.id = s.a.instance.guid(), s.a.instance.setPrintTemplateById(this.id, this);
  6826. var n = t || {};
  6827. this.printPanels = [];
  6828. var i = new st(n.template || []);
  6829. n.template && i.panels.forEach(function (t) {
  6830. e.printPanels.push(new pt(t, e.id));
  6831. }), n.fields && (this.fields = n.fields), n.settingContainer && new ut(this, n.settingContainer), n.paginationContainer && (this.printPaginationCreator = new dt(n.paginationContainer, this), this.printPaginationCreator.buildPagination()), this.initAutoSave();
  6832. }
  6833. return t.prototype.design = function (t, e) {
  6834. var n = this;
  6835. if (e || (e = {}), 0 == this.printPanels.length) {
  6836. var i = this.createDefaultPanel();
  6837. this.printPanels.push(i);
  6838. }
  6839. if (!t) throw new Error("options.container can not be empty");
  6840. this.createContainer(t), this.printPanels.forEach(function (t, i) {
  6841. n.container.append(t.getTarget()), i > 0 && t.disable(), t.design(e);
  6842. }), this.selectPanel(0);
  6843. }, t.prototype.getSimpleHtml = function (t, e) {
  6844. var n = this;
  6845. e || (e = {});
  6846. var i = $('<div class="hiprint-printTemplate"></div>');
  6847. t && t.constructor === Array ? t.forEach(function (t) {
  6848. t && n.printPanels.forEach(function (n, o) {
  6849. i.append(n.getHtml(t, e));
  6850. });
  6851. }) : this.printPanels.forEach(function (n, o) {
  6852. i.append(n.getHtml(t, e));
  6853. });
  6854. return e && e.imgToBase64 && this.transformImg(i.find("img")), i;
  6855. }, t.prototype.getHtml = function (t, e) {
  6856. return t || (t = {}), this.getSimpleHtml(t, e);
  6857. }, t.prototype.getJointHtml = function (t, e, n) {
  6858. var i = $('<div class="hiprint-printTemplate"></div>'),
  6859. o = [];
  6860. return this.printPanels.forEach(function (r, a) {
  6861. i.append(r.getHtml(t, e, o, void 0, n));
  6862. }), i;
  6863. }, t.prototype.setPaper = function (t, e) {
  6864. if (/^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/.test(t)) this.editingPanel.resize(void 0, parseFloat(t), parseFloat(e), !1); else {
  6865. var n = s.a.instance[t];
  6866. if (!n) throw new Error("not found pagetype:" + (t || ""));
  6867. this.editingPanel.resize(t, n.width, n.height, !1);
  6868. }
  6869. }, t.prototype.rotatePaper = function () {
  6870. this.editingPanel.rotatePaper();
  6871. }, t.prototype.addPrintPanel = function (t, e) {
  6872. var n = t ? new pt(new rt(t), this.id) : this.createDefaultPanel();
  6873. return t && (t.index = this.printPanels.length), e && (this.container.append(n.getTarget()), n.design()), this.printPanels.push(n), e && this.selectPanel(n.index), n;
  6874. }, t.prototype.selectPanel = function (t) {
  6875. var e = this;
  6876. this.printPanels.forEach(function (n, i) {
  6877. t == i ? (n.enable(), e.editingPanel = n) : n.disable();
  6878. });
  6879. }, t.prototype.deletePanel = function (t) {
  6880. this.printPanels[t].clear(), this.printPanels[t].getTarget().remove(), this.printPanels.splice(t, 1);
  6881. }, t.prototype.getPaneltotal = function () {
  6882. return this.printPanels.length;
  6883. }, t.prototype.createDefaultPanel = function () {
  6884. return new pt(new rt({
  6885. index: this.printPanels.length,
  6886. paperType: "A4"
  6887. }), this.id);
  6888. }, t.prototype.createContainer = function (t) {
  6889. t ? (this.container = $(t), this.container.addClass("hiprint-printTemplate")) : this.container = $('<div class="hiprint-printTemplate"></div>');
  6890. }, t.prototype.getJsonTid = function () {
  6891. var t = [];
  6892. return this.printPanels.forEach(function (e) {
  6893. e.getPanelEntity().printElements.length && t.push(e.getPanelEntity());
  6894. }), new st({
  6895. panels: t
  6896. });
  6897. }, t.prototype.getJson = function () {
  6898. var t = [];
  6899. return this.printPanels.forEach(function (e) {
  6900. t.push(e.getPanelEntity(!0));
  6901. }), new st({
  6902. panels: t
  6903. });
  6904. }, t.prototype.getPrintElementSelectEventKey = function () {
  6905. return "PrintElementSelectEventKey_" + this.id;
  6906. }, t.prototype.getBuildCustomOptionSettingEventKey = function () {
  6907. return "BuildCustomOptionSettingEventKey_" + this.id;
  6908. }, t.prototype.clear = function () {
  6909. this.printPanels.forEach(function (t) {
  6910. if (t.clear(), t.index > 0) {
  6911. var e = t.getTarget();
  6912. e && e.length && e.remove();
  6913. }
  6914. }), this.printPanels = [this.printPanels[0]], this.printPaginationCreator && this.printPaginationCreator.buildPagination();
  6915. }, t.prototype.getPaperType = function (t) {
  6916. return null == t && (t = 0), this.printPanels[0].paperType;
  6917. }, t.prototype.getOrient = function (t) {
  6918. return null == t && (t = 0), this.printPanels[t].height > this.printPanels[t].width ? 1 : 2;
  6919. }, t.prototype.getPrintStyle = function (t) {
  6920. return this.printPanels[t].getPrintStyle();
  6921. }, t.prototype.print = function (t, e) {
  6922. t || (t = {}), this.getHtml(t, e).hiwprint();
  6923. }, t.prototype.print2 = function (t, e) {
  6924. if (t || (t = {}), e || (e = {}), this.clientIsOpened()) {
  6925. var n = this,
  6926. i = 0,
  6927. o = {},
  6928. r = $("link[media=print]").length > 0 ? $("link[media=print]") : $("link");
  6929. r.each(function (a, p) {
  6930. var s = new XMLHttpRequest();
  6931. s.open("GET", $(p).attr("href")), s.onreadystatechange = function () {
  6932. if (4 === s.readyState && 200 === s.status && (o[a + ""] = '<style rel="stylesheet" type="text/css">' + s.responseText + "</style>", ++i == r.length)) {
  6933. for (var p = "", l = 0; l < r.length; l++) {
  6934. p += o[l + ""];
  6935. }
  6936. n.sentToClient(p, t, e);
  6937. }
  6938. }, s.send();
  6939. });
  6940. } else alert("连接客户端失败");
  6941. }, t.prototype.imageToBase64 = function (t) {
  6942. var e = $(t).attr("src");
  6943. if (-1 == e.indexOf("base64")) try {
  6944. if (!this.tempimageBase64[e]) {
  6945. var n = document.createElement("canvas"),
  6946. i = new Image();
  6947. i.src = t.attr("src"), n.width = i.width, n.height = i.height, n.getContext("2d").drawImage(i, 0, 0), e && (this.tempimageBase64[e] = n.toDataURL("image/png"));
  6948. }
  6949. t.attr("src", this.tempimageBase64[e]);
  6950. } catch (e) {
  6951. try {
  6952. this.xhrLoadImage(t);
  6953. } catch (t) {
  6954. console.log(t);
  6955. }
  6956. }
  6957. }, t.prototype.xhrLoadImage = function (t) { }, t.prototype.sentToClient = function (t, e, n) {
  6958. e || (e = {});
  6959. var i = $.extend({}, n || {});
  6960. i.imgToBase64 = !0;
  6961. var o = t + this.getHtml(e, i)[0].outerHTML;
  6962. hiwebSocket.send({
  6963. id: s.a.instance.guid(),
  6964. printer: n.printer,
  6965. html: o,
  6966. templateId: this.id
  6967. });
  6968. }, t.prototype.printByHtml = function (t) {
  6969. $(t).hiwprint();
  6970. }, t.prototype.printByHtml2 = function (t, e) {
  6971. if (e || (e = {}), this.clientIsOpened()) {
  6972. var n = this,
  6973. i = 0,
  6974. o = {},
  6975. r = $("link[media=print]").length > 0 ? $("link[media=print]") : $("link");
  6976. r.each(function (a, p) {
  6977. var l = new XMLHttpRequest();
  6978. l.open("GET", $(p).attr("href")), l.onreadystatechange = function () {
  6979. if (4 === l.readyState && 200 === l.status && (o[a + ""] = '<style rel="stylesheet" type="text/css">' + l.responseText + "</style>", ++i == r.length)) {
  6980. for (var p = "", u = 0; u < r.length; u++) {
  6981. p += o[u + ""];
  6982. }
  6983. var d = p + $(t)[0].outerHTML;
  6984. hiwebSocket.send({
  6985. id: s.a.instance.guid(),
  6986. printer: e.printer,
  6987. html: d,
  6988. templateId: n.id
  6989. });
  6990. }
  6991. }, l.send();
  6992. });
  6993. } else alert("连接客户端失败");
  6994. }, t.prototype.deletePrintElement = function (t) {
  6995. this.printPanels.forEach(function (e) {
  6996. e.deletePrintElement(t);
  6997. });
  6998. }, t.prototype.transformImg = function (t) {
  6999. var e = this;
  7000. t.map(function (t, n) {
  7001. e.imageToBase64($(n));
  7002. });
  7003. }, t.prototype.toPdf = function (t, e, n) {
  7004. var i = this;
  7005. if (this.printPanels.length) {
  7006. var r = o.a.mm.toPt(this.printPanels[0].width),
  7007. a = o.a.mm.toPt(this.printPanels[0].height),
  7008. p = $.extend({
  7009. scale: 2,
  7010. width: o.a.pt.toPx(r),
  7011. x: 0,
  7012. y: 0,
  7013. useCORS: !0
  7014. }, n || {}),
  7015. s = new jsPDF({
  7016. orientation: 1 == this.getOrient(0) ? "portrait" : "landscape",
  7017. unit: "pt",
  7018. format: this.printPanels[0].paperType ? this.printPanels[0].paperType.toLocaleLowerCase() : [r, a]
  7019. }),
  7020. l = this.getHtml(t, n);
  7021. this.createTempContainer();
  7022. var u = this.getTempContainer();
  7023. this.svg2canvas(l), u.html(l[0]);
  7024. var d = u.find(".hiprint-printPanel .hiprint-printPaper").length;
  7025. $(l).css("position:fixed"), html2canvas(l[0], p).then(function (t) {
  7026. var n = t.getContext("2d");
  7027. n.mozImageSmoothingEnabled = !1, n.webkitImageSmoothingEnabled = !1, n.msImageSmoothingEnabled = !1, n.imageSmoothingEnabled = !1;
  7028. for (var o = t.toDataURL("image/jpeg"), p = 0; p < d; p++) {
  7029. s.addImage(o, "JPEG", 0, 0 - p * a, r, d * a), p < d - 1 && s.addPage();
  7030. }
  7031. i.removeTempContainer(), e.indexOf(".pdf") > -1 ? s.save(e) : s.save(e + ".pdf");
  7032. });
  7033. }
  7034. }, t.prototype.createTempContainer = function () {
  7035. this.removeTempContainer(), $("body").prepend($('<div class="hiprint_temp_Container" style="overflow:hidden;height: 0px;box-sizing: border-box;"></div>'));
  7036. }, t.prototype.removeTempContainer = function () {
  7037. $(".hiprint_temp_Container").remove();
  7038. }, t.prototype.getTempContainer = function () {
  7039. return $(".hiprint_temp_Container");
  7040. }, t.prototype.svg2canvas = function (t) {
  7041. t.find("svg").each(function (t, e) {
  7042. var n = e.parentNode,
  7043. i = document.createElement("canvas"),
  7044. o = new XMLSerializer().serializeToString(e);
  7045. canvg(i, o), $(e).before(i), n.removeChild(e), $(i).css("width", "100%"), $(i).css("height", "100%");
  7046. });
  7047. }, t.prototype.on = function (t, e) {
  7048. o.a.event.on(t + "_" + this.id, e);
  7049. }, t.prototype.clientIsOpened = function () {
  7050. return hiwebSocket.opened;
  7051. }, t.prototype.getPrinterList = function () {
  7052. var t = hiwebSocket.getPrinterList();
  7053. return t || [];
  7054. }, t.prototype.getElementByTid = function (t, e) {
  7055. return null == e && (e = 0), this.printPanels[e].getElementByTid(t);
  7056. }, t.prototype.getElementByName = function (t, e) {
  7057. return null == e && (e = 0), this.printPanels[e].getElementByName(t);
  7058. }, t.prototype.getPanel = function (t) {
  7059. return null == t && (t = 0), this.printPanels[t];
  7060. }, t.prototype.loadAllImages = function (t, e, n) {
  7061. var i = this;
  7062. null == n && (n = 0);
  7063. for (var o = t[0].getElementsByTagName("img"), r = !0, a = 0; a < o.length; a++) {
  7064. var p = o[a];
  7065. p.src && p.src !== window.location.href && -1 == p.src.indexOf("base64") && (p && void 0 !== p.naturalWidth && 0 !== p.naturalWidth && p.complete || (r = !1));
  7066. }
  7067. n++ , !r && n < 10 ? setTimeout(function () {
  7068. i.loadAllImages(t, e, n);
  7069. }, 500) : e();
  7070. }, t.prototype.setFields = function (t) {
  7071. this.fields = t;
  7072. }, t.prototype.getFields = function () {
  7073. return this.fields;
  7074. }, t.prototype.getFieldsInPanel = function () {
  7075. var t = [];
  7076. return this.printPanels.forEach(function (e) {
  7077. t = t.concat(e.getFieldsInPanel());
  7078. }), t;
  7079. }, t.prototype.initAutoSave = function () {
  7080. var t = this;
  7081. this.autoSave && o.a.event.on("hiprintTemplateDataChanged_" + this.id, function () {
  7082. hiLocalStorage.saveLocalData(t.autoSaveKey || "hiprintAutoSave", JSON.stringify(1 == t.autoSaveMode ? t.getJson() : t.getJsonTid()));
  7083. });
  7084. }, t;
  7085. }();
  7086. function ht(t) {
  7087. this.getHtml(t).hiwprint();
  7088. }
  7089. function ft(t, e, n) {
  7090. $.extend({}, t || {}).imgToBase64 = !0;
  7091. var i = new ct({});
  7092. i.on("printSuccess", e), i.on("printError", n), i.printByHtml2(this.getHtml(t));
  7093. }
  7094. function gt(t) {
  7095. var e = void 0;
  7096. return t && t.templates.forEach(function (n, i) {
  7097. var o = $.extend({}, n.options || {});
  7098. t.imgToBase64 && (o.imgToBase64 = !0), e ? e.append(n.template.getHtml(n.data, o).html()) : e = n.template.getHtml(n.data, o);
  7099. }), e;
  7100. }
  7101. function mt(t) {
  7102. p.a.instance.init(t), p.a.instance.providers.forEach(function (t) {
  7103. t.addElementTypes(a.instance);
  7104. });
  7105. }
  7106. n.d(e, "init", function () {
  7107. return mt;
  7108. }), n.d(e, "PrintElementTypeManager", function () {
  7109. return it;
  7110. }), n.d(e, "PrintElementTypeGroup", function () {
  7111. return ot;
  7112. }), n.d(e, "PrintTemplate", function () {
  7113. return ct;
  7114. }), n.d(e, "print", function () {
  7115. return ht;
  7116. }), n.d(e, "print2", function () {
  7117. return ft;
  7118. }), n.d(e, "getHtml", function () {
  7119. return gt;
  7120. }), $(document).ready(function () {
  7121. hiwebSocket.hasIo() && hiwebSocket.start();
  7122. });
  7123. }]);