"""Original little daily-hiding elf, drawn with the project's Art primitives.
No imported character artwork or commercial toy design is used.
The seat is 39 pixels below the sprite origin; boots dangle below the ledge.
"""
import math
def daily_elf_assets(Art):
 def pose(frame):
  a=Art(40,56)
  # Striped dangling stockings and curled green boots.
  for x in (15,25):
   a.line([(x,37),(x-1,50)],'#e7d3aa',4)
   for y in (40,45):a.line([(x-2,y),(x+1,y)],'#be4b50',2)
   a.ellipse((x-6,48,x+2,53),'#3b664c')
   a.poly([(x-6,50),(x-8,47),(x-8,52),(x-2,53)],'#3b664c')
  a.ellipse((11,23,29,40),'#b3484e')
  a.rect((12,29,28,38),'#bd4f52',3)
  a.poly([(12,24),(16,28),(20,24),(24,28),(28,24)],'#e5d8b9')
  a.line([(12,36),(28,36)],'#514232',3)
  a.rect((18,34,22,38),'#d7b66b',1)
  for y in (28,31):a.ellipse((19,y,21,y+2),'#d7b66b')
  a.poly([(12,13),(5,11),(10,20)],'#d8b185')
  a.poly([(28,13),(35,11),(30,20)],'#d8b185')
  a.ellipse((10,9,30,27),'#e7c398')
  a.poly([(10,11),(16,2),(23,1),(30,5),(33,4),(31,10),(26,13)],'#4b7957')
  a.line([(10,12),(30,12)],'#e5d8b9',2)
  a.ellipse((31,3,35,7),'#d7b66b')
  a.ellipse((14,17,16.5,20),'#36333b')
  if 2<=frame<=4:a.arc((23,17,28,21),5,165,'#493a33',1.2)
  else:a.ellipse((24,17,26.5,20),'#36333b')
  a.ellipse((18.5,20,21.5,23),'#d6a47d')
  a.arc((17,22,24,26),5,170,'#8c5746',1)
  for x in (13,27):a.ellipse((x-1.8,21,x+1.8,23),'#d78f7c')
  a.line([(12,27),(9,34),(15,38)],'#b3484e',4)
  a.ellipse((13,36,17,40),'#e7c398')
  if frame==0 or frame>=16:
   hand=(28,39);elbow=(31,33)
  else:
   raise_arm=min(1,frame/4)
   hand=(28+6*raise_arm+3*math.sin(frame*math.pi*.65)*raise_arm,39-22*raise_arm)
   elbow=(31,30-4*raise_arm)
  a.line([(27,27),elbow,hand],'#b3484e',4)
  a.ellipse((hand[0]-2,hand[1]-2,hand[0]+2,hand[1]+2),'#e7c398')
  if frame>=4 and frame<16:a.line([(hand[0],hand[1]),(hand[0]+1,hand[1]-4)],'#e7c398',1)
  return a.image()
 return [('dailyelf'+str(i),pose(i)) for i in range(17)],{'dailyelf':0}
